Questions tagged [su]

Substitute User command

Run a command with substitute user and group id, allow one user to temporarily become another user. It runs a command (often an interactive shell) with the real and effective user id, group id, and supplemental groups of a given user.

man page

126 questions
0
votes
3 answers

Logout root after tmux detach

I'm running tmux on my servers and when configuring things I like to just su into root and take care of things. Is there a possibilty to log out root automatically after I detach the tmux session?
thpetrus
  • 67
  • 1
  • 1
  • 10
0
votes
1 answer

How to access an account with the su-command?

Problem: to access an account in MacOS with the su-command, more here. I can access my other accounts, but not the one created according to the intructions. The command does not change the user: su postgres Question: Why can I not access an account…
0
votes
1 answer

running a command as root with /bin/su and without gives different results

Some background: I have a machine with SLES 11 installed. I am running a bash script that one of its lines is /bin/su $USER -c SOME_CMD. Unfortunately, the SOME_CMD that comes after the -c keeps failing, no matter if USER=root or any different user.…
n00bInCpp
  • 1
  • 1
  • 3
0
votes
3 answers

Regular user doing su

I'm using Ubuntu server 12.04. If a user is only a member of it's own group why he can still do su SOME_OTHER_USER ? Can I prevent this?
Kovica
  • 113
  • 2
0
votes
2 answers

Why does "su - X" require password, but "sudo -u X bash" doesn't?

I know "why" questions are dangerous :) I have sudo access on RHEL, and noticed this: su - fred Password: (I don't know fred's password). sudo -u fred bash [fred] $ Is there a way to not need fred's password to do the su? Is there a reason to want…
Steve Bennett
  • 5,750
  • 12
  • 47
  • 59
0
votes
1 answer

su command not responding?

It is bit hard to describe. I will try list them: BACKGROUND: SUSE enterprise 10 sp3 I am using SecureCRT to telnet. There's two user app and oracle. I am not in the server room, I can't reboot locally nor remote since I can't get access to…
GaryX
  • 101
  • 1
0
votes
3 answers

Using su which user was I?

I use su when I often need to set proper permissions when copying files etc, but forget if I used su to get there, ex: root@host> su bob bob@host> copy folderA folderB But sometimes I forget if I logged in as bob or if I was root and su'd to become…
SeanDowney
  • 187
  • 1
  • 1
  • 10
0
votes
6 answers

Automate switch user in script

I have to write a script on ubuntu and some commands require root privileges. The script is full of normal linux commands. Is it possible to write a switch user(su) script that automates the password prompt without needing user intervention?. Need…
user53864
  • 1,723
  • 11
  • 37
  • 66
0
votes
3 answers

Secure SFTP access DEBIAN Lenny

Config: Debian Lenny Apache2 I have configured SSH to "PermitRootLogin no" and have created another user to login with and the do "su". Now I want to connect with e.g. Filezilla via SFTP. I can do that by creating a user that only has access to…
Cudos
  • 539
  • 2
  • 7
  • 18
0
votes
0 answers

Tenable su+sudo and selinux

My Not-A-Sysadmin-Boss wants me to explain this but I can't really find an answer? When using TENABLE SC to scan a RHEL7 system the account used to do the scan connects via ssh then uses sudo to perform its checks. But when selinux is enforcing…
0
votes
1 answer

How to restrict users switching from su command

How can I restrict users switching by su command? Suppose there are 3 users (root,user1 and user2) only root and user1 can switch by using su command. root or user1 should not be able to switch to user2 by using su command. root@instance# su - user1…
0
votes
1 answer

Let one user become another user without a password?

On (most) Linux systems, we can let a specific user su into anyone they want by placing him in the wheel group and making some settings in /etc/pam.d/su. I want to do something more limited: I want to let a certain user user1 be able to "become" (as…
einpoklum
  • 1,652
  • 3
  • 21
  • 31
0
votes
1 answer

Having trouble switching to user using the "su - lfs" command

I am trying to do linux from scratch. I was able to create the user to manage everything (named lfs) and I was able to login using this command. I then powercycled my computer and I am no longer able to switch to that user. If I enter su - lfs in my…
-1
votes
1 answer

Allow winscp access, restrict direct shell access, allow su - for Linux server local user

Is it possible to restrict access for a particular local user in Linux, with below mentioned conditions: User should have no direct shell access User should be able to login with command "su -" from any other user shell User should be able to do…
Arun Krishnan
  • 379
  • 2
  • 3
  • 13
-1
votes
1 answer

sudo to other user doesn't preserve DISPLAY variable

I've got an /etc/sudoers file that works just fine in all versions of Fedora prior to F18, but we've noticed that when upgrading to F18 (and installing FreeIPA, though the cases I'll show here were run with sudo processing done using this file to…
wortmanb
  • 183
  • 3
  • 9
1 2 3
8
9