Question: I’m unable to do su – on Ubuntu. It says “su: Authentication failure”. How do I fix it? Also, is it possible for me to login to Ubuntu using root account directly?
Answer: Let us address these two question one by one.
Warning: Enabling root is not recommended. If possible, you should always try to perform all administrative tasks using sudo.
Question 1: I’m unable to login using su command. How to fix this?
By default, root account password is locked in Ubuntu. So, when you do su -, you’ll get Authentication failure error message as shown below.
$ su - Password: su: Authentication failure
Enable super user account password on Ubuntu
First, set a password for root user as shown below.
$ sudo passwd root [sudo] password for ramesh: Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
Now with the new password you can login as super user with su command
$ su - Password: #
Disable super user account password on Ubuntu
Later if you don’t want to use su anymore, you can lock the root user password using one of the methods shown below
$ sudo passwd -l root
( or )
$ sudo usermod -p '!' root
Question 2: How do I login to Ubuntu directly using root account?
First, you should allow the root user to be logged in from the X as explained below.
Step 1: Go to System -> Administration -> Login window.
Step 2: In the Security tab, click on the check box “Allow local system administrator” as shown below. After this change, reboot the system and login directly using root account.
Get free Unix tutorials, tips and tricks straight to your email in-box.
If you enjoyed this article, you might also like..


My name is Ramesh Natarajan. I will be posting instruction guides, how-to, troubleshooting tips and tricks on Linux, database, hardware, security and web. My focus is to write articles that will either teach you or help you resolve a problem. Read more about
{ 7 comments… read them below or add one }
I think you blew this one. Though the analysis of why they couldn’t “su -” directly was right on, the answer is to run “sudo su -” to gain root.
Normally you only need root access once in awhile. To execute a single command with root privileges, just use sudo in front of the command, such as:
sudo gedit somefileyounormallycouldnotaccess
If you will be doing several commands in a row that need root access, use:
sudo su
In either case, you will be asked to enter your password before proceeding. That’s all you need. No need to change root password, just use your own.
> To execute a single command with root privileges,
> just use sudo in front of the command, such as:
> sudo gedit somefileyounormallycouldnotaccess
And if you need to execute multiple commands simply execute “sudo -s” and enter you own user password. Then you get a root prompt. Nearly the same as using su.
it’s saver not to enable root account.
When you need it do :
sudo su -
Any thoughts about ’sudo bash’ ? I use that quite often actually..
@C Baltimore,
Ofcourse. We have to use sudo to execute any root commands in Ubuntu. I did mention this in the article under “Warning” section. I’ve moved the warning section to the top of the article, to make it visible.
The purpose of this article is only as a FYI for those who come from other Linux distro (for e.g. Red Hat), where they typically do ’su – ‘ to gain root. If they still want to continue doing ’su – ‘ on Ubuntu without doing ’sudo su -’, they can use the method mentioned here. (which is still not recommended as I’ve mentioned in the warning section).
Thanks Ramesh, I was stuck in the same issue and it helped me.