
Locked out of your own Ubuntu machine? Unlike a phone, a forgotten Linux password doesn’t mean wiping anything — you can reset it from the GRUB bootloader’s recovery mode in a few minutes, with your files untouched. We at GetMyPassword walk you through the standard recovery-mode reset step by step, and explain why this only works with physical access to the computer.

Reset your Ubuntu password in recovery mode
The whole process happens at boot, before Ubuntu fully loads:
- Restart the computer and hold Shift (or tap Esc) during boot to open the GRUB menu.
- Choose Advanced options for Ubuntu, then a Recovery mode entry.
- From the recovery menu, select root – Drop to root shell prompt.
- Make the disk writable: type
mount -o remount,rw /and press Enter. - Reset the password with
passwd your-username, then type the new password twice. - Type
rebootand log in with the new password.
Replace your-username with your actual account name — if you’re not sure of it, run ls /home to see the user folders.
Why the remount step matters
The single step people skip is the remount. Recovery mode mounts your filesystem read-only by default, so a straight passwd command fails with a permissions error. The mount -o remount,rw / line gives the shell write access, which is exactly what changing a password requires. Run it first and the rest goes smoothly.
This isn’t a security hole — it’s by design. Anyone with physical access to a computer can reset its password, which is why physical security (and full-disk encryption for sensitive machines) is the real protection.
When it won’t work
If the disk is protected with full-disk encryption (LUKS), recovery mode can’t bypass it — you’ll need the encryption passphrase first, and without it the data genuinely can’t be read. On a remote server you’d use the hosting provider’s console rather than a physical keyboard, but the recovery-mode steps are the same.
Pick a password you’ll keep
Since a Linux password also guards your sudo (admin) powers, make the new one strong. Generate a long, random password with our password generator, and if you manage several machines, store each one safely rather than reusing a single password — our guide to strong passwords explains why.
Frequently asked questions
Does resetting an Ubuntu password delete my files?
No. Resetting the password through recovery mode changes only the password — your files, settings and programs stay exactly as they were.
Why does passwd say “Authentication token manipulation error”?
The filesystem is still mounted read-only. Run mount -o remount,rw / first to make it writable, then try the passwd command again.
Can I reset an Ubuntu password without physical access?
Not normally — the method needs the GRUB menu, which means physical access or a hosting console. That requirement is intentional and is what keeps a locked Linux machine secure.



