@@ -87,7 +87,7 @@ Debian 系统安装 `libnss-ldapd`、`libpam-ldapd`、`sssd-ldap`、`libsss-sudo
8787
8888编辑内容如下:
8989
90- ``` title="/etc/ldap/ldap.conf"
90+ ``` shell title="/etc/ldap/ldap.conf"
9191BASE dc=lug,dc=ustc,dc=edu,dc=cn
9292URI ldaps://ldap.lug.ustc.edu.cn
9393SSL yes
@@ -102,7 +102,7 @@ SUDOERS_BASE ou=sudoers,dc=lug,dc=ustc,dc=edu,dc=cn
102102
103103注意检查一下此配置文件是否与 ` /etc/ldap/ldap.conf ` 下的内容相一致,如
104104
105- ``` title="/etc/nslcd.conf"
105+ ``` shell title="/etc/nslcd.conf"
106106uid nslcd
107107gid nslcd
108108uri ldaps://ldap.lug.ustc.edu.cn
@@ -157,40 +157,10 @@ session required pam_mkhomedir.so skel=/etc/skel umask=0022
157157
158158由于 `sudo-ldap` 未来被废弃,sudo 的配置通过 sssd 实现,参考 <https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/sssd-ldap-sudo.html>。
159159
160- 将 `/usr/share/doc/sssd-common/examples/sssd-example.conf` 复制到 `/etc/sssd/sssd.conf` 并修改权限为 600。
160+ 创建 `/etc/sssd/sssd.conf` 并修改权限为 600。
161161
162- ` ` ` diff
163- [taoky@gateway-nic ~]$ sudo diff /usr/share/doc/sssd-common/examples/sssd-example.conf /etc/sssd/sssd.conf
164- 3c3
165- < services = nss, pam
166- ---
167- > services = nss, pam, sudo
168- 8c8,10
169- < ; domains = LDAP
170- ---
171- > domains = LDAP
172- >
173- > [sudo]
174- 15,17c17,19
175- < ; [domain/LDAP]
176- < ; id_provider = ldap
177- < ; auth_provider = ldap
178- ---
179- > [domain/LDAP]
180- > id_provider = ldap
181- > auth_provider = ldap
182- 22,24c24,26
183- < ; ldap_schema = rfc2307
184- < ; ldap_uri = ldap://ldap.mydomain.org
185- < ; ldap_search_base = dc=mydomain,dc=org
186- ---
187- > ldap_schema = rfc2307
188- > ldap_uri = ldaps://ldap.lug.ustc.edu.cn
189- > ldap_search_base = dc=lug,dc=ustc,dc=edu,dc=cn
190- 30c32
191- < ; cache_credentials = true
192- ---
193- > cache_credentials = true
162+ ` ` ` ini title="/etc/sssd/sssd.conf"
163+ --8<-- "sssd.conf"
194164` ` `
195165
196166!!! danger "坑"
0 commit comments