Root login

John L Fjellstad john-ubuntu at fjellstad.org
Fri Dec 8 15:37:08 UTC 2006


Grumpy_Penguin <grumpypenguin at qwest.net> writes:

> You have given arcane additions to the sudo command but still no
> compelling reason why on a single administrator system sudo would be
> superior to su

sudo lets me run multiple commands with root privileges without having
to give me root password before each command or staying as root the
whole time.

Say I'm editing the samba config file.
sudo vi /etc/samba/smb.conf
<password>
<finish editing, do some other stuff as normal user>
sudo /etc/init.d/samba restart

sudo will remember that I have given my password (within certain
timelimits). 

do this as su
su -c 'vi /etc/samba/smb.conf'
<password>
<finish editing, do some other stuff as normal user>
su -c '/etc/init.d/samba restart'
<password>

Of course, I could do the unsafe part, and just stay as root until I'm
certain I'm finished. But then again, I could do that with sudo too.  

So sudo offer an additional convenience for me.  But then again, when I
did use su (before sudo came on the scene), I always used the 'su -c
...'

-- 
John L. Fjellstad
web: http://www.fjellstad.org/          Quis custodiet ipsos custodes





More information about the kubuntu-users mailing list