Fedora 10 – Forgot User Password
Posted Feb 20th, 2009 by Conor in in Fedora,LinuxToday I did one of the stupidest things that I have done in a long time – I forgot my user password for my Fedora 10 installation. I don’t know how it happened… I just decided to change my password because I thought that it was to weak. It used to be “conor” which is about anyone’s first possible guess given that my username is Conor! Anyway I changed the password and continued working away. Later on when I went to log in again I thought “Oh Shit!”.
I sat there for like two hours trying to remember the password and eventually realised that it wasn’t going to happen. Then I began to think of alternative methods of getting in. I had one advantage over people who are actually trying to hack into the computer – I knew the root/super user password. This proved to be the thing that saved me in the end! But unfortunately Fedora, with good reason, does not allow root login through GUI so the task is made harder again.
After looking online for solutions to no avail I began to recall my Fedora installation. You see when I installed the OS initially it rejected my graphics card and would not boot into GUI. Then it dawned on me – If I could get into that state again (init 3) I could log in as root from there, start the GUI and eventually reset my password. But how the heck to do that!
It’s easy really once you make it clear in your head what your about to do. We’ll start from the beginning:
- Turn on your computer.
- Keep pressing the “p” key until something happens.
- If you have a grub password enter it at this point.
- You should see a list of kernels. Select which one you want to boot with (usually the first one) and press the “e” key.
- Go to the line that begins with “kernel /vmlinuz**” and press the “e” key again.
- At the end of that line add this text (without the quotes): “init 3″
- Press enter.
- Press the “b” key.
- You should now be in a command line interface. Login in as root (su -) and then type “startx”.
- You will now boot into the GUI logged in as root. Go to System > Administration > Users and Groups
- Edit your user details.
- Restart and login as normal!
It took me a while to figure out how to do this but it worked out alright in the end. Hope that this posts helps other people in the same situation – I wish someone had spelled this out for me!