Wednesday, July 16th, 2008

Changing root password in Ubuntu

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.

{ 6 comments… read them below or add one }

arthur July 16, 2008 at 3:42 pm

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

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

Reply

Shuva July 17, 2008 at 5:17 pm

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)

Reply

Shuva July 17, 2008 at 5:18 pm

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

Reply

Veerasundar July 22, 2008 at 9:22 am

@Shuva

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

Reply

Kris Jones July 22, 2008 at 11:53 am

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

Reply

Veerasundar July 22, 2008 at 5:33 pm

@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.

Reply

Leave a Comment

Previous post:

Next post: