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

[370 byte] By [pablo.salazar] at [2007-11-25 23:25:15]
# 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...
fim843 at 2007-7-5 18:12:06 > top of Java-index,General,Talk to the Sysop...
# 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

pablosalazar at 2007-7-5 18:12:06 > top of Java-index,General,Talk to the Sysop...
# 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
fim843 at 2007-7-5 18:12:06 > top of Java-index,General,Talk to the Sysop...
# 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.
implicate_order at 2007-7-5 18:12:06 > top of Java-index,General,Talk to the Sysop...
# 5
Try removing the : from the nameserver line.resolv.conf should bedomain domain_namenameserver ip_addrnsswitch.conf should have the following for the hosts linehosts:files dnsIain
cr1970 at 2007-7-5 18:12:06 > top of Java-index,General,Talk to the Sysop...
# 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.

larien at 2007-7-5 18:12:06 > top of Java-index,General,Talk to the Sysop...