Lost your Ubuntu user password? Well, it’s not hard to reset your password even you’ve forgot the username and below is how to do it step by step.
1. To get started, you need to boot into Recovery Mode to get a console for running commands.
Start your machine and when you’re at the Grub boot loader, select boot with the entry says something below. You may find it under “Advanced Options for Ubuntu” option:
Ubuntu, with Linux 3.x.x … (recovery mode)
If you don’t see the grub menu, press and hold the Shift key after you pressed the Power button to boot the computer.
2. In the Recovery Mode options list, select “root Drop to root shell prompt” and hit Enter. You should see the black and white command prompt at the end of the screen:
3. Now run below commands one by one:
- First remount the file system with read & write permission:
mount -o rw,remount /
- If you don’t remember the username, below command will show you:
ls /home
- To change user password:
passwd USER_NAME_HERE
Replace USER_NAME_HERE with your username. When it prompts, type in a new password and confirm.
The output “passwd: password updated successfully” means user password has been successfully reset.
Finally run command exit
to back to menu (picture in step 2) and select “resume Resume normal boot” to exit Recovery Mode.
Hi,
Just a little typo:
mount -o rw,remount /
this means that anyone being able to access the grub menu can change your password, right ?
isn’t that a security hole ?
Yes, if you want to stop people accessing Grub menu, you can set a bios boot password or a Grub password.
It’s working…..Thank you….thanxx great tutorial
Actually ,when I tried these step it ended up saying this user account does not exist,but it does. I want to reset my passwd but not getting way out of it.can you help me.
Still helpful, sorted my lost password great, thanks for posting!
Hello kam trying all the procedure its successfully update my password..but when I again login then it does not getting entry to me. Please help.me .
Actually I was trying for apache tomcat and because of that the password of my system get changing.. Please help me