{ 38 comments… read them below or add one }

1 C Baltimore September 25, 2009 at 4:32 am

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.

2 Chuck Gregory September 25, 2009 at 4:43 am

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.

3 LaMi September 25, 2009 at 6:32 am

> 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.

4 counterdutch September 25, 2009 at 9:43 am

it’s saver not to enable root account.
When you need it do :
sudo su -

5 Ronald September 26, 2009 at 6:23 am

Any thoughts about ‘sudo bash’ ? I use that quite often actually..

6 Ramesh Natarajan October 5, 2009 at 10:18 pm

@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).

7 Pradeep December 11, 2009 at 7:35 pm

Thanks Ramesh, I was stuck in the same issue and it helped me.

8 Nestor April 16, 2010 at 1:12 am

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.

9 Daniel October 5, 2011 at 1:46 pm

Man, you saved my day!

10 Md A Al Baqui October 27, 2011 at 7:45 pm


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.


11 The Janitor January 25, 2012 at 12:46 pm

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.)

12 Anonymous January 27, 2012 at 6:32 am

hi sir, i want ubuntu more information how to learn in ubtunu ple help me sir

13 Girish January 27, 2012 at 5:04 pm

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.

14 Girish January 27, 2012 at 6:19 pm

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.

15 Vijay January 30, 2012 at 8:01 pm

Thank you very much for the information. it was helpful to know about root account access.

16 Dinesh February 8, 2012 at 9:45 am

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

17 manoj swami February 13, 2012 at 3:49 am

thnank you very much, i was getting this problem “Authentication failure”,, now its ok by your solution,,,keep it,,

18 rasel ahmed March 21, 2012 at 9:17 am

I’m unable to do su – on Ubuntu. It says “su: Authentication failure”. How do I fix it?

19 sugab March 30, 2012 at 10:30 am

thank you…it does work…

20 Ricardo May 16, 2012 at 8:38 am

Thank you. It works and you save my day.

21 Azaam Basheer June 28, 2012 at 8:31 am

Hi Guys,

You can use the below command too..

sudo su

22 moko August 5, 2012 at 9:55 am

hai, ! thanks a lot :)

23 V.gnanasekaron October 8, 2012 at 9:04 pm

thank u friends

24 ishwar November 15, 2012 at 12:25 am

Thanks a lot

25 Sara December 14, 2012 at 1:49 am

this really help me..thanks alot:-D

26 krishna kumar sahu January 11, 2013 at 7:36 am

thanks for this

27 Mike February 23, 2013 at 11:31 am

how do you allow root logon from version 12 of ubuntu?

28 Anonymous April 27, 2013 at 7:28 am

Thanks a lot boss

29 Rajendra June 2, 2013 at 3:34 am

Thanks Ramesh. It was helpful.

30 Anonymous July 28, 2013 at 11:16 am

I know this is old as earth however, to disable the account one must use the -L and not -l (capital and not small letter) with the usermod option.

31 Ajinkya September 5, 2013 at 10:03 am

thanks, worked fine. I wanted to install Java runtime on ubuntu. helped me :)

32 Anonymous September 13, 2013 at 4:22 am

to allow root login in 12.10 and beyond just install gdm and use gdm instead of lightdm
~$ sudo apt-get install gdm after you install gdm you may need to run ~$ sudo dpkg-reconfigure gdm you will first be prompted by a brief introduction where you select you will then be given a choice where you can select on next reboot you can click on “not listed” on the login screen type in root as the user name and then you can use your new password made by following the instructions from Ramesh
to go back to lightdm you can run sudo dpkg-reconfigure lightdm

33 Gopinath September 19, 2013 at 12:33 pm

your information is useful for me to login as root . Thank you so much

34 Robert October 8, 2013 at 7:45 pm

This problem was very strange, you gave my life back, thanks so much :-)

35 Sibgha October 27, 2013 at 1:03 am

thanks a lot

36 Dan June 11, 2014 at 12:34 am

Thanks alot buddies

37 dwi June 29, 2014 at 5:35 am

thanks its works.

38 Jeremy August 6, 2014 at 6:50 pm

I tried to follow your way…
By the way, regarding the step 1,
Step 1: Go to System -> Administration -> Login window.
Where i can find this?
How can i go to the Login window?

Leave a Comment

Previous post:

Next post: