su command + authentication failure
su
asks for the root password. Since Ubuntu doesn't set a root password by default, you can't use it to become root.
Instead, to become root, use sudo -i
with your personal password.
su
asks for the password of the account you're trying to login. It's usage (simplified):
su username
When omitting username
, the username default to root
. Since the root password is disabled by default on Ubuntu, no password will be valid. The preferred way to run root commands is not through a su shell, but with sudo as in:
sudo mount /dev/sdb1 /mnt
The root
account in Ubuntu is disabled by default. This is to say that it has no password (which is different from it having a blank password) and no attempt to authenticate with root's password will succeed. Therefore, su
or su -
will not work.
Instead, use sudo
to run a command as root:
sudo command...
If you want a root shell like you get with su
, run:
sudo -s
If you want a root shell like you get with su -
, run:
sudo -i