
What are the differences between "su", "sudo -s", "sudo -i", "sudo …
2011年10月22日 · sudo lets you run commands in your own user account with root privileges. su lets you switch user so that you're actually logged in as root. sudo -s runs a shell with root privileges. sudo -i also acquires the root user's environment. To see the difference between su and sudo -s, do cd ~ and then pwd after each of them.
unix - Command: sudo su - - Super User
Therefore sudo su - will put you into a root environment but it will ask you for your user password instead of the root password (once sudo has given you root privileges, su - can be executed with no password).
linux - What does "sudo -s" actually do? - Super User
2011年7月6日 · The two aren't really inconsistent - the sudo command always changes user, either to root, or to the user you specify with the -u switch. All the -s does is provide a shortcut for starting a shell as that user.
What's exactly the point of the sudo command, in terms of security?
Now, enter sudo. sudo works on a different principle. Instead of requiring users to know the root account login, sudo would be used to allow users to escalate themselves into the root account (or any other account, for that matter) based on the rules of the /etc/sudoers file.
sudo - Sudoers file, enable NOPASSWD for user, all commands
2013年8月19日 · Preface This is a fairly complex question related to the sudoers file and the sudo command in general. NOTE: I have made these changes on a dedicated machine running Ubuntu Desktop 13.04, that I use
shell - Why is sudo bash needed? - Super User
sudo allows users to run programs with the security privileges of another user (normally the superuser, or root). bash starts a new bash shell. So, sudo bash starts a new bash shell with the security privilege of root user.
sudo - How do I login as root? - Ask Ubuntu
I want to login as root, but when I enter sudo -s and enter password, this message is shown: "you are not in sudoers file", and when I enter su and enter password, this is shown: "authenticat...
How do I run a 'sudo' command inside a script? - Ask Ubuntu
2014年2月25日 · Run 'sudo' commands in scripts by using the 'sudo' keyword before the command within the script file.
linux - How do I log out of `sudo su`? - Super User
2012年4月6日 · I'm using sudo su to start mysql and do some homework with it. When I finish with mysql (or any other command), then I'm still in sudo. How do I "log out", so my prompt changes back from # to $?
How do I add a user to the "sudo" group? - Ask Ubuntu
sudo usermod -aG sudo <username> The a is very important. Without it they'll be removed from all other groups. You will need to either restart your shell/terminal or log out and back in for this to take effect. See also: How can I add a new user as sudoer using the command line?