I was watching something on the computer last night and after 1 hour the screen locked (which I set it to do). Now all of a sudden my password is not working and I can't login. I have another account on the same computer that works fine, but I cannot log in to my account. Why did this happen and what can I do?

  • Try reseting your password: askubuntu.com/questions/24006/… – Javier Rivera Jun 1 '14 at 18:27
  • I'm not sure. It sounds like a bug of some sort. There is no logical reason why your password just wouldn't work anymore. (check if Caps Lock is on). – John Scott Jun 1 '14 at 18:31
  • I checked caps lock and I've been using the same password for months. I'm baffled. – MikeJerome Jun 1 '14 at 18:37

I'm a newbie to Ubuntu (indeed any Linux distro), forgive me for any poorly connected dots!

I recently encountered this too, seemed odd as I hadn't changed anything (intentionally). I'd been away for a few minutes and had to unlock the user again. It wouldn't work but it had less than 10 minutes before. I tried it a few times and was confident I was using the correct password.

I jumped into a guest account to check out AskUbuntu and found your question. I was about to give prakharsingh95's answer a go but for sanity's sake I tried typing the password as visible text and it seemed fine. I then tried to unlock again and it allowed me in.

I was a little confused but then I noticed my default language had changed from EN1 to EN2. This was the problem because of one of the characters in my password maps differently between the keyboard layouts. I'm guessing that using the guest account reset the language before I attempted to unlock again. I did a little more reading and came across this with a few answers Keyboard layout switches to English each time I reboot. For now I'm attempting the most popular answer but it also helped me come across what I believe was the culprit in my case. Super+Space will change to the next layout. I probably inadvertently did this after first logging on.

Hopefully this will be useful to anyone else in the same situation.

  • 1
    Thanks for pointing out the keyboard layout. I just typed my password with the visual keyboard (accessibility icon on top bar on the login screen). – Right leg Apr 13 '18 at 13:05

At startup choose recovery mode.


mount -o remount, rw /
passwd <your username> 

Change your password.

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