You cannot recover the original password but you can change it to enable log in.
Hold down the Shift key when you boot until you get the Grub menu.
Choose the item (usually the second one) that reads something like Ubuntu, with Linux ... (recovery mode).
When it boots, select the option "root -- Drop to root shell prompt".
You will see a flashing cursor. Type the following and press Enter:
passwd user
but replace "user" with your username. Type the new password when prompted (twice).
Then press Ctrl-Alt-Delete to reboot normally.
Credit to the original author here.