Originally Posted by arvinddeshpande
You might already know this but check /etc/resolv.conf and also look in to /etc/nsswitch.conf.
Your /etc/resolv.conf should have the correct DNS which should be able to resolve the chox name.
I am not sure what you mean by "ping is resolving the name" and everything else falls apart.
Thanks for the quick reply. resolv.conf is correct, but it's really irrelevant here. The hosts are not known to our DNS, they are only known via NIS. nsswitch.conf lists nis as the second choice for hosts, i.e.:
hosts: files nis dns
I know ping resolves the name, because if I ping chox, I get:
PING chox.XXXXX (126.96.36.199) 56(84) bytes of data.
If I remove nis from the hosts line in nsswitch.conf, then it fails to resolve chox as one would expect ("ping: unknown host chox"). So clearly ping can resolve "chox" into the correct IP address, but somehow telnet and various other programs cannot.
Poking into things just a little further, I can see that telnet does at some level least discriminate between hosts that get a NIS response and those that don't, as you can see from the following output:
[kimberg@rage] ~> telnet chox
telnet: chox: Name or service not known
[kimberg@rage] ~> telnet choxx
telnet: choxx: Name or service not known
choxx: Unknown host
Note the extra line of output for the host choxx, which is not known to our NIS server. However, mysteriously, this extra line disappears if I take the dns server out of nsswitch.conf. This is mysterious because neither hostname is known to our dns server, but it does suggest that telnet is probably getting some information back from the NIS server about chox.
I also forgot to mention in my original post that I have turned nscd off, just to make things easier to troubleshoot.