How To Reset Your Password In Ubuntu Linux

Did you forgot the password for your Ubuntu Linux installation? You can reset it easily. All you need is the Ubuntu live CD or a bootbale Ubuntu USB flash drive.

How To Reset Your Password In Ubuntu Linux

To reset the Ubuntu Linux password, first insert your Live CD/flash drive and restart the computer. While booting, choose “Try Ubuntu without any change to your computer” from the boot menu.

How To Reset Your Password In Ubuntu Linux

After Ubuntu is loaded, open the Terminal form Applications > Accessories.

How To Reset Your Password In Ubuntu Linux

To know on which drive your Linux is installed type:

sudo fdisk –l

Most probably it will be /dev/sda1. Now you have to create a virtual directory to mount the hard drive on. For this type:

sudo mkdir /media/sda1
sudo mount /dev/sda1 /media/sda1

This will mount the hard drive in the /media/sda1 folder.

Now comes the main command. Type:

sudo chroot /media/sda1

It will open up a shell in a different root directory. Here we will use the the folder where the hard drive was mounted previously.

How To Reset Your Password In Ubuntu Linux

To change the password now, you need to use the passwd command. Type:

passwd techylabs

Replace techylabs with your own username.

How To Reset Your Password In Ubuntu Linux

Now enter the new password and confirm it. That is it, you have successfully changed your password in Ubuntu Linux and you will be able to login with it.

share on twitter

Leave a Reply

© 2009-2013 TechyLabs · All Rights Reserved
A threeroutes media Publication