Resetting a Forgotten Login Password
Recover access to your Linux Mint or Zorin OS account when you have forgotten your login password — via fingerprint shortcut or GRUB recovery mode — and fix the keyring mismatch that follows.
What This Guide Achieves
| Goal | Status |
|---|---|
| Reset a forgotten login password | Done |
| Fix the “login keyring password mismatch” error that follows | Done |
No data is lost in either process.
The Problem (Windows User Perspective)
On Windows, you can reset a local account password from the sign-in screen or by booting into Windows Recovery. On Linux, the equivalent is GRUB recovery mode — a pre-boot environment that drops you into a root shell before the normal login system starts.
If you enrolled a fingerprint before forgetting your password, there is a faster route: fingerprint authentication works for sudo on Ubuntu-based systems, which lets you run passwd from inside the running OS without ever needing the old password.
Method 1: Fingerprint Shortcut (If Fingerprint Is Enrolled)
Use this if you can still log in via fingerprint.
Step 1 — Open a Terminal
Press Ctrl+Alt+T.
Step 2 — Run passwd as Root via sudo
sudo passwd YOUR_USERNAME
Replace YOUR_USERNAME with your actual username (run whoami if unsure).
Because sudo is configured to accept fingerprint authentication (via PAM) on Ubuntu-based systems, the terminal will prompt you to scan your finger instead of typing a password. Swipe your finger when the fingerprint reader lights up.
You will then be prompted to enter and confirm a new password — no old password required, because you are running passwd as root.
Step 3 — Confirm
New password:
Retype new password:
passwd: password updated successfully
That is it. No reboot needed. Your new password takes effect immediately.
If the terminal asks for a password instead of fingerprint: Fingerprint is not configured for
sudoon your system, or the PAM fingerprint module is disabled. Use Method 2 below instead.
Method 2: GRUB Recovery Mode (No Fingerprint Required)
Use this if fingerprint is not enrolled or the fingerprint route did not work.
Step 1 — Access the GRUB Boot Menu
Restart your laptop. Right after the manufacturer logo disappears, repeatedly tap the Esc key (or hold the left Shift key) until the GRUB boot menu appears.
Timing note: On UEFI systems (most modern ThinkPads), tap Esc rapidly right after the screen first lights up. If the OS starts loading normally, reboot and try again — the window is only a second or two wide.
Step 2 — Enter Recovery Mode
- Use the arrow keys to highlight Advanced options for Linux Mint (or Advanced options for Zorin if on Zorin OS) and press Enter.
- Select the top kernel entry ending with (recovery mode) and press Enter.
Step 3 — Open the Root Shell
The Recovery Menu appears. Use the arrow keys to select:
root — Drop to root shell prompt
Press Enter, then press Enter again when prompted at the bottom of the screen.
You now have a root shell. No password is required — this is the design of recovery mode.
Step 4 — Remount the Filesystem as Read-Write
The recovery shell mounts the filesystem read-only by default to protect it. You must remount it with write permissions before you can save a new password:
mount -o remount,rw /
No output means success.
Step 5 — Set a New Password
passwd YOUR_USERNAME
Replace YOUR_USERNAME with your actual username (e.g. the name shown on the login screen).
When prompted, type your new password. Nothing will appear on screen as you type — this is normal. Type carefully, press Enter, retype to confirm, press Enter again.
New password:
Retype new password:
passwd: password updated successfully
Step 6 — Reboot
reboot
Your system will boot normally. Log in with your new password.
Fixing the Keyring Mismatch After a Password Reset
After resetting your password, you will likely see this popup on next login:
“The password you use to log in to your computer no longer matches that of your login keyring.”
Why This Happens
Ubuntu-based systems store saved passwords (Wi-Fi credentials, app tokens, etc.) in an encrypted keyring file. That file is locked with your old login password. When the passwords no longer match, the system cannot automatically unlock the keyring at login and shows this prompt.
What You Lose
The contents of the keyring — saved Wi-Fi passwords, stored application credentials, and similar secrets. You will need to re-enter those the next time each app or Wi-Fi connection asks. Your files, documents, settings, and installed apps are not affected.
The Fix
Delete the old keyring file. Your system will create a fresh one — locked with your new password — the next time you log in (this behavior is the same on both Linux Mint and Zorin OS).
rm ~/.local/share/keyrings/login.keyring
No confirmation message appears. The command completes silently.
Now log out and log back in (or reboot). The mismatch prompt will not reappear, and a new keyring will be created automatically.
Verify (Optional)
After logging back in, confirm the new keyring was created:
ls ~/.local/share/keyrings/
You should see login.keyring with a recent timestamp.
What Didn’t Work (and Why)
| Approach | Why It Failed |
|---|---|
| Changing password from GNOME Settings while logged in | Settings → Users → Password requires typing the current (forgotten) password to proceed |
| Unlocking the old keyring after reset | Not possible without the old password — the keyring is AES-encrypted with it |
Skipping the mount -o remount,rw / step in recovery mode | Without it, passwd fails silently: the filesystem is read-only so the shadow password file cannot be updated |
Security Notes
- Recovery mode grants root access to anyone who can physically boot the machine. This is expected behavior — if someone has physical access to a laptop and the disk is not encrypted, they can always reset the password. Full-disk encryption (LUKS) is the correct way to prevent this.
- After a password reset, treat your previous password as compromised. Do not reuse it.
- Never share your password in chat applications, AI assistants, or any logged communication channel. If you have done so, change the password immediately.
Related Guides
- fingerprint-login.md — Setting up fingerprint authentication with fprintd and PAM
- common-issues.md — General troubleshooting FAQ
Discussion