How to: Login as root in Ubuntu

ADVERTISEMENT

One of the reasons why Ubuntu, and Linux in general, is so secure is because the permissions to change any part of the system is tightly controlled. Most changes require entering the user’s password (which will alert the user of malware if a prompt comes up without having done anything). It is interesting that Windows Vista has taken this approach several years decades after Linux has had this.

Trying to log in to Ubuntu as a root user can be like banging your head on a rock. Sometimes, crucial configuration changes require logging in as root user. This tutorial will show you how to log in to Ubuntu as root. You have to make two changes before you can log in to Ubuntu as root.

  • Set the root password: Go to System> Administration> Users and Groups. Select “root”. Click Unlock, enter the password for the account you are logged into as, and hit close. Then, click Properties, select “Set password by hand”, and set the root password.
  • Enable the root login: Go to System> Administration> Login Window. Click Security tab. Check “Allow local administrator login”. Click on OK.
  • Log out, then enter root for user name and the password you set in the first step and click Login.

Also see: How to install Arial, Verdana and other fonts in Ubuntu, other Ubuntu tips

Note that logging in with root account should be used only for the most essential purposes (usually changing system files for configuration). Logging in as root account presents serious security problems, and can leave you vulnerable to attacks (because any hacker knows that there is a root account). For added security, disconnect your internet (switch off/disconnect modem) before logging in as root.

ADVERTISEMENT

You've read the post. Now what?

Click here to sign up for free email newsletter (latest articles to your inbox)

Like us on Facebook to get notified of our latest articles

Follow on Twitter to get notified of our latest articles

Recent search terms
Visitors recently searched the following terms to reach this page:
hardy heron login as root, ubuntu 8 04 login as root

Discussion

  1. When the grub loads select the recovery mode

    There you willget some think like
    root@computer#
    use
    there you will be asked to set new unix password
    confirm the password
    now restart
    when the login screen appears select other then use username root
    and password that you selected there

  2. @xenomorf: This has been tested on Ubuntu Hardy and Intrepid. Did you try the steps properly?

  3. i try to use the SU in the terminal but it say, Authentication Failed. why is that?

  4. @Izkata
    Logging in as root is not safe, but there might be other situations where logging in to root is easier (as I had to when setting up graphics).

  5. In that case, “sudo nautilus” or “gksu nautilus” – there is NEVER a need to log in as root.

  6. @Aled: The only problem with sudo will be when you need to do several complex edits. I had to do it (hacked several files) to get my unconventional modem working, and I’m sure there are others who face the same problem. This guide is targeted towards such folks.

  7. What about using ‘sudo su -’ that will log you in as root on the terminal without the need to use the root password, rather more just your own password. At least, that’s how I’ve done it, if I’ve been missing something vital please do tell me, I’m always willing to learn more about linux.

  8. @Jon: Using sudo is the better way out, but if you have to do more complex tasks, say editing config files for hardware (I had to do that for my modem), using root account is the best option.

Comments are closed.