D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] sudo su (was: Re: little Linux story...)

 

On Mon, Dec 15, 2008 at 04:59:54PM -0000, Ray Smith wrote:
> You can also use sudo su which will then aske for you account password. Then
> any command you enter after that will be treated as a root command. Very bad
> if you forget you are operating as root.

There's no sense in running 'sudo su' if you want a root shell. 'su' is
a program that prompts for a password and gives you a root shell, like
sudo, but it prompts every time. All 'sudo su' does is run su as root,
bypassing su's password prompt in favour of sudo's.

sudo -s or sudo -i will give you a root shell (-i will simulate a login
as root, so you'll get root's bashrc etc. rather than your own, and
various environment variables will be set).

-- 
Benjamin M. A'Lee || mail: bma@xxxxxxxxxxxxxx
web: http://subvert.org.uk/~bma/ || gpg: 0xBB6D2FA0
"For if a thing is not diminished by being shared with others, it is not
rightly owned if it is only owned and not shared." -- St. Augustinus

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html