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
146 views

How do I fix my /etc/sudoers file to recognise me?

Currently, I am receiving the following terminal error: sudo: parse error in /etc/sudoers near line 10 sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin I have ...
0
votes
2answers
133 views

Ubuntu CentOS RHEL cross bash script su support

I know that title was a little ambiguous. Allow me to explain our issue. We designed an installer script on Ubuntu since Debian based systems are our primary core, however, some of our cloud based ...
3
votes
1answer
148 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 ...
2
votes
1answer
87 views

When can a user do `sudo su` but not `sudo su -`?

The following happened to me: $ sudo su - superman Sorry, user clarkkent is not allowed to execute '/bin/su - superman' as root in krypton101. However the following worked fine: $ sudo su ...
1
vote
1answer
44 views

X11 forwarding via SSH and su

For me, it is weird that while using ssh connection with X11 forwarding, a user and root are able to see xclock, but another user is not able to see that. Why? mahmood@cluster:~$ xclock ^C mahmood@...
1
vote
1answer
22 views

How (or is it possible) the Linux desktop X-Server from Terminal under an SU otherusername

I have a simple scenario to demonstrate the use-case for this question Login to Linux as currentuser start bash terminal xauth list $DISPLAY mint/unix:0 MIT-MAGIC-COOKIE-1 ...
1
vote
1answer
37 views

Make superuser act like some other user in certain directory tree

I have the following problem: My home directory lies on the network and is mounted locally on home/<my username>. I can access it with my normal user account <my username>, but as root, I ...
1
vote
1answer
149 views

Bash script with (X)dialog asking for root password (kdesu substitute)

I'm using (X)dialog for a script that a normal runs, but it needs root privileges for some commands. The script runs from a .desktop file, thus the user sees no terminal. For example here #!/bin/bash ...
1
vote
1answer
55 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
579 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
26 views

Cannot switch to a non-admin user

Seems like I can't su unless the user is admin. When trying to ssh into the user or su username i get: Cannot execute /bin/bash: Permission denied Have tried almost every solution I could find on ...
0
votes
1answer
74 views

Allow multiple users to “su” to multiple other users without password

This is similar to this question: Allow user1 to "su - user2" without password However, the solution only work for multiple users accessing "su"ing ONE user. #works fine :) 2 or more ...
0
votes
1answer
209 views

Valid root/user passwords not working on EC2

There is an authentication failure when I'm trying to enter password for any of my accounts after an update using yum. My authentication got broken, while everything else works. The updates were ...
0
votes
1answer
54 views

Is there a way to see which user is logged into the system and has switched with “su”?

There are many person that may have access to the system and use a common user with more grants. How can I see which user is running a command? is there a way to use "ps" for that?
2
votes
0answers
6 views

run gvfs-mount as user in a script owned by root for networkmanager dispatcher

I'm trying to create a script to auto mount using gvfs-mount for NetworkManager dispatcher. The dispatcher requires the script to be owned by root. Running gvfs-mount smb://path/ works in terminal as ...
2
votes
0answers
35 views

Slackware su man pages does not mention /etc/suauth, what reason?

I've been reading the man pages before I start restricting su access to certain users (I'd like to not rely on sudo if possible). There is no /etc/suauth file so I was going to create my own and ...
2
votes
0answers
315 views

Difference between 'xhost + ' and 'xhost +SI:localuser:AnotherUser'

If I do xhost + >access control disabled, clients can connect from any host su AnotherUser -c xterm an xterm popups, but if I do xhost +SI:localuser:AnotherUser >localuser:AnotherUser being ...
2
votes
0answers
37 views

Bind a directory as me

Analogous for a regular user running a thin FTP server (where others can access the file system with his/her permissions), can a regular user (through fuse maybe) "mount" a directory for others to use ...
2
votes
0answers
361 views

Decrypting with GPG after a “su - different user”

I have cron job running a script in the cron of "USER A" that encrypts many files in a loop using the gpg command below: gpg --batch --cipher-algo AES256 --passphrase "PASSWORDISHERE" -c FILENAME "...
2
votes
0answers
144 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
36 views

Switching (su) to a paswordless account

I've made account A passwordless with passwd -d A. Now, when I log in as user B from a terminal and run su A I can switch to user A (and I am not even asked for a password). If, however, I log as ...
1
vote
0answers
42 views

Run mkvirtualenv command as another user

I want to run the "mkvirtual sth" but I have to run the script as superuser. sudo ./install.sh install.sh looks like this: # ... mkvirtualenv sth # su - geeret -c "mkvirtualenv sth" # (tried this)...
1
vote
0answers
38 views

What command should I use to explicitly set list of groups and execute a command?

To execute a command as other uid, one uses su. The list of supplementary groups is not specified on command line, but instead read from configuration files (/etc/passwd, /etc/group), etc. Which tool ...
1
vote
0answers
135 views

Slow script execution

I have a strange problem... My script: #!/bin/bash SECONDS=0 lock_file=/tmp/$0.lock [ -e $lock_file ] && exit touch $lock_file echo "<<<db2_hadr_check>>>" instances=( ...
1
vote
0answers
57 views

Linux/CentOS - can't su after changing ownership

I mistakenly changed ownership of all files on a CentOS system from root to my login account. I can login but if I su I get: su: cannot set groups: Operation not permitted I don't need the system ...
1
vote
0answers
117 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
1k 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 ...
0
votes
0answers
110 views

Unable to su to any user as root on Red Hat 6.7 server

System: Red Hat Enterprise Linux Server release 6.7 (Santiago) I am trying to su to kms user(OS user) as root but i keep getting error saying You are required to change your LDAP password ...
0
votes
0answers
74 views

debian 8 cinnamon file manager ssh as super-user

On a linux remote server I've a user who can become super-user without typing the password, e.g. simply typing sudo -s. Using winscp on windows there is an option to pass the sudo command (sudo su -),...
0
votes
0answers
358 views

sudo and su hang indefinitely… stumped

I am trying to run su or sudo on my CentOS 6.6 machine. Every time I try to execute either command, I get prompted for a password. After entering the password, the command simply hangs. I can ctrl+c ...
0
votes
0answers
63 views

Why use use su -c to start background processes?

After reading Link im under the impression that using su -c with & would be redundant. My reasoning is that any process started with su -c will be started in a new shell but it will not be killed ...
0
votes
0answers
50 views

Use sudo as login

I've picked up the habit of using sudo and disallowing root logins. In cases, sudo is integrated with GUI configuration tools that require it. Are there any serious efforts to replace login and ...
-1
votes
0answers
22 views

Unable to open software manager in linux mint with sudo/gksu

I'm unable to open software manager in linux mint. I open it and it asks for my password but after typing it, nothing pops up. When I try gksu mintinstall: I get on terminal Traceback (most recent ...