When you boot your system on single user or rescue mode in a Linux which starts handful of services at system boot for basic functionality to enable system administration tasks. When we do “su” to become root you must set a password for root in Debian-based system. The recommended way to become a root in Debian based system (Ubuntu, Linux Mint etc.), use “sudo su” or “sudo -i“. That lets you elevate as a root with your own password.
In this guide, we are going to see how to reset forgotten user password in a single user or rescue mode.
. Linux Mint 20 LTS installation guide with screenshots
. How to upgrade from Linux Mint 19.3 to Linux Mint 20 LTS Ulyana
Boot Linux Mint 20 on a Single User or Rescue Mode
Step 1: Reboot or Turn on your Linux Mint 20 system into Single User Mode.
Hold down the “Shift“ key and press “ESC” key during boot process to enable GRUB boot loader menu (if it doesn’t show).
Press “e” to edit GRUB boot loader.
Step 2: Add parameter “systemd.unit=rescue.target” at the end of line which starts with “linux“
Add “systemd.unit=rescue.target“ as highlighted in below screenshot.
Press “F10” or “Ctrl+X” to boot your system in rescue mode. Press “ESC” at at this stage to discard edits and return to the GRUB menu.