我安装了nss_ldap,编辑了nsswitch.conf以使用ldap;下面是我的/etc/ldap.conf内容:
host ldap.<mycompany>.com
base o=<mycompany>,c=<cc>
bind_policy soft
nss_reconnect_tries 4
nss_reconnect_sleeptime 1
nss_reconnect_maxsleeptime 16
nss_reconnect_maxconntries 2当我这么做
getent passwd我对公司的所有用户名都有正确的看法。但如果我做了
getent passwd <some user>如果使用已知的有效用户名,则不会返回任何内容,就好像用户不存在一样。(它适用于本地非ldap用户)
如果我在启用调试的情况下编译nss_ldap,则前者输出大量调试消息,如: nss_ldap:==> do_result nss_ldap:<== do_result nss_ldap:==> _nss_ldap_assign_userpassword nss_ldap:<== _nss_ldap_assign_userpassword
但后者并没有显示出任何东西。在syslog里也什么都没有。
这让我很困惑。我应该从哪里开始寻找这个问题呢?知道它会在哪里吗?
客户端正在运行Gentoo linux,nss_ldap-264。LDAP服务器超出了我的控制范围。
发布于 2010-08-31 16:38:55
您是否使用命名缓存守护程序nscd?它可能具有用户的负缓存,在这种情况下,运行/usr/sbin/nscd -i passwd将使缓存失效并导致重取。
getent passwd之所以有效,是因为它绕过了nscd。
https://serverfault.com/questions/176590
复制相似问题