Recover Ubuntu Login Password
Reboot your computer, and keep clicking to shift till this screen appear …
then choose the second option ( recovery mode )
Then choose “Drop to root shell prompt” from this menu.
Changing the Actual Password
You can use the following command to reset your password:
For example my username being geek I used this command:
After changing your password, use the following commands to reboot your system. (The sync command makes sure to write out data to the disk before rebooting)