Ubuntu Installed on Virtual Machine.
How to Reset Ubuntu 11.10 Login Password
1) Power on your Computer, keep holding Shift key to access the GRUB menu.
2) Select the Option 2 that says Recovery Mode , and hit Enter .
3) After that, you'll get a second menu ( recovery menu ), select the 3rd option that says remount
4) That will make the filesystem writable, press Enter when it prompts you to go back to Recovery Menu
5) When you are back to the Recovery Menu, select the last option which says root
6) You'll Access the shell as root ( if the root is don't have a password )
7) Type the following command and press Enter : passwd username
Replace the word username with the username you want to access (e.g : razor )
8) Type the new password and confirm it. Then type the following command : sync
9) Done! Now just reboot your computer with this command : reboot -f
Note: You'll not have access to the shell if the root account is protected by a password (rarely)