Linked Questions

3 votes
1 answer
17k views

I saw some command such as sudo su ls, and I just wonder what's the deference between sudo ls?
Peco's user avatar
  • 161
7 votes
2 answers
1k views

It might be a duplicate and I'm pretty sure I already saw an answer to this somewhere, but I wondered what are the differences in terms of rights and variables and other stuff between sudo -s and sudo ...
Kiwy's user avatar
  • 9,892
55 votes
7 answers
125k views

I basically need to do this: DUMMY=dummy sudo su - ec2-user -c 'echo $DUMMY' This doesn't work. How can I pass the env variable $DUMMY to su? -p doesn't work with -l.
Umang's user avatar
  • 653
45 votes
3 answers
138k views

I created special user in /etc/passwd with: secure:x:2000:2000:secure:/bin:/usr/sbin/nologin I don't want to allow login of this user (via console, ssh, ftp, any way). He is just for running one ...
peter's user avatar
  • 1,005
8 votes
5 answers
103k views

I have some downloads in my root user /root/Downloads folder. How can I access them from another not-root-user account?
Program-Me-Rev's user avatar
9 votes
1 answer
35k views

I installed zsh and changed root shell /bin/bash to /usr/bin/zsh. Then I rebooted and typed sudo su. It said "Cannot execute help: No such file or directory". So, I typed sudo bash. However, when I ...
user avatar
11 votes
5 answers
11k views

I see a lot of posts out there that say you type in sudo su to get an interactive prompt with root privileges, and I see equally many posts debating the pros and cons over sudo -i vs sudo su. Here I'...
Electric Coffee's user avatar
9 votes
2 answers
2k views

I wrote a script which switches users while running, and executed it using file redirection to standard in. So user-switch.sh is... #!/bin/bash whoami sudo su -l root whoami And running it with ...
devoutsalsa's user avatar
5 votes
1 answer
13k views

My user is part of the admin group and I'm used to type sudo su to impersonate root. Unfortunately this generate a non-login shell and if I need one I need to type again /bin/bash -l. Is there any ...
Ignazio's user avatar
  • 231
2 votes
2 answers
16k views

This question is answered a number of times in the net, but none of those answer resulted useful in my case. The problem Accessing a remote machine using private key, I usually require root ...
Adrian Maire's user avatar
  • 2,062
5 votes
3 answers
3k views

I am trying to make sure when a script is run it is run as a specific user without having to su to that user before the script is run. Also the script is run with a couple of flags for example ./...
PDStat's user avatar
  • 153
1 vote
2 answers
5k views

I want to create a ssh key, I wanted to know does it make any differences when I create the key as root and when I create it as user? like as a user I do this: ssh-keygen -t rsa -C "your_email@...
Ladan Nekuii's user avatar
1 vote
2 answers
11k views

I using Redhat linux. I am trying to run the following command and would like to know why it is not prompting for password? Here is what I am doing. I open the terminal window and enter my username ...
jbl's user avatar
  • 11
5 votes
2 answers
6k views

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 superman ...
usual me's user avatar
  • 151
1 vote
3 answers
6k views

I want to continue the execution of the script after change user, the script would be something like below echo "xauth add" `xauth list | grep ${DISPLAY:10:2}` >> test.sh sudo su ./test.sh ...
karra's user avatar
  • 11

15 30 50 per page