> i then editted /etc/nsswitch.conf and modified the
> following line:
> hosts: files
> to this:
> hosts: files dns
>
> after this i could browse to google.com in firefox
> and resolve it via a host lookup
Your entry for host is wrong! Most people make the same mistake and I blame
Suns documentation on it. The entry should look like this:
hosts: files [SUCCESS=return] dns
The search order and when to fall out is important. If you do not tell the
search to leave after it has found the entry in files it will ALWAYS go to DNS.
Every time every application makes a call to gethostbyname "including
localhost" it will go out to DNS {if it does not have the entry in dnlc}. The
above example will stop the search if it finds what it is looking for in files.
I really wish Sun would fix the documentation to prevent this gross error from
being propagated.
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]