How to reset forgotten password?

To reset a forgotten password in a Linux environment, you can follow these general steps:

  1. Reboot the System: Restart your computer.

  2. Access Recovery Mode:

    • During boot, hold down the Shift key (for GRUB) or press the appropriate key to access the boot menu.
    • Select the recovery mode option (usually has "recovery" in the name).
  3. Drop to Root Shell:

    • In the recovery menu, choose the option to drop to a root shell prompt.
  4. Remount the Filesystem:

    • Run the following command to remount the filesystem with write permissions:
      mount -o remount,rw /
  5. Reset the Password:

    • Use the passwd command followed by the username to reset the password:
      passwd username
    • Replace username with your actual username. Enter the new password when prompted.
  6. Reboot the System:

    • After resetting the password, type exit or reboot to restart the system.

Note

If you're using a specific application or service (like MySQL), the steps may vary. For MySQL, you can refer to the earlier instructions on resetting the root password.

If you need further assistance, feel free to ask!

0 Comments

no data
Be the first to share your comment!