Re: Strange resolve problem



On Mon, 02 Apr 2007 16:32:45 -0700, phwashington wrote:

It was the nsswitch.conf file. I've never had this happen before when I
was setting up a system.
It had
hosts: files nis dns
set it to
hosts: files dns nis
or
hosts: dns files nis
and it works just fine.

Unless you have some specific reason to do so I suggest that you do not
use NIS at all for name resolution. You didn't mention in your OP that
you were doing so, otherwise I would have commented on it. I have never
seen any distro insert it by default so I assume you have added it. Why?

It is conventional to use "files dns" for the hosts resolution order, with
good reason. Most answers will come from DNS, the service designed for the
purpose, but you can override it on a per machine basis by adding
/etc/hosts entries. Additionally, putting a machine's local addresses into
its own /etc/hosts enables it to resolve itself if the DNS server or
network is down.

If you use NIS for host resolution then, unless you take special steps
when generating the map, you are propagating the NIS master's hosts file
to all the clients. Which is normally not what you want. In your case it
appears that an erroneous hosts file, with its owner's name attached to
127.0.0.1, got propagated thus.

NIS is best used for users, groups, netgroups and (arguably) services.
Whatever Sun say:)

Regards, Ian
.



Relevant Pages

  • Re: Slow DNS Lookup - Debian
    ... >> hosts: files nisplus nis dns ... >> and if you don't run NIS or NIS+, you can speed things up slightly by ... use tcpdump to see that you are using responsive name servers. ...
    (comp.os.linux.networking)
  • Re: Putting DNS names in NIS tables.
    ... >Do most of you Unix admins put your DNS names in your NIS host tables? ... you can enter them in the hosts file on your NIS ... NIS master's hosts file would be those not in dns or those that you might ...
    (comp.sys.sgi.admin)
  • Re: Putting DNS names in NIS tables.
    ... >Do most of you Unix admins put your DNS names in your NIS host tables? ... you can enter them in the hosts file on your NIS ... NIS master's hosts file would be those not in dns or those that you might ...
    (comp.unix.solaris)
  • Re: Putting DNS names in NIS tables.
    ... >Do most of you Unix admins put your DNS names in your NIS host tables? ... you can enter them in the hosts file on your NIS ... NIS master's hosts file would be those not in dns or those that you might ...
    (comp.sys.sun.admin)
  • Re: Putting DNS names in NIS tables.
    ... >Do most of you Unix admins put your DNS names in your NIS host tables? ... you can enter them in the hosts file on your NIS ... NIS master's hosts file would be those not in dns or those that you might ...
    (comp.unix.admin)