Forgot your Ubuntu login password? You’re not alone. It’s one of the most common problems, especially on a computer you haven’t used for a while or right after changing your password. I’ve done it myself on one of my systems. Fortunately, resetting a forgotten Ubuntu password is easy using recovery mode, and you won’t lose any data.
How to Reset a Forgotten Ubuntu Password
1. Restart your computer. As it starts, hold the Shift key (on older BIOS computers) or press Esc repeatedly (on UEFI computers) to open the GRUB boot menu. If you have more than one operating system installed, the GRUB menu may appear automatically.
2. Select Advanced options for Ubuntu, then select the entry that ends with (recovery mode) and press Enter.
3. In the Recovery Menu, select root (Drop to root shell prompt) and press Enter. Press Enter again if asked. You’ll now see a root command prompt.
4. The disk is mounted as read-only in recovery mode, so remount it with write access, so that your new password can be saved:
mount -o remount,rw /5. If you’ve forgotten your username as well, list the user folders with:
ls /home6. Reset the password by typing passwd followed by your username. For example, for the user kroshan:
passwd kroshanType the new password twice when asked (nothing appears on the screen while you type; that’s normal). You’ll see the message password updated successfully.
7. Restart the computer:
rebootYou can now log in with your new password.
Note: If your home folder is encrypted, or you use a keyring for saved passwords, you may be asked for your old password to unlock the keyring after logging in. In that case, you can create a new keyring. Also, anyone with physical access to a computer can use this method, so protect sensitive data with full-disk encryption.


really wanted this..
your article are always easy to follow, many thanks:)