Re: Why isn't /etc/nsswitch.conf setup honored by RH 8.0?

From: Ian Northeast (ian_at_house-from-hell.demon.co.uk)
Date: 09/05/03


Date: Fri, 05 Sep 2003 00:59:14 +0100

Jim Carter wrote:
>
> Do you mean to say that nslookup, dig, and host do not honor name resolution
> protocol? Why would they go directly to the nameserver instead of honoring
> nsswitch? How could they possibly work on a system that used only the
> /etc/hosts file and had no nameserver or nis? I'm more confused now than
> before....

Nslookup, dig and host are part of the bind suite and are for looking up
names in DNS. They are not supposed to use the regular resolver library
routines.

You would not use them on a system with no nameserver.

They won't use NIS either.

In most Linux systems ping is probably the best bet for determining what
a name resolves to using the standard resolver. Even if the ping doesn't
succeed it will tell you what address it is trying.

It could be argued that this is a deficiency. IBM think so for instance,
and ship a special version of "host" in AIX which uses the standard
resolver. This does get a little confusing when you support both AIX and
Linux systems:) And of course, IBM's host is not open source so it can't
be ported. It shouldn't be too hard to write an equivalent though, it
appears to do little but call gethostbyname().

Regards, Ian



Relevant Pages