首页 > 代码库 > getent passwd 不能访问到 ldap 的用户
getent passwd 不能访问到 ldap 的用户
getent passwd 不能访问到 ldap 的用户,搞了一整个下午! 依然没搞定,
一开始是不知道nslcd 需要启动,另外getent passwd 域, 无有用结果,
换个方式搜索
getent passwd cant show domain user
终于算是找到了 http://superuser.com/questions/292199/why-doesnt-getent-show-openldap-users !!!
原来/etc/sssd/sssd.conf 的配置一直是错误的, 因为我用的是 setup 设置的, 但是其中又出现
应该是
ldap_search_base = dc=test,dc=com
但是,setup 设置之后又变成了 etest:
ldap_search_base = dc=etest,dc=com
原来通过 nslcd -d 可以调试!!
I started nslcd in debug mode: nslcd -d
and saw in the statements that it was looking for objectclass posixAccount. All the entries in my LDAP were of type inetOrgPerson. I had to include the nis.schema in the slapd.conf file, and then add posixAccount as an auxiliary objectclass to each entry. Then, I could finally use getent to see accounts inside LDAP.
Cross posted here:
http://serverfault.com/questions/282349/is-it-necessary-to-synchronize-users-between-ubuntu-client-and-ldap
getent passwd 不能访问到 ldap 的用户