Fedora Linux Support Community & Resources Center
  #1  
Old 5th December 2008, 03:51 PM
kimberg Offline
Registered User
 
Join Date: Dec 2008
Location: Phildealphia
Posts: 2
NIS hosts searched by some applications but not others

I've run into this problem with Fedora 10. For various reasons, I'm using a traditional network setup without NetworkManager, and networking is mostly working just fine. We use NIS for passwd/group and for hosts. The NIS server (which is on a different machine) seems to be working well for other machines (mostly running FC7). This is the first machine we've moved to anything more recent than FC8. From my machine I do get the expected results from ypcat and ypmatch, and the passwd service works without a hitch.

However, for hostname lookups, certain programs don't seem to be using the NIS server. For hostname chox (an example), which is listed only on NIS, "ping chox" works but "telnet chox" and "ssh chox" don't, both telling me "Name or service not known." I tried a few other random programs, so far ping is the only one that works.

I have given ypbind the -no-dbus option, and iptables are turned off. I've also edited /etc/host.conf, just in case, and I've rebooted a lot. I straced both ping and ssh to see what I could see at a superficial level, and both programs seem to be reading nsswitch.conf, loading libnss_nis, and eventually visiting the right place inside /var/yp/binding. But somehow only ping ends up resolving the name.

Any insight into what could be causing this issue would be greatly appreciated. Thanks,

dan
Reply With Quote
  #2  
Old 5th December 2008, 05:31 PM
arvinddeshpande Offline
Registered User
 
Join Date: Jun 2007
Posts: 122
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.
Reply With Quote
  #3  
Old 5th December 2008, 05:48 PM
kimberg Offline
Registered User
 
Join Date: Dec 2008
Location: Phildealphia
Posts: 2
Quote:
Originally Posted by arvinddeshpande View Post
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 (170.212.110.108) 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.
Reply With Quote
Reply

Tags
applications, hosts, nis, searched

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
So I searched and I googled... saltz Installation, Upgrades and Live Media 3 28th November 2007 10:19 AM
BCM4311 searched and still having probs Graph-X Servers & Networking 12 9th September 2007 08:32 PM
Searched And Came Up Short... Vito_Corleone Using Fedora 1 5th May 2005 03:34 PM
Ut2004 DVD(Yes, I have searched and tried) liraz Using Fedora 1 25th April 2005 01:43 PM
/usr/lib64 not being searched jorvis Using Fedora 1 12th June 2004 04:58 PM


Current GMT-time: 07:26 (Tuesday, 16-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat