Getting into grub loader in Ubuntu Virtual Box machine

2

I have Ubuntu guest OS installed on Virtual Box on windows. But I have forgotten all passwords for user and root accounts. But when I try to get into grub by pressing escape at startup, nothing happens. How do I get into grub loader to change the password? Acually no grub menu is shown when it starts. Is there any other way to reset all the passwords?

pineapple

Posted 2010-11-20T14:48:13.470

Reputation: 1 724

Answers

1

You could mount the Ubuntu install ISO image as a CD, boot from CD and go into rescue mode to change all of the passwords, if you wanted.

To attach the ISO image to VirtualBox, go to Settings --> Storage and look for either the CD icon, or click on the CD icon with a plus on it. Step Onet If the ISO image you want isn't there, add it using the Virtual Media Manager. Step Two

Press F12 at boot to look at all of the VirtualBox boot options, and go from there.

Zoot

Posted 2010-11-20T14:48:13.470

Reputation: 435

1

Piece of cake. Just boot with the cd you installed from. Fire up a text editor and modify the line of /etc/shadow on your root partition for the user root (or your own user) to read:

jaroslav:mynotsosecretpassword:9797:0:::::

jaroslav is your username, mynotsosecretpassword is your new password. Leave everything else as it is.

Ярослав Рахматуллин

Posted 2010-11-20T14:48:13.470

Reputation: 9 076

1It expects a hashed password not clear text, so putting the password in the field won't work, you need to leave the field empty and then you can log in without a password. I.e.:

jaroslav::9797:0::::: – Von – 2012-07-31T19:52:25.163