Linux-commands
Ubuntu default root password and sudoers
by Tomas Quintero on May.04, 2009, under JeOS, Linux, Linux-commands, sudo, ubuntu
I was checking my Google Analytics key words, and noticed I was getting hits for my JeOS posting, but also people looking to find out what the “root” password was for Ubuntu. I figure I’ll write a quick article, and maybe it’ll get me more hits on the Google’s!
Ubuntu, by default, does not have a password configured for the root user. That is, the user cannot logon through means authenticated via password.
Instead, ’sudo’ is advised to be used on Ubuntu systems. The first user created (when you are following the setup processes during the installer) is added to the file /etc/sudoers. This allows this user to execute commands with super-user privileges when they are prefixed with ’sudo’.
Typically, when a user wants to run many commands as root, they will issue the command
sudo su
… which will prompt them for their password (unless you have disabled that), and drop them into the root shell.
Alternatively, on my systems I like to run ’sudo passwd root’ as soon as I login, which allows me to set a password on the root account. Doing so allows me to login as root if I need to recover my system, say for instance my username has been removed from the /etc/sudoers file, and it gives me the warm and coozy feeling.