Lock screen - password incorrect
Olivia Zamora
I have upgraded Ubuntu to 12.04 and now I have a problem in logging in after locking the screen: it says the password is incorrect even though I provide the valid password. I found a temporary solution by switching users and logging in again with the same user.
24 Answers
I had the same issue. It is likely the ownership is wrong for /etc/shadow (See section "gnome-screensaver authentication failure with incorrect /etc/shadow permissions" of this page).
You need to sudo chown root:shadow /etc/shadow then sudo chmod u=r,g=r /etc/shadow See this bug report.
The interesting question is "Why ownership changed?". Because I don't remember changing it.
1I could resolve this issue with the following permission changes:
sudo chown root:shadow /etc/gshadow
sudo chown root:shadow /etc/gshadow-
sudo chown root:shadow /etc/shadow
sudo chown root:shadow /etc/shadow-Found here:
1Had this problem on Ubuntu 16.04. Found the solution in (linked in fret's answer):
chmod 2755 /sbin/unix_chkpwdIn my case, unix_chkpwd had lost its setgid bit when I copied my entire filesystem to a new machine using tar.
I am using Ubuntu 14.04 and I had the same issue
By mistake I ran a chown on the root filesystem (Yikes!) and since then I started having the issue described here.
I ran the command given in oshobov's answer, but that did not work for me, but using my own account instead of root made it work.
sudo chown your-username:shadow /etc/shadow 1