Home » How-To's

Changing root password in Ubuntu

16 July 2008 19 views 6 Comments

Four months back, I had installed Ubuntu on my laptop and completely forgot about that after the installation. Yesterday, when I tried to install Java and Netbeans IDE on Ubuntu, I had to do some admin works, but I dont remember what password I gave for the ‘root’ user during the installation. So, I thought I forgot the root password and I would have to re-install Ubuntu.

But, when searching on the Internet, I came to know that during the installation, Ubuntu do not ask any password for the root user (but I forgot this!). So, by default the root password is set to blanks. So, now I am happy that I don’t need to re-install Ubuntu. :)

But to change the root password in Ubuntu, which blanks by default, follow this step:

  1. Open Terminal/Command
  2. Type sudo passwd
  3. Ubuntu will ask you for current user password. Type in the current password and press enter.
  4. Now Ubuntu will ask you to enter the new password for the root. Type in the new password, confirm it again and you are done.PS: It is not possible to log-in as a ‘root’ user. I guess this feature is de-activated in Ubuntu.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

6 Comments »

  • arthur said:

    Good article,add Favorite to the Life Style website,the link here:

    http://bookmovie.org/IT/Changing_root_password_in_Ubuntu/

  • Shuva said:

    I guess that you should be able to reset the password even if you forget by booting into single user mode. (http://wiki.clug.org.za/wiki/How_do_I_reset_my_root_password%3F)

  • Shuva said:

    BTW, you have a very well designed personal site. Good score with the domain name too.

  • Veerasundar (author) said:

    @Shuva

    Thanks a lot four your comment on my website and for the Ubuntu link.

  • Kris Jones said:

    The information on your blog is actually incorrect. Ubuntu disables the root account so there is not password. Admin taks should be performed through sudo or gksudo.

    If your user is in the admin group, sudo will be available to you and all you need to do is type in your logged in user password.

    The thoughts behind this are that root is a potential security threat. Most hackers would attempt to bruteforce the root account knowing that this is an account that will almost always exist on unix/linux systems. By disabling root a hacker would also need you username.

    There are other security considerations which can be found through goolging

  • Veerasundar (author) said:

    @Kris

    Thanks for enlighting.

    This Wiki page has a text which explain how to change the root password in Ubuntu (the last section!).. I am still confused as I am new to Linux world! :)

    Anyhow, there are lot more to learn. Thanks for your comment.

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.