NIS hosts searched by some applications but not others in Fedora
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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,
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.
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.)
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.)
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
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.