MOdify PAM to allow SSH Key logins with locked passwords

Signed-off-by: Martin Schurz <[email protected]>
This commit is contained in:
Martin Schurz committed 2024-12-22 18:51:18 +01:00
1 parent a40b1c8d0d
commit fba07a4d41
4 files changed
+66 -1

No files matched your search

+7
View File
@@ -118,3 +118,10 @@
state: absent
when:
- not os_auth_pam_passwdqc_enable
- name: Allow Login with SSH Keys, when user password is expired
lineinfile:
path: /etc/pam.d/common-account
backrefs: yes
regexp: "^(account.*pam_unix.so(?!.*no_pass_expiry).*)$"
line: '\1 no_pass_expiry'
@@ -24,7 +24,7 @@ auth required pam_deny.so
{% if os_auth_retries|int > 0 %}
account required pam_faillock.so
{% endif %}
account required pam_unix.so
account required pam_unix.so no_pass_expiry
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
{% if (os_auth_pam_sssd_enable | bool) %}