How to Reset a Ubuntu Password

From the beginning of computers, they have always been protected by some sort of password so that the data inside the computer is safe and sound. Regardless of the protection, the common tech problem is that almost everyone is forgetting their user account password which essentially gives access to the computer and the data in it. Well, this case is not any different if you are using a Linux-based operating system like Ubuntu.

So, if you ever forgot your user account password in Ubuntu, here is how you can reset a Ubuntu password.

Note: Even though we are showing this in Ubuntu, this procedure will work on any Ubuntu-related distributions like Linux Mint, Lubuntu, etc.

Reset Forgotten Ubuntu Password

You can easily reset a user account password in Ubuntu using a couple of commands. To do that, boot up your Ubuntu machine and press the ESC button continuously after the BIOS screen to open Ubuntu’s GNU GRUB menu. Here select “Advanced options for Ubuntu” using your down arrow key and press the enter button.


The above action will open advanced options; here select the “recovery mode” to open the recovery menu.


Select “root – drop to root shell prompt” from the list of options to open the root shell.


The above action will open the command line interface. Here enter the following command and press the Enter button. What this command does is that it will remount the filesystem with write permission.


Now enter the following command to list all the user account names, so that you can easily reset the password of a specific user account. As you can see from the below image, my Ubuntu machine currently has two user accounts.


Now to reset the password of a specific user account, use the command below and press the Enter button. Also, don’t forget to replace “username” with the actual username of your user account (In my case, its “stugon”).

Once you replace the username, the command will look something like this.

As soon as you press the enter button, Ubuntu will ask you for a new password. Just enter the new password twice and you should receive a confirmation message “password updated successfully.”


Once you are done changing the password, type the command

and press the enter button to return to the recovery menu. Select “resume normal boot” to start using your Ubuntu machine with the new password.


You may receive a warning message something like the one below; nothing odd, just press the Enter button to reboot.


Once you log in in to your Ubuntu machine using your new password, you can start working just like nothing has ever happened.


That’s all there is do, and it is that easy to reset forgotten Ubuntu user account passwords. So what do you think of it?? Do you think Ubuntu or other Linux distros are vulnerable, or do you think of it as an awesome feature that helps you in the time of need?? Do share you thoughts using the comment form below.

Vamsi Krishna Vamsi Krishna

Vamsi is a tech and WordPress geek who enjoys writing how-to guides and messing with his computer and software in general. When not writing for MTE, he writes for he shares tips, tricks, and lifehacks on his own blog Stugon.


  1. It looks like this kind of eliminates the need for a password. The system is wide open if that’s all you have to do to hack someones user account.

    1. I wanna see you remotely turning my computer on and opening recovery mode or adding “init=/bin/bash” to the kernel line. You can even remove this position from GRUB if you want :)

      1. I was thinking more along the lines that if the equipment ends up in the wrong hands. Ever been burglarized? I have. Thieves like laptops, desktops not so much.

        1. Operating system passwords are never secure and they can be easily reset. That is why it is recommended to encrypt your important stuff.

        2. Unless you encrypt your hard drive all I need is a linux boot USB key and I can access all your data regardless if you are using Windows or linux. Din’t kid yourself thinking that a session password means your data is safe.

  2. As for me? I guess I’m a bit paranoid. Oh…I realize that Linux isn’t as easy to hack as say….Windows is. But I go the extra mile when it comes to protecting my data. I have folders with passwords set to them, I have compressed, tarred files that live in folders, that also require a password in order to open. And finally? I encrypt EVERYTHING!…I mean I don’t think that’s too much proterction…do you? LoL!

  3. As soon as a hacker has an access to your physical device, it is no longer safe whatever you did to protect it…

  4. After selecting the drop to root shell prompt it shows type root password or ctrl-D to continue.
    But after typing ctrl-D it returns to the same menu only …….. what shall i do??????

  5. Does not work! when prompted to type new password 2 times it says “authentication token manipulation error” “password unchanged”

      1. Brent, I meant to come back and write how this problem was solved although now I do not rember. The steps are correct but the code was a little different. Sorry, not too sure now
        But know its easy to correct.

      2. Did you mount the drive R/W ?
        If you didn’t that’s your problem, you HAVE to mount it R/W, otherwise you can’t make changes.

  6. pls any one tellme how to reset ubuntu fogrgot password step by step ………………………….

Comments are closed.