我有一个sssd设置来对LDAP服务器进行身份验证。我想使用shadow属性,这样如果它在过去或设置为0,它将不允许用户进行身份验证。只要密码正确,就让用户进行身份验证,忽略shadowExpire属性。
日志:
[sssd[be[default]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding shadowLastChange [15033] to attributes of [tuser].
[sssd[be[default]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding shadowMin [1] to attributes of [tuser].
[sssd[be[default]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding shadowMax [90] to attributes of [tuser].
[sssd[be[default]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding shadowWarning [7] to attributes of [tuser].
[sssd[be[default]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding shadowInactive [30] to attributes of [tuser].
[sssd[be[default]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding shadowExpire [15126] to attributes of [tuser].
[sssd[be[default]]] [sdap_attrs_add_ldap_attr] (0x2000): shadowFlag is not available for [tuser].
将/etc/pam.d/system-auth
#%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 sufficient pam_fprintd.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth sufficient pam_sss.so use_first_pass
auth required pam_deny.so
account required pam_unix.so broken_shadow
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account [default=bad success=ok user_unknown=ignore] pam_sss.so
account required pam_permit.so
password sufficient pam_unix.so sha512 shadow nullok try_first_pass use_authtok
password sufficient pam_sss.so use_authtok
password required pam_deny.so
session optional pam_keyinit.so revoke
session required pam_limits.so
session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
session optional pam_sss.so
其他日志
[sssd[be[default]]] [find_password_expiration_attributes] (0x4000):Found shadow password expiration attributes.
[sssd[be[default]]] ([simple_bind_send] (0x0100): Executing simple bind as: uid=tuser,ou=people,dc=example,dc=com
[sssd[be[default]]] ([simple_bind_send] (0x2000): ldap simple bind sent, msgid = 1
[sssd[be[default]]] ([sdap_process_result] (0x2000): Trace: sh[0x19b86b0], connected[1], ops[0x19daeb0], ldap[0x18389a0]
[sssd[be[default]]] ([sdap_process_message] (0x4000): Message type: [LDAP_RES_BIND]
[sssd[be[default]]] ([simple_bind_done] (0x2000): Server returned control [1.3.6.1.4.1.42.2.27.8.5.1].
[sssd[be[default]]] ([simple_bind_done] (0x1000): Password Policy Response: expire [-1] grace [-1] error [No error].