How to reset your password
First, you have to reboot into recovery mode.
From the boot menu, select recovery mode, which is usually the second boot option.
After you select recovery mode and wait for all the boot-up processes to finish, you'll be presented with a few options. In this case, you want the Drop to root shell prompt option so press the Down arrow to get to that option, and then press Enter to select it.
The root account is the ultimate administrator and can do anything to the Ubuntu installation (including erase it), so please be careful with what commands you enter in the root terminal.
In recent versions of Ubuntu, the filesystem is mounted as read-only, so you need to enter the follow command to get it to remount as read-write, which will allow you to make changes:
mount -o rw,remount /
To reset the password, type
where username is the username you want to reset.
You'll then be prompted for a new password. When you type the password you will get no visual response acknowledging your typing. Just hit Enter when you're done.
Now the password should be reset. Type
to return to the recovery menu.
After you get back to the recovery menu, select resume normal boot, and use Ubuntu as you normally would—only this time, you actually know the password!
Please note that some graphic drivers require a full graphical boot and so will fail when resuming from recovery. Simply perform a standard boot.
Linux Mint 13 Cinnamon (64 bit) with Kernel 3.12, Quad core AMD A8-3870 APU with Radeon HD Graphics 6550D, 8GB DDR3, 1600MHz
Microsoft-free environment since 1996