Linux – Can’t Reset Password – Ubuntu 10.04 on Hyper-V

grubhyper-v-server-2008-r2linuxpassword-recoveryubuntu-10.04

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?

Best Answer

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