Bug 1176338 - lightdm: "authentificataion failure" after moving xdm{,-np} PAM files from /etc/pam.d to /usr/etc/pam.d
Summary: lightdm: "authentificataion failure" after moving xdm{,-np} PAM files from /e...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Alexei Sorokin
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1173049
  Show dependency treegraph
 
Reported: 2020-09-09 14:32 UTC by Stefan Dirsch
Modified: 2021-03-02 20:17 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Dirsch 2020-09-09 14:32:19 UTC
I received "authentificataion failure" in lightdm after moving xdm{,-np} PAM files from /etc/pam.d to /usr/etc/pam.d. It was my understanding
the moving would be possible now with latest pam package in Tumbleweed.

rpm --changelog -q pam
[...]
* Mo Aug 19 2019 kukuk@suse.de
- usr-etc-support.patch: Add support for /usr/etc/pam.d

Could it also be an issue in lightdm?
Comment 2 Thorsten Kukuk 2020-09-10 08:51:13 UTC
We have many files in /usr/etc/pam.d already, including login. They all work fine. Must be something special with the xdm configuration.
Comment 3 Stefan Dirsch 2020-09-10 10:54:38 UTC
It works fine with xdm itself. I've tested xdm, sddm, ligthdm as displaymanagers so far. The issue only happened with lightdm.
Reassigning to maintainer of lightdm. @Thorsten In case you have any hints, what could be the issue, please let us know. Thanks!

Reproduction is rather easy. Just use Tumbleweed, which includes pam package with /usr/etc/pam.d support. Then move /etc/pam.d/xdm* files to /usr/etc/pam.d and restart lightdm. When trying to login lighdm shows you 

  "authentificataion failure"
Comment 4 Dominique Leuenberger 2020-09-14 13:24:56 UTC
The issue is pretty simple, even before moving the files it can be identified:

> ls -lad /etc/pam.d/lightdm*
lrwxrwxrwx 1 root root   3 Aug 25 22:35 /etc/pam.d/lightdm -> xdm
lrwxrwxrwx 1 root root   6 Aug 25 22:35 /etc/pam.d/lightdm-autologin -> xdm-np
-rw-r--r-- 1 root root 267 May  2  2013 /etc/pam.d/lightdm-greeter


once gdm moves the files to /usr/etc, there are dangling symlinks in place for lightdm's pam stack
Comment 5 Dominique Leuenberger 2020-09-14 13:29:09 UTC
(of course, once XDM moves the files - gdm is not involved)
Comment 6 Stefan Dirsch 2020-09-14 16:28:57 UTC
Thanks for the hint.  With that change 

diff -u 50-suse-defaults.conf.orig 50-suse-defaults.conf
--- 50-suse-defaults.conf.orig  2020-09-14 18:17:53.338642637 +0200
+++ 50-suse-defaults.conf       2020-09-14 18:18:15.942642637 +0200
@@ -1,6 +1,6 @@
 [Seat:*]
-pam-service = lightdm
-pam-autologin-service = lightdm-autologin
+pam-service = xdm
+pam-autologin-service = xdm-np
 pam-greeter-service = lightdm-greeter
 xserver-command=/usr/bin/X
 session-wrapper=/etc/X11/xdm/Xsession

in package sources and no longer using any symlinks it no longer matters where the xdm PAM files are located - in /etc/pam.d or /usr/etc/pam.d.
I'm not sure why such symlink are being used ... therefore it would be better to let the maintainer doing such a change ...

Oh. There is something in changelog for this ...

-------------------------------------------------------------------
Mon Nov  3 21:48:38 UTC 2014 - gber@opensuse.org

- use symlinks to the xdm PAM service files again, using a
  different PAM service name breaks automatic unlocking of
  gnome-keyring via PAM (bnc#903744)
Comment 7 Dominique Leuenberger 2020-09-17 12:26:39 UTC
Attempted to submit a fix:

835190  State:new        By:dimstar      When:2020-09-17T12:25:44
        submit:          home:dimstar:Factory/lightdm@3 ->                  X11:Utilities
        Descr: - Follow XDM's change of moving the default pam config file to
               /usr/etc (boo#1176338).   - Add pre/posttrans scripts to ensure
               user modified     /etc/pam.d/lightdm* survives our move to
               /usr/etc (and user     modification in /etc/pam.d wins over
               /usr/etc/pam.d).

will fail to build in devel prj, as it needs to be step-lock updated together with xdm, but that's ok
Comment 8 Stefan Dirsch 2020-09-23 10:58:10 UTC
Thanks. Already accepted for the devel project and submitted for factory

https://build.opensuse.org/request/show/835216
Comment 9 Stefan Dirsch 2020-10-02 20:50:19 UTC
Will be fixed once it has been checked in. Closing.
Comment 10 OBSbugzilla Bot 2020-12-09 17:00:06 UTC
This is an autogenerated message for OBS integration:
This bug (1176338) was mentioned in
https://build.opensuse.org/request/show/854312 Backports:SLE-15-SP3 / lightdm
Comment 11 OBSbugzilla Bot 2021-02-24 10:50:07 UTC
This is an autogenerated message for OBS integration:
This bug (1176338) was mentioned in
https://build.opensuse.org/request/show/874803 Backports:SLE-15-SP2 / lightdm
Comment 12 Swamp Workflow Management 2021-03-02 20:17:16 UTC
openSUSE-RU-2021:0368-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1176338,1177197,1179613,1181778
CVE References: 
JIRA References: 
Sources used:
openSUSE Backports SLE-15-SP2 (src):    lightdm-1.30.0-bp152.4.3.1