getent passwd 不能访问到 ldap 的用户

本文介绍了如何解决getent passwd无法显示LDAP用户的问题。作者发现问题是由于sssd.conf配置文件中ldap_search_base设置错误导致,并通过调试nslcd找到了解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 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

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值