(forw) Re: [Gllug] Resolving question
Jack Bertram
jack at jbertram.net
Tue Nov 30 15:57:21 UTC 2004
----- Forwarded message from Jack Bertram <jack at jbertram.net> -----
* Tethys <tet at createservices.com> [041130 15:34]:
>
> Jack Bertram writes:
>
> >Do _all_ (normal) programs use the resolving order defined in
> >resolv.conf? I anticipate some DNS difficulties over the next few days
> >and want to know whether I can add /etc/hosts entries to overcome these
> >for one particular server.
>
> Yes and no. They use the gethostbyname() function, which first checks
> /etc/nsswitch.conf to see the order in which to try hostname lookups.
> Usually, this will be "files dns". Some people will have NIS in there,
> too, but unless you *really* need that (and I can't think of any cases
> where that would be true), remove it.
Ah, I meant nsswitch.conf instead of resolv.conf for resolving order,
didn't I. resolv.conf defines nameservers.
> Thus it will first check local files (in this case, /etc/hosts). If it's
> not found there, it will then move on to DNS, and use the contents of
> /etc/resolv.conf
>
> You don't need to make any changes to the application.
Great, thanks
j
----- End forwarded message -----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20041130/975a5a9b/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list