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.
Linux provides several powerful administrative tools and utilities which will help you to manage your systems effectively. If you don’t know what these tools are and how to use them, you could be spending lot of time trying to perform even the basic administrative tasks. The focus of this course is to help you understand system administration tools, which will help you to become an effective Linux system administrator.Get the Linux Sysadmin Course Now!
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
{ 28 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.
guys, how do I ocnnect to the internet? I replaced my windows XP with Ubuntu 9.10 and now I get a message in the terminal saying oli ‘dip’ group members are allowed to use this command when I use “pon dsl-provider” to connect to the web.
Man, you saved my day!
Hi
Same problem I got today. Log in screen shows “Authentication failure” after trying to change in “log in window preference”.
I am new in UBUNTU. I could not follow you as stated above as $ sudo passwd root and others. I want to log in as before. Please help me out.
Thanks
Ramesh made it clear that it is not good security policy to enable root. If your intent is to add your quacking voice to the cacophony just to hear yourself, bravo! But the user would have discovered how to enable root with or without Ramesh’s help – and, on his own, would likely have not also discovered that there is great risk in doing so.
Oh, but you’re all the experts. Sometimes the personality of the linux community sickens me; like sharks after one of their own…
(And save your admonitions for me: I’m betting I’ve been wrangling linux distros longer than most of you have been alive.)
hi sir, i want ubuntu more information how to learn in ubtunu ple help me sir
I installed Ubuntu using VMWare on my Windows XP PC.But I was able to login to my account only once after 3-4 attempts.I get authentication Failure error now.I am new to Linux/Ubuntu;please support.
Hi got a quick solution from the website.Went to recovery mode after pressing Shift on boot up,dropped to root shell prompt and changed the password for the relevant user.
Ramesh
Thank you very much for the information. it was helpful to know about root account access.
Regards
Vijay
I have deleted my user account from guest by mistake………
now i am unable to add user account it is showing Addroot password………
if i am using above method $ sudo passwd root
“unable to chande to sudors gid : operation not permitted”
this error is coming ………..
please help
thnank you very much, i was getting this problem “Authentication failure”,, now its ok by your solution,,,keep it,,
I’m unable to do su – on Ubuntu. It says “su: Authentication failure”. How do I fix it?
thank you…it does work…
Thank you. It works and you save my day.
Hi Guys,
You can use the below command too..
sudo su
hai, ! thanks a lot
thank u friends
Thanks a lot
this really help me..thanks alot:-D
thanks for this
how do you allow root logon from version 12 of ubuntu?
Thanks a lot boss