sudo versus #

Tom H tomh0665 at
Wed Feb 10 22:00:04 UTC 2010

>> It's my understanding that the sudo command basically executes the
>> subsequent command as superuser.  I fail to see the difference between
>> having a # prompt logged into superuser and sudo, other than ensuring that
>> you don't make mistakes, unless having the terminal open can allow
>> attackers to infiltrate the system?  I have been using command line unix
>> for a long time.  I don't make mistakes.  What is the real implications of
>> sudo?

>  I don't really understand what you mean, but I think it's better to have
>  a "normal user" shell and sudo sometimes. You can sudo bash (dash,
>  zsh, csh, tcsh) if you want to type several "root" commands.

>> Also, I notice that when Ubuntu gives me those update dialog boxes my root
>> password doesn't work to allow the installation to go forward.  This makes
>> me irritated, because it instead wants my normal user password, which for
>> me by design is a weaker password that I use for more things and thus
>> could be more easily cracked.  My root password is longer and I use it for
>> less things.  Both are immune to dictionary attack, but it bothers me the
>> way this subverts my configuration.

> This is the way Ubuntu is meant to be. If you don't like it, it is a bit
>  difficult (I think) to modify. As far as I know (I've not reinstalled lately),
>  root does not have a password by default (which can be a real problem
>  sometimes if, for instance, you need to type root password for a failed
>  fsck on boot).

I am pretty sure that if you have not enabled root (which is a simple
"sudo passwd" with the usual Ubuntu warning that you will go to hell
if you do so and allow anyone to hack into your box) and you have to
run fsck, you can enter the password of the admin use (the first
created user, unless you specifically allow other users to be admins).

I have never tried (or thought of)
sudo bash
to run multiple root commands but it is probably the equivalent of
"sudo -s". I would suggest
sudo su
sudo su -
sudo -s
sudo -i

More information about the ubuntu-users mailing list