Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

This question already has an answer here:

I ran this commands in Terminal and I didnt get any error:

sudo passwd root

and after setting password I ran this command:

sudo passwd -u root

but when I log off or reboot there is no root account!! please somebody tell me how can I login as root in ubuntu 12.04!

share|improve this question

marked as duplicate by Raja, Alvar, Avinash Raj, Richard, karel Mar 3 '14 at 14:40

This question was marked as an exact duplicate of an existing question.

type sudo -i and then the sudo password and you will be root. – Alvar Mar 3 '14 at 7:19
yes but I want to have root account in login screen!! in ubuntu 11.04 that codes work well but in ubuntu 12.04 it dosent make an root account in login screen!! – MSH Mar 3 '14 at 7:23
You don't want to have a root account in the log in screen it's a bad habit. I can't see any reason why you would even want this... – Alvar Mar 3 '14 at 7:24
I just need it for some reasons and also for a few days, but tnx anyway :) – MSH Mar 3 '14 at 7:32

Here is a community wiki. Often many users advice you not to use Ubuntu this way. You have sudo anyway which elevates the privileges to root for a single command using your account password.

But, if you have a good reason to be root you can do that as well in Ubuntu.

Below are some useful links:

Unable to login as root from the login screen even though I have a root account

Re-enable graphical root-login on 12.04 LTS

share|improve this answer

You can do this by editing /etc/lightdm/lightdm.conf The default contents are just:


And you can just add:


Now logout and you'll see that there is no list of users in the login window.

so you can just write root as username...

If you want to return to old lightdm window that list all users just open /etc/lightdm/lightdm.conf file and remove the added line greeter-hide-users=true

share|improve this answer

Using Root as log in is not good, anyway if want it for some file management purpose, type "sudo nautilus" or "gksudo nautilus" whichever works in terminal and you can have your login as root.

share|improve this answer

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