In Linux (Ubuntu),I am going through with a lot of problems. In ubuntu, I haven't got any root user. So, I have to apply sudo bash at every Instance. I just want to create a root user, from which I can login and have all the privileges.

  • 4
    Don't log in as root. Ever. Really. The answers below have plenty of reasons why not. I just wanted this warning at the top. – msw Aug 26 '13 at 12:42

Warning: Enabling root is not recommended. If possible, you should always try to perform all administrative tasks using sudo. [as noted in the referenced page]

In Ubuntu root is present but has no password assigned. All you need to do is issue:

sudo passwd root

And define a new password for this user. Reference

  • and from where I can login? Since In the welcome screen It doesn't have a user named root – Ritzz081 Aug 26 '13 at 5:58
  • If you are going to reference a page that begins with a warning, it's probably a good idea to copy that warning too. – msw Aug 26 '13 at 12:49
  • @Ritzz081 it is explained on thequestion 2 of the link Ive provided you. – vfbsilva Aug 26 '13 at 12:50
  • How do I undo this once I don't need it anymore? – Gabriel Fair Dec 31 '18 at 7:12
  • sudo passwd -l root – vfbsilva Dec 31 '18 at 14:52

You need to read the official - Ubuntu User Guide

NOTE: be very careful using root!

To make it clear for your answer:

If you are referring Ubuntu desktop, You don't see the username root you will see the username you have been created during the installation:

enter image description here

If you need to use root privilege on terminal after you login.

You need to use

sudo [the command you would like to run] 

It will ask you your default username password which already has root privilege.

or you can use full root by:

sudo su
  • you can also use sudo -s – Lluís Aug 26 '13 at 8:55
  • @Achu you are wrong,look at the documentatio: By default, the Root account password is locked in Ubuntu. This means that you cannot login as Root directly or use the su command to become the Root user. However, since the Root account physically exists it is still possible to run programs with root-level privileges. This is where sudo comes in - it allows authorized users (normally "Administrative" users; for further information please refer to AddUsersHowto) to run certain programs as Root without having to know the root password help.ubuntu.com/community/RootSudo – vfbsilva Aug 26 '13 at 12:48

Please look at the man page for sudo again; realize that a valid sudo command is:

 sudo /bin/tcsh

Thus you will get a root shell, thus you really DO NOT need to login as root.

  • Please edit /etc/lightdm/lightdm.conf, append two lines as the following:

  • greeter-show-manual-login=true

  • allow-guest=false

  • And then reboot your Ubuntu, you can input any username to login the system, include root user. If you do not set root password, please use sudo passwd to set new password for root user.


I got an easy way to do the same using gksu nautilus.

Using this had helped me to obtain root privilages without using any terminal or so.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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