[NTLUG:Discuss] 'host' and /etc/hosts
Cameron, Thomas
Thomas.Cameron at bankofamerica.com
Thu Oct 2 11:11:10 CDT 2003
> -----Original Message-----
> From: brad angelcyk [mailto:bradangelcyk at yahoo.com]
> Sent: Thursday, October 02, 2003 10:59 AM
> To: discuss at ntlug.org
> Subject: [NTLUG:Discuss] 'host' and /etc/hosts
>
>
>
> Hi all. I am adding an entry to /etc/hosts, and when
> I use the 'host' or 'nslookup' commands, the hostname
> returns "Host <hostname> not found: 3(NXDOMAIN)".
> Although, when I ping the hostname or telnet to it, it
> does look up the IP correctly. Is this standard?
>
> Brad
>
>From man host:
host is a simple utility for performing DNS lookups.
host uses the resolver listed in /etc/resolv.conf, not the resolver method defined in /etc/nsswitch.conf.
ping uses the resolver method defined in /etc/nsswitch.conf, so it will use /etc/hosts.
--
Thomas Cameron, RHCE, CNE, MCSE, MCT
Assistant Vice President
Linux Design and Engineering
Bank of America
The opinions expressed in this message are mine alone and do not necessarily reflect the opinions of my employer, Bank of America.
More information about the Discuss
mailing list