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?
Asked
Active
Viewed 4,404 times
-1
-
I would try resetting the password again, this time being extra cautious. – KGIII Feb 13 '21 at 17:32
-
1Try with small and capitals reversed. In all other cases: reset the password from a root prompt (grub rescue or a live session). – Rinzwind Feb 13 '21 at 17:33
-
"Now, I can't log into my computer and I can't even reset my password." If the answers at at How do I reset a lost administrative password? are not working for you, see also How do I reset a lost password (using recovery mode requires me to type the password)? – Eliah Kagan Feb 13 '21 at 17:35
-
1Another thing to try is the numlock key -- there is no warning when that is on, and some keyboards get some letters changed to numbers. – ubfan1 Feb 13 '21 at 17:37
1 Answers
2
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.
exit
Press Enter.
-
1
-
-
1It is not vulnerability as it can be used only while having physical access to the computer. – John Ronald Feb 13 '21 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) – Feb 13 '21 at 18:13
-
4I 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 '21 at 18:45