If you have a single boot (only u buntu), to get the boot menu to show, you have to hold down Shift key during bootup.
From boot menu, select recovery mode, which is usually the second boot option.
Once you're at the root shell prompt, if you have forgotten your username as well
To reset password
Where username is the username you want to reset. In this case, I want to reset Adi password
Now the password should be reset
After you get back to the recovery menu, select resume normal boot