0

Each time I go to a sleep state or just log out, then provide my password in a login form, I get a message Unlocking failed. The password I type is correct, because after rebooting the same password works.

auth.log output:

Apr 14 19:49:12 mathroom unix_chkpwd[15137]: check pass; user unknown
Apr 14 19:49:12 mathroom unix_chkpwd[15137]: password check failed for user (mathway)
Apr 14 19:49:12 mathroom kcheckpass[15077]: pam_unix(kde:auth): authentication failure; logname= uid=1000 euid=1000 tty=:0 ruser= rhost=  user=mathway

I am running Kubuntu with a 5.11.0-14-generic version of the kernel.

lsb_relase -a output:

Distributor ID: Ubuntu
Description:    Ubuntu Hirsute Hippo (development branch)
Release:        21.04
Codename:       hirsute

(The problem occurred before I upgraded to 21.04, so the problem isn't connected to it)

I am stuck with this problem for about a week and currently found no solution. Any help will be appreciated :)

7
  • If you can login as root, then check the /etc/passwd and /etc/shadow files. Make sure there are the same number of entries in both files by typing "wc -l /etc/passwd" and "wc -l /etc/shadow". And then "awk -F: '{print $1}' /etc/passwd > /tmp/p" and "awk -F: '{print $1}' /etc/shadow > /tmp/s". cd /tmp and type "diff p s". There should be no output. – Cinaed Simson Apr 14 at 21:06
  • @CinaedSimson I run your commands, and it shows that they have an identical number of lines and users correspond to each other. – mathway Apr 14 at 21:27
  • Check uids are unique. Type "awk -F: '{print $3}' /etc/passwd > /tmp/uids", "cd /tmp", "sort uids > uids.sort"; the do it again with -u option. "sort -u uids.sort > uids.sort.u". Then "diff uids.sort uids.sort.u" which shouldn't return anything. – Cinaed Simson Apr 14 at 22:31
  • And is this a laptop? Can you disable the screen saver? And you can switch between hiberate and sleep and see if there's a difference? – Cinaed Simson Apr 14 at 22:33
  • Still no difference. Yep, and it doesn't let me in even if I just log out and then try to log in. Also, why are you so sure that the problem is with the /etc/passwd file? – mathway Apr 15 at 19:27

Your Answer

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

Browse other questions tagged or ask your own question.