The nsswitch.conf it's not working
Hi Syspo,
I have a doubt,
I have a configured /etc/hosts for my hosts, i have a DNS, and too the /etc/nsswitch.conf is configured for read it.
I have a /etc/resolv.conf configured for my DNS.
So, why the nslookp command it's not working? The same case for my ping command?
I have Solaris 8.
Regards,
Pablo Salazar
# 1
hmm, more details would be nice, like what changes were made to nsswitch.conf and resolv.confbut assuming you made the right changes, is there a process called "nscd" running? (if there is, kill it) it's the name server cache daemon...
# 2
Sorry for the information reduced.
The changes on nsswitch.conf i do it on
hosts: files dns
And, resolv.conf is:
domain mydomain.net
nameserver: ip-address-of-DNS
I see that nscd is running, you say that i kill it?
Thanks in advanced.
Pablo Salazar
# 3
yes, the easiest way would be to /etc/init.d/nscd stopif you want to run it, it's just a caching daemon (supposedly speeds up name lookups) for name services. you can restart with /etc/init.d/nscd start
# 4
Try running nslookup with the debug switch (nslookup -d2) where d2 for exhaustive debug.nslookup does a reverse lookup of the nameserver before it can continue. If somehow, you aren't being able to do a reverse lookup, nslookup won't work.hth,Dwai.
# 6
nslookup _never_ looks at nsswitch.conf; it simply queries the name server(s) listed in /etc/resolv.conf. I don't think it even looks at /etc/hosts
If you want to test /etc/nsswitch.conf settings correctly, use getent; e.g.
getent hosts www.sun.com
getent hosts myhost
NB: getent also works for other naming services, e.g. passwd, group, etc.