How to Reset Forgotten Password in Ubuntu
When the computer starts booting, press the [Esc] key.
This will show you the boot menu.
Use the Up/Down arrow keys to select Recovery Mode,
then wait for the computer to completely boot up.
You will get a command prompt,
and you will be an administrator.
If you aren’t sure of your username,
just do a directory of the /home folder,
and you will see all of the registered users on the computer.
Once you know the username, now its just a simple matter
of executing the following command:
#passwd username
Put the password
Retype the password
Now you are ready to reboot with your reset password.
#reboot
After it finishes booting, just enter the password that
you reset it to, and you are in!