10年 Java程序员,硬核人生!勇往直前,永不退缩!

欢迎围观我的git:https://github.com/R1310328554/spring_security_learn 寻找志同道合的有志于研究技术的朋友,关注本人微信公众号: 觉醒的码农,或Q群 165874185

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

 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

 

 

posted on 2017-05-31 12:08  CanntBelieve  阅读(1366)  评论(0编辑  收藏  举报