一向族、安裝對(duì)應(yīng)軟件包
yum install openldap openldap-clients -y
yum install -y nss-pam-ldapd pam_ldap
二、修改配置文件
執(zhí)行setup,勾選Authconfig-tui并選中以下選項(xiàng)(若無setup命令,執(zhí)行yum -y install setuptool)
[*] Use LDAP
[*] Use LDAP Authentication
vi /etc/pam.d/system-auth风纠,進(jìn)入命令行模式輸入(shift+冒號(hào)):
%s/sss/ldap/g
vi /etc/pam.d/password-auth夸楣,進(jìn)入命令行模式輸入(shift+冒號(hào)):
%s/sss/ldap.g
三、修改ssh配置文件
vi /etc/pam.d/sshd肠牲,進(jìn)入命令行模式,最后一行輸入:
四靴跛、重啟相應(yīng)服務(wù)
service sshd restart
service nslcd restart