Getting your Trinity Audio player ready...
|
If you’ve forgotten your password for your Linux Mint login, don’t worry—there’s a straightforward way to reset it using the root access available through the GRUB menu. This process works because Linux Mint, like most Linux distributions, allows you to access a recovery mode or single-user mode to perform administrative tasks, such as resetting a user password. Below, we’ll guide you step-by-step to regain access to your system. This assumes you’re using a standard Linux Mint installation with GRUB as the bootloader.
Steps to Reset Your Linux Mint Login Password
1. Boot into the GRUB Menu
- Restart Your Computer: Shut down or reboot your Linux Mint system.
- Access GRUB: As the system starts, hold down the Shift key (or press Esc repeatedly, depending on your setup) to bring up the GRUB menu. You’ll see a list of boot options.
- Timing: You need to press the key right after the BIOS/UEFI screen disappears but before Linux Mint starts loading.
2. Edit the GRUB Entry
Select Your Kernel: Highlight the default Linux Mint entry (usually the top one) but don’t press Enter yet.
- Press ‘e’: This opens the GRUB editor for that entry.
- Find the Kernel Line: Look for a line starting with linux that includes parameters like ro (read-only) and possibly quiet splash. It might look something like this:
linux /boot/vmlinuz-5.15.0-73-generic root=UUID=your-uuid-here ro quiet splash
-
Modify the Line: Replace ro (read-only) with rw (read-write) and add init=/bin/bash at the end. After editing, it should look like:
linux /boot/vmlinuz-5.15.0-73-generic root=UUID=your-uuid-here rw init=/bin/bash
-
Why: rw mounts the filesystem as writable, and init=/bin/bash boots directly into a root shell, bypassing the login.
3. Boot into Single-User Mode
- Press Ctrl + X or F10: This boots the system with your modified settings.
- Root Shell: You’ll drop into a command-line prompt (e.g., bash#) with root privileges. There’s no login required here.
4. Reset Your Password
- Sync Filesystem (Optional): If the prompt seems unresponsive, type sync and press Enter to ensure the filesystem is ready.
- Change Password: Type the following command and press Enter:
passwd
- You’ll be prompted to enter a new password twice. Note: You won’t see the characters as you type (this is normal in Linux terminals).
- Example:
Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully
- If you know your username and want to reset that specific account (not root), use
passwd your-username
5. Save Changes and Reboot
- Sync Changes: Type sync and press Enter to write the changes to disk.
- Reboot: Type reboot or press Ctrl + Alt + Delete to restart the system.
- Normal Boot: Let the system boot as usual (no need to hold Shift this time). You should now see the login screen.
6. Log In
- Use your new password at the login screen. If you reset your user account’s password, it should work immediately.
Troubleshooting
- GRUB Doesn’t Appear: If GRUB is hidden (common with single-OS setups), try pressing Shift or Esc repeatedly right after the BIOS splash. If it still doesn’t show, you may need to edit /etc/default/grub from a live USB (see below).
- “Authentication Token Manipulation Error”: This happens if the filesystem is still read-only. Reboot, ensure rw is set in GRUB, and try again.
- Encrypted Home Directory: If your home folder is encrypted, resetting the password won’t decrypt it. You’ll need your encryption passphrase or a backup key (a rarer setup in Mint).
- No Root Access: If your system has a root password you don’t know, use a live USB (below) instead.
Alternative: Use a Linux Mint Live USB
If the GRUB method fails (e.g., GRUB is inaccessible or you’re locked out of root), you can reset the password using a Linux Mint live session:
- Create a Live USB: Download the Linux Mint ISO from linuxmint.com and write it to a USB drive using a tool like Rufus or Etcher.
- Boot from USB: Insert the USB, restart your PC, and enter the BIOS/UEFI (usually F2, Del, or F12) to set the USB as the boot device.
- Start Live Session: Choose “Try Linux Mint” from the live USB menu.
- Mount Your Drive: Open a terminal and find your installed Mint partition:
sudo fdisk -l
Look for your root partition (e.g., /dev/sda1). Mount it:sudo mkdir /mnt/root sudo mount /dev/sda1 /mnt/root
- Chroot In: Change into the installed system:
sudo chroot /mnt/root
-
Reset Password: Run passwd or passwd your-username as above.
-
Exit and Reboot: Type exit, unmount with sudo umount /mnt/root, remove the USB, and reboot.
Tips
- Write Down the New Password: Use something memorable or store it securely to avoid repeating this.
- Test Immediately: Log in right after resetting to confirm it works.
- Update Recovery Options: After regaining access, consider setting a root password or adding a recovery email (if using a GUI password manager).
You should be back into your Linux Mint system with these steps! Enjoy your newly reset Linux Mint Box!