Home

  • Contact
  • Forum
  • Free Ubuntu E-Books
  • Popular Posts
  • Search
  • Ubuntu Hosting
  • About
  • RSS Feed
  • Sitemap
  • Privacy Policy

Ubuntu Geek

Ubuntu Linux Tutorials,Howtos,Tips & News | Zesty Zapus,Artful Aardvark

Enable and Disable Ubuntu Root Password

Posted on December 15, 2006 by ruchi 14 Comments

Sponsored Link
Ubuntu is one of the few Linux distributions out there that will not enable the root account.If you want to do something with root permission on the console you have to type sudo before the command.


sudo" means superuser do. "sudo" will prompt for "Password:". Please specify user password

As you have noticed during the Ubuntu installation there was no question about the root password, as you might have been used to see during other Linux distribution installation process.Because of this your root accout is inactive.

If you want to enable root account (which is not recommended) enter the following command.

$sudo passwd root

This will prompt for a new root password and once you confirm it, you can start using the root account to login.

If you want to disable root account in ubuntu you need to lock the root account by using the following command

$sudo passwd -l root

If you want to work on a root console you'd better use the following command

$sudo -i

Related posts

  • UFW (Uncomplicated firewall) For Ubuntu Hardy (27)
  • Share your Ubuntu Desktop Using Remote Desktop (87)
  • Securing SSH Using Denyhosts (10)
  • Securely Administer Your Ubuntu Server Remotely (0)
  • scponly – limited shell for secure file transfers (5)
  • Rescue an encrypted LUKS LVM volume (10)
  • Policykit – Gaining visibility in the administrative user interfaces (2)

14 thoughts on “Enable and Disable Ubuntu Root Password”

  1. koenig on April 27, 2007 at 4:24 pm said:

    One of the first things to do, after an installation! 😉

  2. Michael Gross on June 23, 2007 at 6:53 am said:

    BTW, thanks for a nice post. It was just the information I needed.

    Just wanted to alert you to a missing step in your HOWTO. After entering the passwd command as sudo, the system prompts you with “Password:“. There is no mention of this and it may be confusing to a new user that has never issued a command as sudo.

    Thanks again for all the wok that goes into keeping this site going. It’s a nice resource.

    –mg

  3. julie on August 4, 2008 at 4:05 pm said:

    Hello,

    This is a good guide to enable and disable the root password.

    If you are using Unbuntu, then by default there is no password set for the root user. In order to log onto root, you have to initially create your own password. this password will be the password that you set for the first user that you created while installing the OS.
    To manually set the password type “sudo passwd” into the command shell and then confirm your password.

    I hope that it will help.

  4. Jack on November 29, 2008 at 5:44 am said:

    It looks good. I will reply if this works.

  5. emanuel on March 1, 2009 at 7:49 am said:

    Please take a look in this : https://help.ubuntu.com/community/RootSudo

    the root account password is not missing, but ubuntu made it inactive to increase their security. so even the first user wont be able to access it unless he/she did the aforementioned how-to.

    anyway there is always sudo/gksudo command to access root privileges temporarily.

    regards.

  6. Nimal on May 8, 2009 at 7:26 am said:

    hii,if you want enabled first you can use
    sudo -s
    now you in root console.
    then you can type $sudo passwd root
    after than you can reset root password..

    Thanks

  7. Ray on June 11, 2009 at 11:57 pm said:

    Hi, I tried the above, but K says logon with root is prohibited. With K 8.04 I could open files in the root folder (eg. WWW, so I could add files to Apache), by clicking on the folder and choosing, “open as.” K-4 does not give this option, and as a result I can’t add new files to the folders in VAR/WWW/etc.

    Any suggestions as to how to get around this would be appreciated.

    Thanks, Ray

  8. M. Canuel on October 30, 2009 at 8:04 pm said:

    I have always run Windows as admin with no pw or login. From Win98 to Win 7. Never had a virus I didn’t want. I want this ability in Ubuntu 9.10. No login no pw and always admin (root if needs be). This is a single user machine . . . I don’t care if everyone says yea or nay I just want it this way. How do I do it? Ubuntu is almost there butt when I went to add some skins and it wouldn’t let me paste into the folder I lost it. No passwords, no hidden folders no pissing around. How do I do it?

  9. freislyn on December 15, 2009 at 3:03 am said:

    this happening to me

    freislyn@freislyn-laptop:~$ $sudo passwd root
    passwd: You may not view or modify password information for root.
    freislyn@freislyn-laptop:~$ $sudo passwd -l root
    passwd: Permission denied.
    freislyn@freislyn-laptop:~$ $sudo -i
    -i: command not found
    i need help

  10. David Perry on January 20, 2010 at 4:12 am said:

    You dont type the $sudo… you only type sudo

    $ is the cursor kinda like
    > in dos

    $ for ubuntu terminal
    > Dos 🙂

    Im still new to this so if Im wrong and you CAN type $sudo then I stand corrected 🙂

  11. Barret Bondon on July 29, 2010 at 5:31 am said:

    without root access much of Version 8 seems not to be working; indeed all of the network features with windows and USB drives fail with security messages. This “control” is , at it’s heart, childish (in it plays parent). We are adults here, yes ? Perhaps not; so much for Ubuntu for now. I need to get work done.

  12. Gebrehiwet on November 27, 2010 at 8:58 pm said:

    it ignore me??
    what shall i do??

  13. PC Maint on June 5, 2011 at 10:26 pm said:

    Start nautilus as root and you can move files around and change their permissions easily.

    Alt-F2
    gksu nautilus
    enter your password used at install time

    You now have nautilus as root.

  14. dinesh on September 16, 2011 at 9:22 am said:

    Hello Sir,

    This is a good guide to enable and disable the root password.

    If you are using Unbuntu, then by default there is no password set for the root user. In order to log onto root, you have to initially create your own password. this password will be the password that you set for the first user that you created while installing the OS.
    To manually set the password type “sudo passwd” into the command shell and then confirm your password.

    I hope that it will help .

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

« Monitor your Ubuntu System with saidar
Change Ubuntu System from DHCP to a Static IP Address »

Sponsored Link

    Cheap Web Hosting

Categories

  • Backup
  • Free Books
  • General
  • Monitoring
  • Networking
  • News
  • Package Mgmt
  • Security
  • Server

Sponsored Link

Archives

RSS Feed

subscribe to the ubuntu Geek RSS feed

UbuntuGeek on Twitter

    Follow Us on Twitter

Support UbuntuGeek

Favourite Sites

Debian Admin
DebianHelp
Tuxmachines
  • Contact
  • Forum
  • Free Ubuntu E-Books
  • Popular Posts
  • Search
  • Ubuntu Hosting
  • About
  • RSS Feed
  • Sitemap
  • Privacy Policy
Copyright © 2016 Ubuntugeek - Ubuntu Linux Howtos and Tutorials All Rights Reserved.