kde (or gnome) lock desktop fails to unlock
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4127
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
I had this issue for years, and had never really needed the unlock feature to work, but recently I decided to start using the 'sleep' to ram on my desktop, where you of course want to have a forced login on wake, which uses the lock desktop method.

The symptom is: desktop 'lock' command or click works as expected, the desktop locks, and the unlock dialogue box appears.

Entering password then clicking unlock however does nothing, and you get an authentication failure message.

The solution turns out to be a permission problem, very easy to fix:
groups.google.com/forum/#!topic/linux.debian.user/T0h87XgYSHw

First, we note:
:: Quote ::
have a look at the files /etc/shadow and /sbin/unix_chkpwd. The owner
should be "root" for the user, and "shadow" for the group.


This turned out to be the error in my case:
:: Code ::
ls -l /etc/shadow
-rw-r----- 1 root root 1736 Dec  6  2013 /etc/shadow

ls -l /sbin/unix_chkpwd
-rwxr-sr-x 1 root shadow 30328 Oct 20  2013 /sbin/unix_chkpwd


In this case, the /etc/shadow file had root root person/group ownership, not root shadow.

ubuntuforums.org/showthread.php?t=804647&page=2

Following that thread originally, I did the following:
:: Code ::
chown root:shadow /sbin/unix_chkpwd
## this is old, and only for gnome gdm login
chmod +s /usr/lib/gnome-screensaver/gnome-screensaver-dialog

## this is for everything
chmod +s /sbin/unix_chkpwd
chown root:shadow /etc/shadow


chmod +s /sbin/unix_chkpwd
is the same as:
sudo chmod 2755 /sbin/unix_chkpwd

so for a failing kdm 4 unlock, we would use these commands:

:: Code ::
# first set the proper file permissions
chmod +s /sbin/unix_chkpwd

# next set the proper owneership:
chown root:shadow /sbin/unix_chkpwd
chown root:shadow /etc/shadow


and it should all just work, at least if you had the wrong owner/permissions.

In my case, I'm sure I accidentally changed the ownership doing something else in /etc, but check these permissions first, and the ownership, with:
:: Code ::
ls -l /etc/shadow
-rw-r----- 1 root shadow 1736 Dec  6  2013 /etc/shadow

ls -l /sbin/unix_chkpwd
-rwxr-sr-x 1 root shadow 30328 Oct 20  2013 /sbin/unix_chkpwd


And that should take care of it, but only if you had the wrong ownership or permissions in the first place.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours