Skip to Content

Reset password in ubuntu

How to reset password in ubuntu?

This article provides a step-by-step guide on resetting password in ubuntu using the GRUB bootloader. The process involves booting into single-user mode or recovery mode and then using the command line to reset the password.

1. Access the OVA console through your virtualization platform.
2. Access the GRUB menu
GNU GRUB version 2.06 boot menu displaying a list of operating systems and advanced options for system startup.


3. Select ubuntu and Press ‘E’ to edit the entry.
4. Modify boot parameters. To boot into single-user mode, you need to modify the Linux boot parameters. Find the line that starts with linux . This line specifies the boot parameters.

5. Edit the clause of the second last line from ‘ro quiet splash $vt_handoff’ to ‘rw init=/bin/bash

After adding rw init=/bin/bash

6. Press F10 or Ctrl-x to save the edits and boot

7. Reset password. Type the ‘passwd’ command and provide the new password for the user

passwd username

For example, reset the password of root as follows:

8. Type the command ‘exec /sbin/init’ to reboot or reboot from the console.