Home

Debian/Ubuntu Tips & Tricks

Debuntu.org: .deb packages, Unix/Linux Tutorials and Articles.

sponsors


User login

Poll

Syndicate

Syndicate content


Tips


Ubuntu Default Root Password or the sudo way

The first time I installed Ubuntu on a computer, I was rather used to debian and went through the whole install process easily.

When I rebooted my system and open a text-console, my first action was to su - in order to gain root's grants. What a surprise when I was promted for a password. Damn, What was it?!?

Through the installation process, I was asked to enter a username, I entered my usual username, type and confirmed my password, but I was never asked to enter the super-user root's password!?!

On a usual debian install, you are actually asked for root password and eventually you may want to create a first normal user(which is actually safer).

Ubuntu being a bit more user friendly, thought it was easier for the user to be promted for his password when he wants to do administration actions such as installing software, updating the system... To do this, ubuntu uses the sudo package which allow a user to gain root access for an action. In order to make sure that the user in front of the computer is actually the real user (not somebody using your access), the user is prompted for his password.

In Ubuntu, by default, there is not really a root user, but only root access which can be gained using sudo, for instance, to update your repository list:

:~$sudo apt-get update

Root is created without predefined password, it does not have a password, but it does not have an empty password either, you just can't login!!!

I actually like to be logged as root when I've got many this to do. I find sudo usefull when only one or two actio are to be done, but when doing administration task, typing sudo all the time just drive me cray :).

One way to gain root prompt is to launch a shell as root. Therefore, using sudo you can type:

:~$ sudo sh
Password:
sh-3.1#

And there you are, you have a root shell.

If you want to be able to login as root, you need to define a password for root:

:~$ sudo passwd
Password:
Enter new UNIX password:
Retype new UNIX password:

Now you can login as root with su.

sudo stands for super user

sudo stands for super user do

SU = substitute user

No, SU does NOT stand for super user. It officially stands for "substitute user", or loosely, "switch user". Don't believe me? create 2 USER accounts, and then just use su to switch between them.

su john
su jane

It has nothing to do with going SUPER USER mode. Please don't spread misinformation.

I guess I had always been wrong

I had always thought of it as the actual latin word "Sudo" which means "false". I always thought of it as gaining "false" root access (meaning your not really root, just kinda borrowing the privliges).

This kinda makes me sad, I love the word "Sudo".

Not wrong, just misinformed

And I guess by the Latin word "sudo" you mean the Greek-derived prefix "pseudo-", 'substitute' or 'fake', although used by itself I feel that it also implies 'pretentious'; see Wiktionary.

Mind you, that is not to say that whoever came up with the command name "sudo" did not have "pseudo" in mind; Unix has plenty of puns.

sudo bash

I alway use "sudo bash" to become as rootuser, no password needed.
Great site!

Or

You can also do: sudo -s

:)


You can also do: sudo su -

You can also do:
sudo su -

And you'll have a real root login (not just a sh prompt).


besides sudo sh and sudo su -

besides sudo sh and sudo su - there is actually a switch in sudo
that will give you a proper root shell try sudo -i


Hey hey, sudo -i.... I sho

Hey hey,

sudo -i.... I should have read the man page :).


thank you very mucho.

thank you very mucho.


just for the f*** of it, what

just for the f*** of it, what does "sudo" actually stand for? greets


Well, I guess it stands for s

Well, I guess it stands for su do, basically su (to get other user's grants) and do like do that action :) ... but this has to be confirmed.


superuser do give me root pri

superuser do give me root priv.

you are correct sir