Upstream added the following two lines to /usr/local/etc/pam.d/lightdm-autologin: # Block login if shell in nologin or false auth required pam_succeed_if.so shell notin /sbin/nologin:/usr/sbin/nologin:/bin/false:/usr/bin/false When I comment this out, autologin works again. I got the cause of the problem and the solution from https://forums.freebsd.org/threads/freebsd-13-1-lightdm-1-32-user-autologin.86503/.
Hi! Thanks for reporting this here, and good catch. For a little context, yes, FreeBSD does not have pam_succeed_if as you have discovered. The offending line was added upstream here: https://github.com/canonical/lightdm/commit/0c21d986ff3c9ec1568b681c746e30b6fd25d5cb The port was already patching the lightdm-autologin file, but the patch was not addr4essing this new line added at the top of it. This addition also did not cause the patching to fail (which could have made the offending change more easily noticeable). Removing the line looks like the easiest solution and also mostly correct. The pam_succeed_if functionality could be emulated using pam_exec(8), but it looks overkill, IMHO. I'm going to test a little before committing. This is eligible to be merged to quarterly too.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6cd9fcbb0f03e95189a5eba168af7fcaead34dc1 commit 6cd9fcbb0f03e95189a5eba168af7fcaead34dc1 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2022-10-08 13:30:56 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-10-08 13:30:56 +0000 x11/lightdm: Fix autologin Upstreaam added a pam directive using a pam module not present in FreeBSD: https://github.com/canonical/lightdm/commit/0c21d986ff3c9ec1568b681c746e30b6fd25d5cb Fix by updating the patch to remove this addition. PR: 266899 MFH: 2022Q4 x11/lightdm/Makefile | 1 + x11/lightdm/files/patch-data_pam_lightdm-autologin | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
A commit in branch 2022Q4 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4c69af0fae5304884a6abeeea859e55bc8b152e0 commit 4c69af0fae5304884a6abeeea859e55bc8b152e0 Author: Guido Falsi <madpilot@FreeBSD.org> AuthorDate: 2022-10-08 13:30:56 +0000 Commit: Guido Falsi <madpilot@FreeBSD.org> CommitDate: 2022-10-08 13:34:18 +0000 x11/lightdm: Fix autologin Upstreaam added a pam directive using a pam module not present in FreeBSD: https://github.com/canonical/lightdm/commit/0c21d986ff3c9ec1568b681c746e30b6fd25d5cb Fix by updating the patch to remove this addition. PR: 266899 MFH: 2022Q4 (cherry picked from commit 6cd9fcbb0f03e95189a5eba168af7fcaead34dc1) x11/lightdm/Makefile | 1 + x11/lightdm/files/patch-data_pam_lightdm-autologin | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-)
Fix committed and merged. Thanks!