I have a server where I am running nslcd to query an AD server, and use it for authorization, and this is working as expected. Now, I introduced nscd to reduce the load on the AD servers. The results are a bit weird. If I am running the nscd process normally (as nscd user or even root user), the daemon doesn't return any result.
[root@ldap-auth-test ~]# id testuser1
id: testuser: No such user
Now, to see why it is not working, I tried to strace the process.
strace -p 8327 -f -s 1000
and simultaneously, I did an id on testuser1 again. This time,
[root@ldap-auth-test ~]# id testuser1
uid=10004(testuser1) gid=10046(A-TESTGROUP1) groups=10046(A-TESTGROUP1) context=root:system_r:unconfined_t:SystemLow-SystemHigh
I tried multiple times to see if this is a coincidence, and observed that it is not. I tried not to attach to the threads, and could see that nscd is not working when I am not attaching to the threads. Any help is greatly appreciated.
[root@ldap-auth-test ~]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final
PS: I have asked the same on Stackoverflow as well, since I am not sure where to ask. I will delete the irrelevant one if someone can point out which one is.
EDIT:: Running nslcd in debug mode showed that, unless stracing on nscd, the daemon doesn't even use the nslcd to query. In short, a query is not fired at all unless using strace.