Tuesday, July 22, 2008

How to login as root on Ubuntu  

Many people want to know how to obtain root permission on Ubuntu no matter su command or login x window.
The root passwd have never been configured when you install ubuntu first time.
You can use below command to change root password.

$sudo passwd root

Now, you can use su command as below.

$su -
#

root_1

You can follow below diagram if you want to login the window as root privileges.

  • 1. Select Login Window option System --> Administration --> Login Window
  • root_2

  • 2. Please click this option --Allow local system administrator login
  • root_3

  • 3. Switch normal user to root
  • root_4

  • 4. You can login as root now.
  • root_5



    Stumble Upon Toolbar Digg! diigo it

    Related Posts by Categories



    12 comments: to “ How to login as root on Ubuntu

    • Riccardo

       

      I wouldn't recommend login as root, there are more viable options like:
      - Alt + F2: gksudo nautilus (this gives you a root filemanager from which you can launch any program as root)
      - from the terminal: sudo su - (this will lead to a root console).

      Both will last until you close them, so I really don't see the point of logging in as root.
      My 2c of course :-)


    •  

      try

      sudo su -


    •  

      Actually, I know these commands and I just summarized how to do it to help who need it.

    • Simon

       

      Yeah sure Sudo su- is nice and all but FFS I am using 2 screens with an NVIDIA Card and to make sure both come up automatically I have to run Xserver in root and its WAAAAAAAAAAY easyer to log in as root to do so than to go through a command line and it pisses me off that ubuntu doesnt give the right to a local admin from start, Im sorry but thats just stupid... "Oh but what if you install it somewhere and you dont want it ?? its better that its off from the start... " No its not you wanna install it somewhere and cut the right to the local admin well remove it ... im sorry but That pisses me off that something so stupid like that happens on a brilliant OS like linux...

    • Anonymous

       

      Root login is required to download virus signatures for the clamtk virus scanner. Not allowing root login on ubuntu leaves us without a user friendly means of virus protection.
      meangenegjco

    • alexander "the great"

       

      as far as using sudo su and entering a root prompt, that is fine, and i'd prefer using that. but this GUI way is great for people who are moving from windows or macintosh were everything they probably did was GUI, i never heard of a mac owner using command prompt (what a shame) and some of the more advanced windows users (like me) use it all the time. but trying to get open source more popular means catering to the not so technical users, though they should probably call an expert for help...but at one point we where all aimlessly clicking to see what happened...(^_^)


    •  

      As a Unix Admin from years back, this idea of 'su is the best approach' is bogus. Ot are all of you former M$ clones so fearful that you know of no other way?

      Logging in as root is necessary, expecially if you are doing long and labor-intenseive fixes/upgrades.

    • Anonymous

       

      I have a user account I use for what not when I'm just using the computer, and then I have a root account if I'm going to be spending a lot of time adjusting things overall for any user account on the machine. It's faster and painless and I can log in and out as I need to. I don't use it often, but when I do it's much easier.

      - Nate


    •  

      You're instructions don't work for Ubuntu 10.10. There's no Login Window, just a Login Screen. This doesn't have an "Allow local system administrator login" option.

    • Anonymous

       

      it still works, you can skip
      "1. Select Login Window option System --> Administration --> Login Window"
      and
      "2. Please click this option --Allow local system administrator login"

      instead just switch user and login with
      username: root
      password: the one you entered earlier


    •  

      there is a user root off course, but this user is not visible in the gui of 10.04. so I cannot switch to that user

    • Anonymous

       

      "sudo su - " grants root access on Ubuntu 10.04 LTS.

      Is that a better security? I hope the folks at Ubuntu drop their foolish security scheme and return to the old ways, until something better is set up.