Ubuntu - recovering lost user name and password

Soldato
Joined
18 Oct 2002
Posts
8,444
Location
Leamington Spa
I installed Ubuntu on and old machine I had lying around (I intend to use it as an HTPC) but I've completely forgotten the user name and password. Is there any way I can recover this? I'm a complete linux noob (I can use it, but I have no idea about setting things up) so please explain in very simple terms:)
 
Ok nevermind, the password was pass. I'm such an idiot. A mod can close this if they like.
 
As long as you've got physical access to the box, you can always reset a root password... so if it happens again, don't panic :)
 
As long as you've got physical access to the box, you can always reset a root password... so if it happens again, don't panic :)

It's great, isn't it... linux is so "secure"!!

(p.s. I use linux on the majority of my boxes and I know that it's just as easy with windows - so i'm not trying to start a flame war!!)
 
Actually resetting a password on Linux is a lot easier TBH. Why? Unless you encrypt you entire hdd there isn't much point if they have physical access to you computer.

Just live boot CD, edit /etc/shadow delete the line with your username from ':' to ':' where that big hash thing is (the second one). Or you can replace the password hash with a users one in which you do know.
 
Back
Top Bottom