When you setup a new Ubuntu or OS X installation a user is generally created for you. On OS X it is whatever username you pick. On Ubuntu (the server version) usually the ubuntu
user is created.
The way I understand it, there is also a root user, which you can access via something like sudo su - root
, and entering the password of the ubuntu
or the user you created, which is part of the administrators group. Once you switch to root
I think you can use the passwd
command and change root's password.
But what was root
's password before that? Does it exist? Is it a random string of numbers and letters? How does the system deal with that?
sudo su
. Theroot
account is assumed by default.su
is only needed for switching to some non-root user. To run a single command as root, typesudo command
. To get a root shell, typesudo -i
.