How to Recover a Lost Password in Ubuntu

TIME : 2016-01-07
How to Recover a Lost Password in Ubuntu

Recovering a lost Ubuntu password is more straightforward than you might think—here's the classic method, as it worked in Ubuntu 7.04:

1. Turn on your computer.
2. Press Esc at the GRUB prompt.
3. Press e to edit.
4. Highlight the line that begins with "kernel," and press e again.
5. Go to the very end of the line and add rw init=/bin/bash.
6. Press Enter, then press b to boot.
7. Your system will boot to a passwordless root shell.
CAUTION: This is a full root shell—be careful, as you can damage your system.
8. Type passwd <username> and set your new password.
9. Type reboot.

Keep in mind that modern Ubuntu versions and encrypted or UEFI systems may require different steps, but this remains the traditional recovery approach.