SUMMARY: Multi-vendor NIS does not work as expected

From: Ralph Waters (
Date: Wed Jan 22 1992 - 00:52:18 CST

Sorry for the long delay before I responded, but with a couple of holidays
and some time taken to test things out, it took longer than I intended to

A long, long time ago, I asked:

>I have an interesting problem, almost like one of the FAQs, but not
>quite the same.
>We have a bunch of machines, Dec Stations and Suns, all NISed together.
>One of the DEC Servers is the NIS master.
>The problem is that the Suns will not query the Domain Name Server to
>resolve addresses that are not defined in the NIS map. The Dec Stations
>will query the resolver, but the Suns will not.
>I can see from the FAQ list what I need to do to make the Sun use the
>resolver, if it were the NIS master (which it isn't), but I can't
>figure out what to do when the DEC Server is the master.

The bottom line seems to be that this configuration won't work.

I received serveral responses suggesting that the Sun be made the NIS master,
but this hasn't been tried yet, so I don't know if this will work. After
further thought and research into TFM, I don't believe that it will work.

It seems that a Sun NIS client will only work if it binds to a Sun NIS server,
since the Sun client expects the server to do the DNS lookup, and this will
only happen with a Sun server. Since there is no control over which NIS
server a client binds to, a mixed Dec/Sun NIS server environment is doomed
to fail.

Anyway, thanks for all of the help...


Some of the more informative responses:

I'm afraid you can't really do what you want to. The only solution would
be to make ALL of your YP (NIS) servers SUNs. DEC uses a different approach
for finding unknown hosts.

 the Sun ypserver will answer requests from the "normal" database of hosts,
 and go to a DNS nameserver to resolve names not in the "normal" database,
 and send that response out as a normal NIS response.

 the DEC machines have a set list of things they go through - they can check
 local hosts files, NIS databases, or DNS, so that if a lookup on one of these
 fails, the next one will be checked. However, the NIS servers do not do
 DNS lookups on their own - they simply respond with the items from their

Are any of your Suns slave servers? If so, then they are getting
their maps from the DEC master, and those maps almost certainly
don't have the magic key that says "go ask NIS" (the one that
gets generated with the "-b" option to makedbm.

1. write a program to add the key to the map you get from the master
2. don't use Suns as slave servers.
3. make one of the Suns the master.
4. install a C shared library that uses DNS instead of YP for hostname
lookups on all the Suns.

The Suns expect that the ypserver will do *all* name resolving,
including the DNS requests. There is a "-b" option to makedbm on the
Suns to enable DNS lookups on anything in the maps.

The only way to get the Suns to use DNS is to change the shared
library so that they only use the DNS resolver instead of NIS for host
name/IP addresss lookups.

Answer: you can't have the DEC server be the master and still have your
Sun hosts do DNS queries.

Reason: Sun places a special flag at the end of the hosts.* YP maps that
tells the YP client to do a DNS lookup if it can't resolve the host from
the map. No other vendor's implementation does this. On the plus side,
I don't know of a YP implementation that chokes on Sun's flag, so you
won't get hurt by making the Sun the YP master (at least in that respect).

Making a DEC a NIS Master in a mixed environment is a mistake. The SUNs will
use DNS ONLY if the master NIS server is a SUN, AND the -b flag is set in the
Makefile in /var/yp on the NIS Master. (see the comments there). The SUN NIS
Master does not have to be the DNS server.

Your only other option is to rebuild libc on all the SUNs.

There is no way to use a DEC Ultrix machine as the NIS master in
a heterogeneous Sun/DEC environment. The Sun gethostby* calls
expect that the NIS call will return the answer, either from
local info or by querying the resolver. DEC's implementation
has the gethostby* code read the svcorder file and
make the queries in the listed order.

Thanks to:

Neil W Rickert <> (Ronald Hall) (Ian MacPhedran) (William LeFebvre) (Joseph F. Young) (Michael Helm) (Hal Pomeranz) (John M. Blasik) (Eckhard Rueggeberg) ( Birger Wathne)
Mike Walker <>

Ralph Waters                | Internet:
Harris GISD, MS W3-7746     | Phone: (407) 984-5693
PO Box 98000                | FAX:   (407) 984-6323
Melbourne, Florida 32902

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:34 CDT