Reset Your Password In Ubuntu 12.10 After Being Locked Out

Don’t remember your password to sign into Ubuntu anymore? Well, you’re in luck because this brief tutorial is going to show you how to use Ubuntu recovery mode to sign with limited system’s service and unlock your account, change your password and your username. It’s not everyday that we forget our passwords to sign into our machine, but when we do, it can be really annoying.

Instead of wasting time trying all your old passwords to sign in, it may be quicker if you just use the recovery mode and change it. You also don’t need to know your old password before changing it like you do in Windows systems. I personally think this is a huge security hole and I can’t understand why it was designed like that, but heck, at least you can change your password easily, right?

To get started, Start your Ubuntu computer and immediately press the Shift key. Or hold down the Shift key while you turn on your machine. When you see the Grub menu below, choose ‘Advanced options for Ubuntu’




Next, select the first recovery mode on the screen to continue.




Then choose to sign in to the root shell prompt.




Next, run the commands below to remount the root directory

mount -rw -o remount /


Finally, run the commands below to reset your password.

passwd username



Replace username with your account name and press Enter.


That’s it! You can now restart your computer and login with the new password you just created. If you don’t know your username, run the commands below to look into the passwd file and get it.

cat /etc/passwd

It may be the last line in the file beginning with your username.


To change your username, please read this post.



10 thoughts on “Reset Your Password In Ubuntu 12.10 After Being Locked Out”

    1. It’s a super delicate process and took me at least 10 times to hit shift at the correct time. You need to press shift as soon as the computer turns on and then I kept pressing it at least 15 times quickly.

  1. so could anyone please tell me, why in the hell would i need a password on synaptic manager if I choose not to have any passwords…..and now, when I’ve removed my password from username, i ca’t get in synaptic manager without password, with old one..cause surely i don’t have new one :D

    piece of shit

  2. I was looking all over for this information! It took me close to 2 hours to find out that Best Buy couldn’t and wouldn’t help me with this problem, but I was able to do it in less than 5 minutes thanks to your article! :)

    A happy camper

  3. hi
    successfully reset root password using your instrujctions. really appreciate this info.
    however should I reset the root directory back to read only? went thru the steps again and got to a spot where is said login as root and not to reset password.
    so what if I have to do this again at some future date? at 82yrs old the memory don’t work as well.
    thanks again very much

  4. Ok I tried to reset using the instructions. ..At the end itwanted metopitinnew password but wouldn’t let me type on in..What else can do.thanks

Leave a Reply