I've this strange issue occurring after I upgraded the os from 16 to 18.

At first, it wouldn't let me in, saying that the password is incorrect even though it was right. So I rebooted with recovering mode on, entered into root, and changed my user's password with a new one.

Rebooted, logged in, all perfect. But the moment I lock my screen, it wouldn't take me back, stating that the password is incorrect. I don't want to reboot every time I want to log in. AND, most importantly, sudo password for this user is also incorrect. Sudo password does not match with the login password for this user, apparently. STRANGE.

It's frustrating, but I have no idea what has to be done?

  • 3
    Are there any non-standard characters in the password? Such characters may be represented by different symbols (and keyboard keys) in different programs (the login screen, the lock screen, sudo, etc). – sudodus Dec 7 '18 at 6:51
  • this could be it. lemme try out with simple alphabetic passwords and come back.. – keaton016 Dec 7 '18 at 7:19
  • @PRATAP I'm sorry, could you please rephrase. i didn't get it... – keaton016 Dec 7 '18 at 7:21
  • 1
    when you are on lock screen, and after typing your password, press down scroll arrow on key board. it gives you option to see the text "show text". – YuganTej Dec 7 '18 at 7:22
  • @keaton016, I'm glad you found the problem, and that you could solve it :-) – sudodus Dec 7 '18 at 8:50

It looks like a keyboard mapping issue.
You probably set your password with a default keyboard layout, that is active by default when you reboot.
But after you connect, your user's keyboard layout is put on, explaining why sudo and unlocking don't work anymore.
At connection screen after you reboot, you can check the language and keyboard layout used by default, typically at the top right of the connection screen.
So you can verify what your password actually is (checking your default keyboard layout), connect, and then change your passwordin terminal: passwd <your_user_name>

  • Once you have changed your password, and you're sure of it, my advice would be to remove the keyboard layout(s) that don't fit your keyboard(s). This way Ubuntu will not have choice and will always start with the correct layout. This can usually be done graphically in the keyboard settings menu. Enjoy :) – FloT Dec 7 '18 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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