LDAP 认证的方法

认证设置界面命令:authconfig-tui
1. 修改 /etc/nsswitch.conf文件
passwd: files ldap
shadow: files ldap
group: files ldap

2. 修改 /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_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 broken_shadow
account sufficient pam_succeed_if.so uid < 500 quiet
account pam_ldap.so
account required pam_permit.so

password requisite pam_cracklib.so try_first_pass retry=3
password sufficient pam_unix.so md5 shadow nullok try_first_pass use_authtok
password sufficient pam_ldap.so use_authtok
password required pam_deny.so

session optional pam_keyinit.so revoke
session required pam_limits.so
session pam_succeed_if.so service in crond quiet use_uid
session required pam_unix.so
session optional pam_ldap

3. 修改 ldap.conf
这步主要就是 配置系统访问 ldap 的参数,压力校验仪
如 host,base dn,bind dn,bind pw,还有取 user, pass, group 的过滤器

你可能感兴趣的:(LDAP,认证的方法)