How to recover a Linux Mint / Ubuntu System’s Root Password

This article explains how to get your Linux system password reset.

To reset your lost or fogotten password:

  1. Reboot your computer / Turn your computer on.
  2. Hold down the Shift key at the start of the boot process to enable the GNU GRUB2 boot menu (if it does not show)
  3. Select the entry for your Linux installation
  4. Press e to edit.
  5. Use the Arrow keys to navigate to a line that looks similar to this:linux /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] ro quiet splash vt.handoff=7
  6. Change ro quiet splash vt.handoff=7 to rw init=/bin/bash so it now reads:linux /boot/vmlinuz-[kernel version]-generic root=UUID=[letters and numbers]\[letters and numbers] rw init=/bin/bash
  7. Press F10 to boot your system.
  8. Your system will boot up to a passwordless root shell.
  9. Type in passwd yourusername
    (if you have also forgotten your username, type cat /etc/passwd first to get a list of all users, yours should be at the end)
  10. Set your new password.
  11. Restart your system.

Reference:

https://community.linuxmint.com/tutorial/view/1355

Share this article

Leave a Reply

Your email address will not be published.

Scroll to Top