Files
configpolicy/roles/system-auth/templates/password-auth.j2
Dustin C. Hatch 27b172f083 r/system-auth: skip session winbind for local users
If winbind is unable to communicate with any domain controller, the
`pam_winbind.so` module will time out.  In _auth_ and _account_ context,
this was not an issue, at least for local users, because other modules
terminated the stack before `pam_winbind.so` was called.  In _session_
context, though, nothing terminated the stack at all, so
`pam_winbind.so` was called unconditionally.  This prevented even _root_
from logging in on the console.  This made troubleshooting difficult,
especially for the VM hosts, when the domain controllers were down.
2024-08-13 21:04:42 -05:00

42 lines
1.7 KiB
Django/Jinja

#%PAM-1.0
# This file is auto-generated.
# User changes will be destroyed the next time authconfig is run.
auth required pam_env.so
auth required pam_faildelay.so delay=2000000
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 1000 quiet_success
{% if pam_winbind %}
auth sufficient pam_winbind.so krb5_auth krb5_ccache_type=KEYRING use_first_pass
{% endif %}
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 1000 quiet
{% if pam_winbind %}
account [default=bad success=ok user_unknown=ignore] pam_winbind.so krb5_auth krb5_ccache_type=KEYRING
{% endif %}
account required pam_permit.so
password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type=
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
{% if pam_winbind %}
password sufficient pam_winbind.so krb5_auth krb5_ccache_type=KEYRING use_authtok
{% endif %}
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
-session optional pam_systemd.so
{% if pam_mkhomedir %}
{% if pam_oddjob_mkhomedir %}
session optional pam_oddjob_mkhomedir.so umask=0077
{% endif %}
{% endif %}
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
{% if pam_winbind %}
session sufficient pam_localuser.so
session optional pam_winbind.so krb5_auth krb5_ccache_type=KEYRING
{% endif %}