I tried to su
to root so I could install lights, but I get an authentication error when I try:
user@host:~$ su
Password:
su: Authentication failure
I tried to su
to root so I could install lights, but I get an authentication error when I try:
user@host:~$ su
Password:
su: Authentication failure
The root account is disabled by default in Ubuntu, so there is no root password, that's why
su
fails with an authentication error.Use
sudo
to become root:If
su
doesn't work, I do this (in bash):Voila! You are now root!
A shortcut for this would be
sudo su
. In this case given that you are a member of/etc/sudoers
with all privileges, then you would only need your user's password.You are getting
Authentication failure
because you are trying to become root which is disabled by default in all versions of Ubuntu. This can be easily circumvented in two ways:Instead of
su
usesudo -i
or better yet, append to any commandsudo
in the way of:I wouldn't recommend enabling root, since it could raise a security concern, for example, if you use any service exposed to the web.
Open root with
sudo -s
and when it's in this mode type:Then, choose password. This password will be for
su
command.Use
sudo your_command
in place of su.ie