Typically, NIS clients are configured with the nsswitch.conf file to use only NIS for machine name and address lookups. If this type of lookup fails, an NIS server can forward these lookups to DNS.
Log into the machine and become a superuser.
The two map files, hosts.byname and hosts.byaddr must include the YP_INTERDOMAIN key. To test this key, edit the Makefile and modify the following lines.
#B=-b B= |
to
B=-b #B= |
makedbm will now start with the —b flag when it makes the maps, and the YP_INTERDOMAIN key will be inserted into the ndbm files.
Run make to rebuild maps.
# /usr/ccs/bin/make hosts
Check that all the NIS server's /etc/resolv.conf files point to valid nameservers.
If you have NIS servers that are not running Solaris, Release 2, make sure YP_INTERDOMAIN exists in the hosts maps.
To enable DNS forwarding, stop each server.
# /usr/lib/netsvc/yp/ypstop
Restart each server.
# /usr/lib/netsvc/yp/ypstart
In this implementation of NIS, ypstart will automatically start the ypserv daemon with the —d option to forward requests to DNS.
If the master and slave servers are not both running Solaris 2, refer to the following table for how to avoid potential problems. The notation “4.0.3+” refers to the that and later releases of SunOS. makedm —b is a reference to the “-B” variable in the Makefile.
Table 9–1 NIS/DNS in Heterogeneous NIS Domains
Slave |
|
Master |
|
|
4.0.3+ |
|
Solaris |
4.0.3+ |
Master: makedbm —b Slave: ypxfr |
Master: makedbm —b Slave: ypxfr |
Master: ypserv —d ypxrf —b |
Solaris NIS |
Master: makedbm —b Slave: ypxfr |
Master: makedbm —b Slave: ypxfr |
Master: ypserv —d Slave: ypxfr with resolv.conf or ypxfr —b |