Ubuntu Password Recovery?

No disk encryption. So, how do I recover a password on an un-encryped Ubuntu?
I don’t actual care about salvaging data, just want to login.

Back story:
Booted up an old test machine and couldn’t remeber the password. Nothing useful on the machine so no problem, I’ll just re-install ubuntu. But then I thought, what if I did have something useful on it… How would I go about unlocking the machine? And what if I was using full disk encryption… would it even be possible for a normie like me?

Startup in single-user mode, then change the root password.

If the disk was encrypted you’d be boned.

If all you want is to save the data on a drive that is not encrypted, you can always mount the drive on another system and copy whatever you want.

Yeah, that would work too. More work though.

It could be as simple as popping in a usb stick with ubuntu live, which presumably OP has since he was about to re-install, and copying whatever data he wants to a network share before the reinstall.

How do I boot in single-user mode ?

I know.

Relax, I know. What I am asking is how to recover a password on an un-encryped Ubuntu (Don’t care about the actual data).

Oh. That won’t get you the old password, just the data. For that, you’d need to crack the /etc/shadow file with something like john the cracker after starting up with a USB key or mounting the drive on another computer.

Boot into single user more. This might change slightly on distro. Ubuntu has a recovery mode options on grub. use the recovery > drop to root shell prompt options (assuming its still the same)

mount / mount -o rw,remount /

change the password passwd yourusername
reboot

2 Likes

Thanks got it.

https://help.ubuntu.com/community/LiveCdRecovery

Close thread please.

PM me if you need it unlocked.