Changing the Authentication Password in Ubuntu

This post will deal with recovering or rather changing the authentication/root password of your system . You might often encounter the need to do this . Maybe you’ve simply forgotten your password , maybe someone else installed the OS on your system and left you in dark of the authentication password or maybe you just want to hack into a system . This post is ofcourse aimed at home desktop users .

So the steps involved in changing the root password is actually quite simple .

Step 1 : Drop in to the Root Shell .
Right after your boot begins , i.e after the BIOS screen , you’ll see the Grub screen in multiple OS systems . If you use a single OS system(only Ubuntu) you need to hold down the shift key , this will bring up the Grub menu . Choose advanced options .

The Grub Menu
The Grub Menu

Now this will lead you to another screen where you choose the “recovery mode”. Enter the recovery mode .

Now choose the recovery mode
Now choose the recovery mode

Now from the recovery menu , choose the root – drop to root shell prompt option .

blog3

NOTE : You now have root privileges and please be careful with the commands you use .

Step 2 : Change the mounted filesystem to read/write
In most contemporary versions of Ubuntu the file system is mounted as read-only . Any command to change the password as of now would result in the error-message “Authentication token manipulation error”.
So type in

mount -rw -o remount / 

Step 3 : Enter the New Password
Now all you need to do is enter a new password for your root and you are done . You can now have root privileges in your system .
For this you type in

passwd username 

If you are unsure of the username then use the command

ls /home 

This will show your username .
Now type in

passwd username 

(i.e is the output of the “ls /home” command)
Now you’ll be prompted to enter the new password. Enter the new password , confirm it again and you are done .

blog4

You have successfully gained root access to a system .

Now type

 exit

and continue with resume normal boot from the recovery menu.

Hit the Enter Key to proceed with normal boot
Hit the Enter Key to proceed with normal boot

.Drop in your suggestions/queries if any in the comments section . Hope this was of some help to you.

A Merry Christmas and Happy New Year in advance .

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s