I have a virtual Ubuntu 10.04 machine running under Hyper-V which I have lost the password to. With a physical Ubuntu box it's rather easy to press ESC at the grub prompt and proceed to reset your password. Unfortunately I can't see a grub menu and pressing ESC does nothing. Can anyone offer some advice for how to reset the password on this virtual machine?
Use a boot cd! - mount your root partition to /mnt/root/ - change /etc/shadow to root::[and so on] - OR type: "chroot /mnt/root passwd" - reboot, login with empty password or the new one you specified
While Craig's answer will definitely work, I discovered the following also works:
Apparently holding down the shift key or pressing it in a less manic fashion is not enough, as the window of opportunity is very small...