Reset password in ubuntu
How to reset password in ubuntu?
Overview: This article explains how to reset a user password in Ubuntu by editing GRUB boot parameters and using single-user mode.
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.
Step 1: Access the OVA console through your virtualization platform.
Step 2: Access the GRUB menu
Step 3: Select ubuntu and Press ‘E’ to edit the entry.
Step 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.
Step 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
Step 6: Press F10 or Ctrl-x to save the edits and boot
Step 7: Reset password. Type the ‘passwd’ command and provide the new password for the user
root@(none):/# passwd username
For example, reset the password of root as follows:
Step 8: Type the command ‘exec /sbin/init’ to reboot or reboot from the console.
Related Articles:
How to set MySQL root password