How to Change the Ubuntu VB passwd?

How to Change the Ubuntu VB passwd?

ยท

2 min read

Table of contents

๐ŸŒŸ Are you faced with the daunting challenge of changing your password within Ubuntu VirtualBox? Fear not!

In this blog post, we unveil a step-by-step guide that will unravel the complexities and empower you to conquer the password-changing puzzle effortlessly.

Get ready to bid farewell to frustration and embrace the satisfaction of regaining control over your virtual machine experience. ๐Ÿ’ช๐Ÿ’ป

FOLLOW THESE STEPS:

  1. ๐Ÿ–ฅ๏ธ Start the Ubuntu virtual machine in VirtualBox.

  2. โŒจ๏ธ When the GRUB boot menu appears, select the default Ubuntu entry and press the "e" key to edit the boot options.

  3. ๐Ÿ” Find the line that starts with "linux" or "linux16" and contains "ro quiet splash".

  4. โž• At the end of that line, add init=/bin/bash. So the line would look something like: linux /boot/vmlinuz-<version> root=UUID=<UUID> ro quiet splash init=/bin/bash

  5. โŒจ๏ธ Press "Ctrl+X" or "F10" to boot with the modified options. This will start the system in a single-user mode.

  6. ๐Ÿ’ป The system will boot to a root shell prompt without asking for a password.

  7. โŒจ๏ธ Run the following command to remount the root filesystem in read/write mode:

     mount -o remount,rw /
    
  8. ๐Ÿ” Reset the password for the user by running the following command:

     passwd username
    

    Replace "username" with the actual username for which you want to change the password.

  9. ๐Ÿ”„ Follow the prompts to enter a new password and confirm it.

  10. ๐Ÿ”„ After changing the password, Reboot or Restart the System.

Once the system restarts, you should be able to log in with the new password you set. Remember to remove the init=/bin/bash from the boot options to avoid entering the root shell every time you boot.

In conclusion, navigating the realm of password changes in Ubuntu VirtualBox no longer needs to be a daunting task. ๐Ÿ‘ป

Did you find this article valuable?

Support Satyam Singh by becoming a sponsor. Any amount is appreciated!

ย