I'm trying to match a FreeIPA user to a local group via FreeIPA group membership. When testing the manual edit of common-auth it works. But I'm trying to generate the file with pam-auth-update so that it won't break after an upgrade of something at some point.
What I've done so far:
- Added a group mapping, which adds users belonging to FreeIPA group
service-admin
to local groupservice
.
sudo vi /etc/security/group.conf
*;*;%service-admin;Al0000-2400;service
- Create a pam-config file.
sudo vi /usr/share/pam-configs/group
Name: Activate /etc/security/group.conf
Default: yes
Priority: 512
Auth-Type: Primary
Auth-Final:
[success=end default=ignore] pam_group.so nullok try_first_pass
Auth-Initial:
[success=end default=ignore] pam_group.so nullok
- Re-generate the common-auth file:
sudo pam-auth-update
But sadly it doesn't add the line auth [success=3 default=ignore] pam_group.so nullok
to /etc/pam.d/common-auth
.
[...]
# here are the per-package modules (the "Primary" block)
auth [success=2 default=ignore] pam_unix.so nullok
auth [success=1 default=ignore] pam_sss.so use_first_pass
[...]
No errors are shown, so I'm not sure how to debug this.