Passwords provide the first line of defense for our digital assets by restricting access to authorized users only. However, we often forget passwords, especially if we don‘t use them regularly.

Resetting a forgotten password can be tedious. Thankfully, Linux offers various password recovery options that make the process straightforward. In this comprehensive guide, we will discuss multiple methods to reset your forgotten Linux Mint password.

Overview

Here is a quick overview of the password reset methods we will cover:

  • Using the GRUB menu
  • Booting into single user mode
  • Using a Linux live USB
  • Resetting from the root terminal

We will provide step-by-step instructions for each method along with screenshots for clarity. Let‘s get started!

Prerequisites

Before we reset the password, ensure that:

  • You have physical access to the Linux Mint machine.
  • The system is configured to boot from the hard drive first. Check the boot order settings in BIOS if unsure.

Method 1: Using the GRUB Menu

The GRUB bootloader menu provides access to the Linux kernel before loading the operating system. We can use it to modify kernel parameters and reset passwords.

Follow these steps:

  1. When your system powers on, press and hold the Shift key to open the GRUB menu. You may have to press it many times.

    GRUB Menu

  2. Highlight the default boot option, press E to edit it.

  3. Add rw init=/bin/bash at the end of the linux line:

    Edit Kernel Parameters

  4. Press Ctrl + X or F10 to boot with changed parameters. The system will now boot into emergency bash shell.

  5. Type the passwd command to reset root or any user‘s password:

     passwd root
     New password: 
     Retype new password: 
     passwd: password updated successfully
  6. Now type reboot to restart the system with new password.

This method lets you reset password by interrupting the normal boot process. Next, we will see how to use single user mode to achieve the same.

Method 2: Boot into Single User Mode

Single user mode starts Linux with bare minimum processes running in a root shell. We can leverage it to reset forgotten passwords.

Follow these steps:

  1. Reboot your system and press Esc or Shift key to enter GRUB menu.

  2. Highlight the default boot entry and press E.

  3. Go to end of linux line and append single parameter:

     linux /boot/vmlinuz-5.4.0-122-generic.efi.signed root=UUID=dfb44cdd-5f4f-47b9-9dc1-caf3ba4b6f4d ro recovery nomodeset single
  4. Press Ctrl + X or F10 to apply changes and continue booting. The system will now enter rescue mode with root shell access.

  5. Use the passwd command to set new root or user password:

     passwd root 
     New password:
     Retype new password:
     passwd: password updated successfully 
  6. Now type exit to continue normal boot. Login using the new password.

The single user mode offers more controlled environment compared to previous method. Next, we‘ll use Linux live USB to reset forgotten password.

Method 3: Using a Linux Live USB

This method involves creating a live Linux environment from USB to manipulate root file system of installed OS partition. Follow these steps:

  1. Download Linux live ISO (Ubuntu, Linux Mint etc).

  2. Create a bootable USB drive for it using Rufus or Etcher tool.

  3. Insert the USB and boot your system into the live environment.

  4. Mount the root partition of installed Linux Mint on /mnt directory:

     mount /dev/sda2 /mnt
  5. Bind few system directories:

     mount --bind /dev /mnt/dev
     mount --bind /proc /mnt/proc 
     mount --bind /sys /mnt/sys
  6. Now chroot into mounted partition:

     chroot /mnt /bin/bash
  7. Use passwd command to set new root password:

     passwd
     Enter new UNIX password: 
     Retype new UNIX password:
     passwd: password updated successfully
  8. Exit chroot, reboot and login with new password:

     exit 
     reboot

This method allows resetting password without tampering installed system files. Finally, we will use root terminal to change password.

Method 4: Resetting Password From Root Terminal

You can easily reset forgotten password from the root terminal, if you remember root credentials. Follow these steps:

  1. Open Linux Mint terminal by pressing Ctrl + Alt + T.

  2. Switch to root user using:

     sudo su
  3. Enter current root password when prompted.

  4. Use the passwd command now:

     passwd mint
     Enter new UNIX password:
     Retype new UNIX password: 
     passwd: password updated successfully
  5. Repeat above steps to reset any other user‘s password.

  6. Exit root shell and login with new credentials:

     exit

This method works only if you know existing root password or can sudo to root shell.

Troubleshooting Common Issues

Here are some common issues and fixes while resetting Linux Mint password:

  1. System boots directly without showing GRUB menu: You can access the menu by pressing Shift or Esc key multiple times. If that doesn‘t work, consider tweaking GRUB configuration file.

  2. Can‘t see single user mode boot messages: Single user mode disables splash screen. If your system boots directly into GUI, press Esc key to view console messages.

  3. Wi-fi or sound doesn‘t work in live environment: Some hardware drivers may not load properly in the live OS. Using Ethernet connection is recommended.

  4. Mounted drives are read-only: Use mount -o rw,remount /mnt to remount root partition in read-write mode.

  5. Can‘t chroot due to missing shared libraries: Bind mount essential directories using -o rbind option before chroot.

  6. Root password unknown: Boot using live USB and check /etc/shadow file on mounted partition to find the encrypted hash. Reset it using Method 3.

With some careful troubleshooting, you should be able to reset forgotten Linux Mint password using one of the methods above.

Conclusion

In this comprehensive guide, we explored multiple password reset techniques including using GRUB menu, single user mode, Linux live USB and root terminal access. Each method has its own pros and cons.

My favorite is using a live USB – it is reliable, foolproof and works across all Linux distributions. Memorize essential steps to create live USB, mount partitions, chroot and reset password – this will help you out in sticky situations.

I hope you found this guide helpful. Resetting a forgotten password is no more a tedious affair on Linux. Try out different methods and choose one best suited for your scenario. Let me know in the comments about any other approaches you take!

Similar Posts