If you have forgotten your ubuntu password,please don’t worry,it incredibly easy to reset your password.
Just reboot your computer and select the recovery mode,which is usually the second line in Grub menu.
Then,you’ll see the Recovery Menu,choose “root Drop to root shell prompt” in this menu.
Now,you can use following command to change password.
cd /home passwd username
My username is wraith,so I use:
then,enter the new password and confirm.
Go back to Recovery Menu by this command,and choose “resume resume normal boot”
Now,you can login with the new password.