Here we’ll discuss, how to reset Ubuntu password from your Live CD. For this, either you need a Live CD of Ubuntu or a flash drive in which Ubuntu Live CD has been installed.
- Now for resetting the password first insert your Live CD/flash drive, whatever you have. When booting with that choose “Try Ubuntu without any change to your computer” from the boot menu.
- Now after Ubuntu has opened open the Terminal form Applications -> Accessories.
- To know on which drive your Linux is installed type “sudo fdisk –l” on the terminal(without quotes). Most probably it will be /dev/sda1.
- You have to create a virtual directory to mount the hard drive on. For this type “sudo mkdir /media/sda1”.
- After this enter “sudo mount /dev/sda1 /media/sda1”. It will mount the hard drive in the /media/sda1 folder.
- Now comes the main command. Enter “sudo chroot /media/sda1” in the terminal. 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.
- For changing the password you need to use the passwd command. We entered “passwd techylabs”, all you need to do is replace techylabs with your own username.
- Enter the new password and confirm it. That is it, you have successfully changed your password in Ubuntu and you will be able to login with it.
NOTE: All the commands should be entered without the quotes( “…” ).
Related posts:











