一、安裝對應軟件包
yum install openldap openldap-clients -y
yum install -y nss-pam-ldapd pam_ldap
二振愿、修改配置文件
執(zhí)行setup毅糟,勾選Authconfig-tui并選中以下選項(若無setup命令红选,執(zhí)行yum -y install setuptool)
[*] Use LDAP
[*] Use LDAP Authentication
vi /etc/pam.d/system-auth,進入命令行模式輸入(shift+冒號):
%s/sss/ldap/g
vi /etc/pam.d/password-auth留特,進入命令行模式輸入(shift+冒號):
%s/sss/ldap.g
三纠脾、修改ssh配置文件
vi /etc/pam.d/sshd,進入命令行模式蜕青,最后一行輸入:
四苟蹈、重啟相應服務
service sshd restart
service nslcd restart