Login as Root in Ubuntu 12.04 (Precise Pangolin)
Want to enable root logon in Ubuntu 12.04? Well, even though it’s not recommended, it’s still possible to login with the root or administrator account, and this brief tutorial is going to show you how. The reason it’s not recommended is simple; because people make mistakes. Making the smallest mistakes in Ubuntu while login as the root user can completely render your computer inoperable. Besides damaging your system, it also creates security risks to login as the root user.
If you still want to login as the root user after all the risks I mentioned above, then continue below to learn how.
Objectives:
- Enable the root account in Ubuntu 12.04
- Enjoy!
To get started, press Ctrl – Alt – T on your keyboard to open Terminal. When it opens, run the commands below to create a new root password.
sudo passwd root
Next, copy and paste the commands below to enable manual or other login.
sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'
Restart your computer and choose to login as root.
Enjoy! When you login, the username on the username will show Guest, ignore that. You’re root!

Thanks
I see the Ubuntu forums frown on this, but coming from a GUI OS like Windows how else do they want us to edit files that need fixing?
My problem occurred when I added a repository in the update manager that caused the Update manager to crash as soon as it opens. So I figured the only way to fix it is to edit /ect/apt/sources.list in a GUI but for this I need ROOT priviliges, which I enabled easily enough but then could not log in the account at the login screen.
So thanks a lot man..this got me sorted in no time.
Thank you.
Thank you very much!
Thank You…:)
Honestly I think that “Making the smallest mistakes in Ubuntu while login as the root user can completely render your computer inoperable…” is a bit precious.
A thoughtful person, who reads a few docs or FAQs will not will-he nill-he kill a Linux box dead logged in as root.
At worst such a person will mess up some subsystem, requiring him/her to read more docs and learn what she/he did wrong.
Agreed, not recommended. ‘Sudo’ is the way to go for elevated permissions. With that being said, how about listing the command(s) to reverse these steps? Thanks!
Really helpful and easy to follow guide. Thank you so much, you got me out of a bind!
but i have installed many software and packages into my admin account but when i login into root via this procedure then the root account is just like a fresh and newly installed ubuntu, what to do ?
That Really worked ……….:-)
can you tell me how to reverse or remove this command, please? It didn’t give me root access as suggested, but since I issued this command, I can’t shut down my PC unless I issue the command “sudo poweroff” in terminal.
Thanks
This really works. At first it was confusing with the user and password that requires, but at last I figured it out. Thanks for the info! more more tricks from you..:D