After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 478443 - gnome-screensaver fails to unlock with pam_unix2
gnome-screensaver fails to unlock with pam_unix2
Status: RESOLVED DUPLICATE of bug 370847
Product: gnome-screensaver
Classification: Deprecated
Component: daemon
2.22.x
Other All
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-19 21:31 UTC by Marcos Pinto
Modified: 2008-11-13 19:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Marcos Pinto 2007-09-19 21:31:01 UTC
Steps to reproduce:
1. install pam_unix2 
2. /etc/pam.d/common-auth and /etc/pam.d/common-password, replacing pam_unix.so with pam_unix2.so
3. reset your password with passwd
4. log into gnome and lock the screen with gnome-screensaver
5. every attempt to login will be shown as invalid password


Stack trace:


Other information:
Comment 1 William Jon McCann 2007-11-09 22:27:08 UTC
I've used pam_unix2 successfully on a number of systems.  Can you try running the "test-passwd" tool that is included in the gnome-screensaver sources and post the output here?

Thanks.
Comment 2 Marcos Pinto 2007-11-09 23:09:21 UTC
This is on a Debian box with stock permissions. And like I said, it works with libpam_unix, just not libpam_unix2.
-rw-r----- 1 root shadow 955 2007-11-09 17:07 /etc/shadow
-rw-r--r-- 1 root root 1389 2007-10-29 19:50 /etc/passwd


markybob@peg:/usr/src/gnome-screensaver-2.20.0/src$ ./test-passwd 
** Message: pam_start ("gnome-screensaver", "markybob", ...) ==> 0 (Success)
** Message: Handling message style 1: 'Password: '
** Message: Waiting for lock
** Message: Waiting for respose to message style 1: 'Password: '
** Message: Waiting for response
** Message: Got message style 1: 'Password: '
Password: ** Message: Got response
** Message: Got respose to message style 1: interrupt:0
** Message: Msg handler returned 1
** Message: Handling message style 3: 'Permissions on the password database may be too restrictive.'
** Message: Waiting for respose to message style 3: 'Permissions on the password database may be too restrictive.'
** Message: Waiting for lock
** Message: Waiting for response
** Message: Got message style 3: 'Permissions on the password database may be too restrictive.'
** Message: Got response
** Message: Got respose to message style 3: interrupt:0
** Message: Msg handler returned 1
** Message:    pam_authenticate (...) ==> 7 (Authentication failure)
** Message:  pam_end (...) ==> 0 (Success)
ERROR: Incorrect password.
Incorrect

Thanks
Comment 3 Marcos Pinto 2007-11-09 23:42:50 UTC
I forgot to mention that I can log into the system just fine, so libpam_unix2 with those above listed permsisions are working fine.  Just having a problem with gnome-screensaver unlocking
Comment 4 Loïc Minier 2008-01-21 14:19:29 UTC
Could it be that pam_unix2 requires binaries to be setgid shadow?
Comment 5 Marcos Pinto 2008-03-01 22:47:25 UTC
I emailed pam_unix2's author about this and this was his reply:

"gnome-screensaver does not have the right permissions.

PAM spec requires, that calling applications have enough
privileges to read all password files.

pam_unix.so has a hack to call a helper binary. But this
works only with pam_unix.so. It does not work if you use
anything else like finger sensor, smartcards, or anything
else not handled by pam_unix to authenticate.

For that reason some applications, which should not run
with a setuid or setgid bit, call a helper application for
authentication itself." - Thorsten
Comment 6 Loïc Minier 2008-03-03 10:46:52 UTC
So gnome-screensaver needs a suid/sgid helper?
Comment 7 Marcos Pinto 2008-03-03 15:34:13 UTC
Yeah
Comment 9 William Jon McCann 2008-11-13 19:33:54 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.


*** This bug has been marked as a duplicate of 370847 ***