Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Its all in the password' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Its all in the password
Authored by: dhrakar on Jan 26, '04 08:04:13PM
The main difference is in which password you get prompted for. The su command authenticates with the password of the user you are switching to while sudo authenticates with your password. Further, if su is invoked by the root account, then it needs no password.

Thus, what is happening is that sudo prompts you for your password, and then switches you to root and invokes su to create a root shell without prompting for a root password.

[ Reply to This | # ]
You end up in different directories
Authored by: googoo on Jan 27, '04 09:46:39PM

The command "sudo -s" starts a root shell but leaves you in the same directory from which you invoked it. The command "sudo su -" logs you into a root shell in root's home directory (/var/root/). Since I am often already in the directory I want to modify, I like "sudo -s."

-Mark



[ Reply to This | # ]