Posted: . At: 12:15 PM. This was 11 years ago. Post ID: 6212
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.

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 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.

1 thought on “How to reset your password in Ubuntu when running the distribution in Virtualbox.”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.