su is a utility to run a shell or other command as another user (root by default).

learn more… | top users | synonyms

1
vote
2answers
324 views

Script to su -c into a screen is not working as intended

I'm working on a script that will allow me to load up a screen from a user via sudo and su -c. However, when I use it, it will just show the shell of the user: sudo su -c "script /dev/null; screen -r ...
3
votes
1answer
29 views

su - -c 'll' other_user results in error, how can I run this other user's alias?

In current bash session, I just want to change to another user for some bash command. The command is aliased to some script defined in another user's .bashrc or .profile. Am I able to make it ...
1
vote
1answer
31 views

How do I switch user without any references to the old one?

A while back, when playing with unprivileged LXC, I discovered that the command to create a container failed if I used su to switch to the user, but it worked if I used ssh user@localhost to login. ...
1
vote
1answer
528 views

How to invoke root privileges from a password prompt of “Software Update” window?

When I try to install software updates using the "Software Update" GUI, I am asked for the root password. Although, I can 'su' in a terminal, the password is not recognized as correct in the GUI ...
0
votes
1answer
173 views

How do you keep the password hidden when invoked during the su command?

This is the first time it has happened to me where I am using the su command and it actually displays the password on the terminal and doesn't stay hidden. Here is my code snippet: sshpass -p ...
2
votes
0answers
108 views

Understanding getlogin spoofing

My question is in three (or so) related parts: 1) My understanding is that getlogin() will effectively return the auid associated with the process and so isn't actually changable by the user. Is that ...
1
vote
0answers
20 views

limits.conf modification doesn't work

On a SLES 9 machine I added the line: vi /etc/security/limits.conf USERNAME hard cpu 70 but when I check it with "ulimit -a": SERVER:~ # su USERNAME USERNAME@SERVER:/root> ...
1
vote
0answers
25 views

How to propagate TSTP while running a program as a different user

I'm running a terminal application via "su" in this fashion: su -c "/path/to/app --args" username This is done from a root context, and 'username' is a less privileged user in the system. The ...
1
vote
0answers
36 views

Some commands does not work in su envirorment

I have logged in to CentOS 5 machine with normal user and then I used su command to login as root user. Now commands like ifconfig, useradd, userdel are not working on machine and it gives command not ...
1
vote
0answers
654 views

Automate `pbrun su` via plink

I am trying to automate an sFTP process for our project. When I login with PuTTY and manually type the command pbrun su - user1, root access is given to user1 and I am able to do the sFTP process. I ...
1
vote
0answers
71 views

can't access account with empty password

I used the passwd command to remove the password for my account. Now, when I try to use su to log in to my account, it won't let me enter an empty password. So now, I can't access my account. Any ...
0
votes
0answers
36 views

Unable to su into an account: could not open session

in my Linux machine - red-hat I successfully to login to different users as the following su - userC [machine@Linux ~]$ pwd [machine@Linux ~]$ /Users/userC but only in one user I get the ...
0
votes
0answers
159 views

running a command as a less privileged user: `sudo -u` vs `su` being run as root

in an startup-script that is typically being run as user root, i would like to start a program (actually, a server) as a less-privileged user. the script originally used su -s /bin/sh -c ...
-1
votes
0answers
38 views

How to run the script that requires root acccess as a regular user without adding that user to sudoers?

I have an account with root privileges and need to run the install script for a specific user. I don't want/can't analyse the script upfront to figure out the list of all other packages it is going to ...