How to reset your password in Ubuntu when running the distribution in Virtualbox.

How to reset your Ubuntu password when you are running in Virtualbox.

The Ubuntu distribution works quite well in Virtualbox, but sometimes you can forget the password for the user you created and you need to reset the password. This is very easy.

  1. Firstly; boot your Virtualbox instance.
  2. Then hold the shift key to get the GRUB menu.
  3. Select the recovery mode option.
  4. Choose to drop to a root shell prompt.

Just type these commands after loading the rescue mode and you can re-set the password.

Remount the / partition in read-write mode. Use the mount command to achieve this.

~# mount -rw -o remount /

Then use the passwd command to reset your Ubuntu password.

~# passwd <USERNAME>

Where <USERNAME> is the username you have created on installation.

This will reset your Ubuntu password. I had an error with setting the Ubuntu password in single user mode, this mounts / in read-only mode. so you need to use the remount command to enable you to write to the /etc/passwd file.

About Author

John Cartwright
Linux user that loves sharing all kinds of Linux information with the world. I love Linux and sharing information about how to use it and get the best out of your desktop is the best way to give back to the community.

1 Comment

  1. Pingback: Setting up Virtualbox to run Ubuntu 13.10. Very easy when you have the resources. | Securitron Linux blog.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>