Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I get root access from shell? When I'm trying to use su I get:

    default@default-laptop:~/home/default$ su
    su: Authentication error
share|improve this question
up vote 5 down vote accepted

su wants the root password, if you're running Ubuntu that will be scrambled. Try sudo -s -H or sudo su - and give your user password.

share|improve this answer
take note if you're not in the sudo ring, this will be useless as well. – eradicus May 28 '09 at 13:02
If your user account is an "Administrator", the sudo su works great. Sometimes I use a series of sudo [command], and sometimes I just sudo su and then enter the [command]. Seems to work fine. – pcapademic May 28 '09 at 22:31

On Ubuntu, an easier way is to use the following command:

$ sudo -s

This tells sudo to launch a shell. Make sure that you are in the admin group on Ubuntu. You can check your groups by using:

$ groups

If you are not in the group, you can add yourself by using the following

$ sudo gpasswd -a <username> admin

Also to note, on a default Ubuntu install, root's password will be the same password as the default user.

share|improve this answer

On non-Ubuntu systems, you will need to ensure that your username is part of the "wheel" group in the /etc/group file. See "man group" for syntax, etc.

share|improve this answer

On a default Ubuntu installation you cannot su as root. You can use sudo to launch any command you need.

You can also do

sudo passwd

after entering your password you will be able to give root a password. After you will be able to su as root.

share|improve this answer
This is not recommended as this poses security threats. I recommend leaving the root password "unknown." – eradicus May 28 '09 at 13:03
It's also wrong, you should do "sudo passwd" not "su passwd". – GodEater May 28 '09 at 14:13

su requires the root password

sudo su will accomplish the same thing, with your own password (not root's) - but you have to be set up properly in advance to do this.

Some distro's like Ubuntu give the first user full sudo access. Others, like Debian, require you to set up the root account during the install.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.