Dan,
I have RHEL5 ldap clients using pam_unix.so and pam_ldap.so directives and these do honor the ldap user password expiration, no issues at all.
The /var/log/secure file shows: error: PAM: User account has expired
However, the two RHEL7 ldap clients using the pam_unix.so and pam_sss.so directives do not even see/know that the user ldap password has expired. When I change the directive from pam_sss.so to pam_ldap.so, the client cannot communicate with the ldap server.
RHEL5 /ETC/PAM.D/system-auth file:
auth required pam_env.so
auth sufficient pam_unix.so nullok try_first_pass
auth requisite pam_succeed_if.so uid >= 500 quiet
auth sufficient pam_ldap.so use_first_pass
auth required pam_deny.so
account required pam_unix.so
account sufficient pam_localuser.so
account sufficient pam_succeed_if.so uid < 500 quiet
account [default=bad success=ok user_unknown=ignore service_err=ignore system_err=ignore] pam_ldap.so
account required pam_permit.so
password requisite pam_cracklib.so try_first_pass retry=3 type=LINUX minlen=8 dcredit=-1 ucredit=-1 lcredit=-1 ocredit=-1
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok md5 shadow remember=24
password sufficient pam_ldap.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_ldap.so
RHEL7 CLIENTS /ETC/PAM.D/:
password-auth file:
auth sufficient pam_sss.so use_first_pass
account [default=bad success=ok user_unknown=ignore] pam_sss.so
password sufficient pam_sss.so use_authtok
session optional pam_sss.so
system-auth file:
auth sufficient pam_sss.so use_first_pass
account [default=bad success=ok user_unknown=ignore] pam_sss.so
password sufficient pam_sss.so use_authtok
session optional pam_sss.so
On 08/27/15 22:56 +0000, Real, Elizabeth (392K) wrote:
I’ve done a lot or research and re-read the OpenLDAP configuration guides
but I cannot get my OpenLDAP 2.39 server to not allow users with expired
passwords to login to ldap enabled clients. What directive in the
/etc/pam.d/ files controls the users password expiration attribute?
pam_unix or pam_ldap?
That depends on your configuration. Consult the pam project's to determine
that:
pam_ldap is a 3rd party product, so you'll need to consult it's
documentation to see how expiration is handled, if at all. nssov, which is
distributed with OpenLDAP, explicitly supports it.
In the case you are using, or wish to use, pam_unix with an ldap nss
module, expiration might be represented as an attribute underneath the
user's DN. See its documentation for details.
Setup:
Server: RHEL7 OS
Software: OpenLdap 2.4.39 server using slapd service
Client: RHEL7 OS
Software: enabled Ldap via authconfig, using sssd service
--
Dan White