LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2008, 01:28 PM   #1
Dan Kimberg
LQ Newbie
 
Registered: Mar 2007
Distribution: Fedora, Centos
Posts: 6

Rep: Reputation: 0
NIS hosts searched by some applications but not others in Fedora


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 (a different machine) seems to be just fine, at least to the extent machine running earlier distributions (FC7 mostly) are happy. And from my machine I do get the expected results from ypcat and ypmatch. The passwd service works.

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 this issue would be greatly appreciated. Thanks,

dan
 
Old 12-20-2008, 11:46 PM   #2
mackdav
Member
 
Registered: Feb 2005
Distribution: RHEL, CentOS
Posts: 113

Rep: Reputation: 16
Applications which use the built-in resolver libraries should obey /etc/nsswitch.conf -- in your case you want the "hosts" line.

Applications which use their own resolvers have to be dealt with on an individual basis -- ie sendmail (practically) always uses DNS no matter what is in /etc/nsswitch.conf.
 
Old 12-21-2008, 06:34 AM   #3
Dan Kimberg
LQ Newbie
 
Registered: Mar 2007
Distribution: Fedora, Centos
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mackdav View Post
Applications which use the built-in resolver libraries should obey /etc/nsswitch.conf -- in your case you want the "hosts" line.

Applications which use their own resolvers have to be dealt with on an individual basis -- ie sendmail (practically) always uses DNS no matter what is in /etc/nsswitch.conf.
mackdav, thanks for the suggestion, but I don't think this is the issue. All of the programs I tested open nsswitch and the nis module (verified with strace), and they do change their behavior according to the rest of the hosts line on nsswitch.conf (i.e., if you remove "files" and/or "dns" they can no longer resolve names unique to the removed source). Also, it just seems unlikely that a whole bunch of programs would stop using nsswitch.conf with the new Fedora release (possibly with Fedora 9) to decide how to resolve names without any mention anywhere.

That said, I'm willing to try anything. If it's really true that telnet no longer uses nsswitch.conf to decide if it should consult NIS, what does it use? How can I tell it I'm using NIS? (The same question applies to ssh, firefox, and most other networking programs.)

Thanks for any info.

dan
 
Old 12-23-2008, 08:58 AM   #4
Sabba Hillel
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 1
Quote:
Originally Posted by Dan Kimberg View Post
mackdav, thanks for the suggestion, but I don't think this is the issue. All of the programs I tested open nsswitch and the nis module (verified with strace), and they do change their behavior according to the rest of the hosts line on nsswitch.conf (i.e., if you remove "files" and/or "dns" they can no longer resolve names unique to the removed source). Also, it just seems unlikely that a whole bunch of programs would stop using nsswitch.conf with the new Fedora release (possibly with Fedora 9) to decide how to resolve names without any mention anywhere.

That said, I'm willing to try anything. If it's really true that telnet no longer uses nsswitch.conf to decide if it should consult NIS, what does it use? How can I tell it I'm using NIS? (The same question applies to ssh, firefox, and most other networking programs.)

Thanks for any info.

dan
The answer appears to be this (thanks to pari for posting it.)

http://www.linuxquestions.org/questi...ora-10-689134/

there is a problem with glibc-2.9-2 upgrade it to glibc-2.9-3
can be downloaded from
http://koji.fedoraproject.org/koji/b...?buildID=73861

package to download are
glibc-2.9-3.i686.rpm
glibc-common-2.9-3.i386.rpm
glibc-headers-2.9-3.i386.rpm
glibc-devel-2.9-3.i386.rpm
glibc-utils-2.9-3.i386.rpm
glibc-2.9-3.i386.rpm

and install with rpm -Uv glibc-2.9-3.i686.rpm glibc-common-2.9-3.i386.rpm glibc-headers-2.9-3.i386.rpm glibc-devel-2.9-3.i386.rpm glibc-utils-2.9-3.i386.rpm glibc-2.9-3.i386.rpm
 
Old 12-23-2008, 09:24 AM   #5
Dan Kimberg
LQ Newbie
 
Registered: Mar 2007
Distribution: Fedora, Centos
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Sabba Hillel View Post
The answer appears to be this (thanks to pari for posting it.)

http://www.linuxquestions.org/questi...ora-10-689134/

there is a problem with glibc-2.9-2 upgrade it to glibc-2.9-3
Terrific, thanks for connecting these two threads. It looks like I recently installed 2.9.3 with a routine update and didn't notice this issue was resolved. For anyone else who might stumble across this thread, if you're using Fedora 10 you can get a fixed glibc with yum in the usual way ("yum update" for everything, or "yum update glibc\*" for just glibc stuff).

dan
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NIS: NIS running but users not able to log in with NIS credentials outerspace Linux - Server 3 10-17-2007 08:51 AM
/usr/local/lib not searched for shared objects in Redhat/Fedora? Arodef Programming 2 09-23-2005 12:44 AM
Fedora and NIS killjoyce Linux - Networking 7 02-23-2005 03:45 AM
Fedora Core 2 and NIS/NFS Rekna Linux - Software 1 06-27-2004 01:11 PM
NFS, NIS, and Fedora 2 jmoody Fedora 2 06-23-2004 05:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration