[colug-432] Root Login Debian

Richard Holbert holbert.13 at osu.edu
Mon Feb 13 14:20:45 EST 2012


On 02/13/2012 01:53 PM, Rob Funk wrote:
>> or if you are in /etc/sudoers you could
>> try 'sudo su -'
> Or shorter: "sudo -i".
>
> Everyone always forget about sudo's -s and -i options.  :-)
> _______________________________________________
> colug-432 mailing list
> colug-432 at colug.net
> http://lists.colug.net/mailman/listinfo/colug-432
Thanks Rob!

Here's a snip from the sudo man page:

The -i (simulate initial login) option runs the shell specified in the 
passwd(5) entry of the target user as a login shell.  This means that 
login-specific resource files such as .profile or .login will be read by 
the shell.  If a command is specified, it is passed to the shell for 
execution. Otherwise, an interactive shell is executed.  sudo attempts 
to change to that user's home directory before running the shell.  It 
also initializes the environment, leaving DISPLAY and TERM unchanged, 
setting HOME, MAIL, SHELL, USER, LOGNAME, and PATH, as well as the 
contents of /etc/environment on Linux and AIX systems.  All other 
environment variables are removed.

Rick






More information about the colug-432 mailing list