0
A while ago I've installed Ubuntu as a second OS on my laptop, just to try out Linux. I have created one user & gave it admin privileges.
Haven't touched it for a while, and, of course, forgot the password. Tried all my commonly used passwords for that user and root, but they don't work.
Is there a way to recover passwords somehow?
I think that more recent versions of Ubuntu may block this method (it is a gaping security hole), but it's still worth a shot. – Telemachus – 2009-10-01T23:41:44.707
1Similarly, instead of "rw init=/bin/bash", the more traditional way is to say "single" to boot in single user mode. I think that still works on Ubuntu. – Paul Tomblin – 2009-10-01T23:42:03.957
I'm pretty sure that single user mode requires that you type in the root password. – wfaulk – 2009-10-01T23:43:32.830
@Telemachus: If you have access to the hardware, there's not really much anyone can do to keep you from the data. I suppose a completely encrypted filesystem might. – wfaulk – 2009-10-01T23:45:15.650
@Wfaulk:
grub
can easily be configured so that it requires a password in order to edit the boot line. I do this on my Debian installation, for exactly this reason. I think that Ubuntu might now do this by default, but I am not 100% sure of that. – Telemachus – 2009-10-02T00:01:05.867single mode does prompt for root password, but there's a message that suggests Ctrl-D may allow accessing the system without a password anyway. (might just initiate a reboot.. not sure, i've never had to boot to single when i didn't know the password.) – quack quixote – 2009-10-02T00:08:04.997
@Telemachus: yeah, but you can always boot off of another CD. – wfaulk – 2009-10-02T00:32:03.567
@Wfaulk: Sure. I just wanted to warn the OP that the method Mark suggests may not work with Ubuntu, because I vaguely recall that method was blocked. I may completely wrong about that, but I never said anything about an airtight system. – Telemachus – 2009-10-02T00:37:14.513