8.綁定到外部驗證服務
系統classroom.example.com提供了一個LDAP驗證服務。您的系統需要按照以下要求綁定到這個服務上:
驗證服務器的基本DN是:dc = example, dc = com
賬戶信息的驗證信息都是有LDAP提供的
連接要使用證書進行加密,證書可以在下面的鏈接中下載:http://classroom.example.com/pub/example-ca.crt
當正確完成配置後,用戶ldapuser0應該能夠登錄到您的系統中,但是沒有主目錄。當您完成autofs的題目之後,才能生成主目錄
用戶ldapuser0的密碼是password
[root@server0 ~]# yum -y install sssd
[root@server0 ~]# authconfig-tui
根據提示完成用戶和認證方式設置----
[*] 使用LDAP
[*]使用LDAP認證
選中下一步,按回車進入下一個界面
根據選中[*]使用LTS
服務器:classroom.example.com
基礎DN:dc=example,dc=com
點擊確定,提示下載證書到/etc/openldap/cacerts目錄時:
另開一個終端執行:
ctrl+shift+t快捷鍵可以另開一個終端
[root@server0 cacerts]# cd /etc/openldap/cacerts
[root@server0 cacerts]# wget http://classroom.example.com/pub/example-ca.crt
然後回到authconfig-tui工具界面確認,稍等片刻即可。
[root@server0 cacerts]# systemctl restart sssd
[root@server0 cacerts]# systemctl enable sssd
[root@server0 cacerts]# id ldapuser0
(以下顯示爲成功) #顯示 LDAP 用戶
uid=1700(ldapuser0) gid=1700(ldapuser0) 組=1700(ldapuser0)