[NTLUG:Discuss] 'host' and /etc/hosts
terry
kj5zr at yahoo.com
Thu Oct 2 17:14:35 CDT 2003
> On Thursday 02 October 2003 10:59 am, brad angelcyk wrote:
>
>>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?
>
>
> Pretty much, yes. The host, dig, and nslookup commands are part
> of the bind software package and interact strictly with DNS
> servers (and ONLY DNS servers) via the bind API.
>
> Most other stuff uses glibc for hostname lookups. glibc in turn
> uses NSS modules, which are usually configured to look up
> hostnames first via /etc/hosts, and then via DNS. Kind of an
> annoying inconsistency, I know...
>
Even if the fist line of /etc/resolv.conf contains,
search my.domain.name
?
More information about the Discuss
mailing list