How to reset the root password in Ubuntu

If you are a Linux newbie, there is lots to learn. Ubuntu takes all the pain away from that learning and makes it fun. Ubuntu is the most friendly and the most popular distribution so far. However, sometimes even the learned users on Ubuntu can forget their root password and can be stuck. This step by step article shows you in a very easy steps as how you can reset the root password on a Ubuntu desktop in under 5 minutes. There are numerous way of resetting the root password (eg; booting into rescue mode etc), however this is the best, smallest, friendlies and quickest.

 

Before I start, I will like to mention a couple of things which might come as a surprise to even a not so newbie user on Ubuntu. By default, you will need "sudo" (stands for substitute user) privileges to install or change any system level programs or features due to security. This password will be the same as the password you had set when installing Ubuntu. Root is a different user altogether, some folks tend to thing that by default Ubuntu does not have a password set for root, thats why when you do the "su" command and try and provide the root password, it never works. This is a misconception, root always has a password but its not revealed by default, because Ubuntu designers do not want you to be logging on as root for good security practices.

Ok, so lets get started. Our tutorial assumes you have Ubuntu 8.10 or higher installed (the procedure is same even on lower versions), and you can log on as a normal user, but not as root, simply because you do not know the root password

 

Step 1:

- Reboot your machine, when you are at the reboot screen on the "Grub Boot Loader" menu screen (shown in the picture here), press the escape key, it will present you with a menu as shown in step 2

 

Step 2:

- Pressing ESCape in the previous step will bring you the menu as shown here

 

Step 3:

- Highlight the line that begins with the word "kernel" then press 'e' on your keyboard to edit it

 

Step 4:

- Now add the following at the end of the line that you are editing, exactly, without the quotes "init=/bin/bash" and hit enter

 

Step 5:

- You will now be sitting at the shell prompt logged on as root without specifying a password

 

reply to comment

Nice post. it really a sophisticated and briefly posted. a person without itil training can understand it. Actually password is always created problem for me but now I think I can solve this