The only problem is that this doesn't take into account your NIS slave servers.
If the slaves also have a resolv.conf they can forward the DNS names correctly,
_BUT_ it seems that they get their DNS names BEFORE they get NIS names. This
can cause some MAJOR headaches since a hostname will be returned from the DNS
as pgl-dev2.den.mmc.com instead of pgl-dev2. This, in turn, messes up
your .rhost and host.equiv files. If you put a default domain in resolv.conf
then gethostbyname() always adds that default name on to the request and if
the DNS server doesn't answer then it has been my experience (which may not
be correct) that NIS won't know who the guy is either. (ie. pgl-dev2 gets
the default domain .den.mmc.com appended to the request. My DNS server
knows this name but the NIS server only knows pgl-dev2, if DNS fails then
so does NIS).
It 'should' be easier than this.
To complicate things even more...
I'm running AIX 3.2 on RS6000's. Page 14-44 of "Communication Concepts and
Procedures" states the following:
In the middle of the page:
"Resolver routines on hosts running TCP/IP attempt to resolve names using the
following sources in the order listed:
1. The DOMAIN (named) name server
2. The local /etc/hosts file.
I you are using network information service (NIS) for name resolution, resolver
routines will attempt to resove names using the following sources in the order listed:
1. The DOMAIN (named) name server
2. Network Information Service (NIS)
If you are using network information service (NIS) for name resolution, the
local /etc/hosts file will not be consulted."
Later on on the _SAME_ page...
"NOTE: I you are using network information service for name resolution, resolver routines will attempt to resolve names using the following sources in the order listd:
1. Network Information Service
2. The DOMAIN (named) name server
3. The local /etc/hots file"
I've read this 30 times or more to see if there is some 'qualifying' information