If you lost your password on Ubuntu, you can change it from the Recovery Mode, a console that let you a emergency access to some tasks on your PC such as this one.
ubuntu 9.04 ou older, you will have to press the Esc key.
ubuntu 9.10 ou later, you will have to press the Shift key.
In doubt, try to apply this trick with one of these two keys until it works.
- Start your computer and immediately press and hold one the previously mentionned key until a menu appears on the screen.
- With the arrow keys, move to (recovery mode) and press Enter,
- Once you are in the Recovery Meny, move to root in the list (you have to move until the end so it shows). Press Enter.
- Type passwd (your username), for example passwd chantal and press Enter. If you don't know your username, it will be shown at the end of a long list if you type cat /etc/passwd.
- Type your new password and press Enter. Retype your password and press Enter. Don't be surprised that nothing appears when you type your password, that is normal.
- Type reboot now and press Enter to restart your computer.