On 2/24/06, mike ledoux <[EMAIL PROTECTED]> wrote:
> At least on my system, 'host' doesn't use /etc/nsswitch.conf at all:

  Good point.

> I believe this is by design, the host command is specifically
> intended to query DNS.

  Yes.  "host", "dig", and "nslookup" all come from the BIND suite
(part of "bind-utils" on Red Hat).  They're DNS diagnostic tools, not
programs which use DNS as an application.

  Most programs (ping, Firefox, etc.) are going to use the
gethostby*() library calls, which is where NSS (the name service
switch) comes in.  In effect, Firefox calls
"gethostbyname(www.google.com)" to get the host information for
Google.  NSS might check local files, NIS, DNS, LDAP, SMB, or any
number of other things to get that information.

  The attached Perl script provides a command-line interface to the
gethostby*() calls.

Attachment: gethost
Description: Binary data

Reply via email to