a few minutes ago I changed my Ubuntu user password. Then I turned off the computer and turned it on. After I entered the new password, the system would tell me that the password was wrong. I tried to enter the old password, but without success. Now, I can't log into my computer and I can't even reset my password. What can I do?


You can do it from recovery mode.

Reboot from lock screen.

Press esc while rebooting.

Go to Advanced Options for Ubuntu.

Go to Ubuntu, with Linux 4.##-generic (recovery mode).

Got to root.

Press ctrl+d.

Now execute the following commands...

Remount root with write access.

mount -rw -o remount /

It should not output anything.

List users.

ls /home

Remember your username from the list.

Change your password.

passwd your_username

Type your new password and Press Enter.

Exit the terminal.


Press Enter.

  • 1
    Thanks! You resolved my issue! – Seaender07 Feb 13 at 17:50
  • Now I have one question, would you consider it as a vulnerability? – Arghadip Feb 13 at 17:52
  • 1
    It is not vulnerability as it can be used only while having physical access to the computer. – John Ronald Feb 13 at 18:10
  • True, but you can't do it on iOS for example. So does it make Ubuntu less secure than iOS? (I know I shouldn't compare it with iOS but I'm doing just for the sake of examples) – Arghadip Feb 13 at 18:13
  • 4
    I am not experienced with iOS, but in general as long as the attacker has physical access to the device, there is always a way he can get in. (Assuming the attacker is skilled enough). – John Ronald Feb 13 at 18:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.