If you’ve forgotten your Ubuntu 11.10 Password you can reset it within minutes. I will tell you two methods to reset your Ubuntu Password. The first one is by booting it in recovery mode and second one is by using any Live OS.

Let’s start with the recovery mode first as it takes less time and easy to do in comparison to the second one method:

Boot up your Ubuntu. Press and Hold ‘Shift’ Key while the machine is booting. You will get the GRUB Menu like this:

Select the second option which is ‘Recovery Mode’ and press Enter. After pressing enter system will start booting and you will get a list of options like this:

After that we need to make the filesystem writable so that we can change the password. To make it writable select the 3rd option ‘remount’ and press Enter. After pressing enter you will get the following:

Press Enter here and you will get recovery menu with a list of options again:

Select the last option ‘root’ and press enter. If the root account password is not set then you will get a shell prompt like this:

Now you can enter commands to reset the password of any account.
#passwd <username>

Enter the new password and confirm it by entering again.

Now enter command ‘sync’.

Now Enter the command ‘reboot –f’ to reboot.

Now you can login with your new password.

Now if the root account is having a password then you will not get the shell at recovery mode. In this case you need to boot your ubuntu machine with any Live OS. I will be booting it again with Ubuntu 11.10.

Boot your machine with Ubuntu 11.10. You will get a screen asking to just try this as a live cd or install it on your machine:

Click on ‘Try Ubuntu’  to use it as a LIVE OS.

You will get desktop a live user.  Now you need to mount the file system to change the password. First we need to know the device name of the filesystem to mount. To get the name of device enter the command ‘sudo fdisk –l’

Now as you can see the system type of /dev/sda1 is Linux.
So we need to mount the device ‘/dev/sda1’.

To mount this device enters the following command.
#sudo mount /dev/sda1 /tmp

Now we need to enter the command ‘sudo chroot /tmp’  to get the shell on your filesystem:

Now we’ve got the shell we can change the password of any user by entering the command‘passwd <username>’