SunSolve Internal


Infodoc ID   Synopsis   Date
21105   Moving a NIS Master from Solaris 2.x to a new Solaris 2.x machine   20 Dec 1999

Description Top

This article assumes that the new NIS master server will be running
Solaris 2.6 or higher.  If the new server will be running an
older Solaris OS, such as Solaris 2.5.1, then NSKIT 1.2 will
need to be installed on the system first.  Refer to Infodoc #11989
for installation NSKIT instructions.

1. On the old NIS master backup or make a copy of
any and all nis files used to build the maps. These 
might live in the /etc directory or whatever directory you
specified for DIR= and PWDIR= in the /var/yp/Makefile.
Here is a possible list of files, though you may not
need them all.

passwd
shadow
group 
hosts 
ethers 
networks 
rpc 
services 
protocols 
netgroup 
bootparams 
aliases 
publickey 
netid 
passwd.adjunct 
group.adjunct 
netmasks 
timezone 
auto.master 
auto.home 

2. On the new NIS master copy all the files over from the old NIS master
machine and put them in the directory used to store the database files, 
i.e. /var/etc.

3. Modify the /var/yp/Makefile to reflect this directory.
Have the Makefile DIR and PWDIR variable point to the correct directory for 
the target files.

From the Makefile: 

DIR =/etc               <---- this should point to location of all files aside 
                              from the passwd/shadow file.
                              * /var/etc for this example

PWDIR = /etc  		<---- this should point to the passwd/shadow file
DOM = `domainname`            * /var/etc for this example


4. If the new master is currently an NIS client, then remove NIS
from this machine prior to configuring it as the new NIS master.
See section 3.9 of the NIS PSD. Refer to Infodoc #12000.

5. Bring down the old NIS master. 

6. Setup the new Solaris machine as a NIS Master according 
the NIS PSD (infodoc #12000) section 3.1: How to Setup a NIS Master Server

Note: *****  the /var/yp/Makefile was modified earlier ******

7. Once the new NIS master is configured, then remove NIS from the old
master.  If you plan to reconfigure the old master as an NIS client or slave,
then refer to section 3.2 and 3.3 of the NIS PSD to set it up as a slave or
section 3.5 to set it up as a NIS client.

8. If you are keeping the hostname and IP address of the NIS master the same, 
then you will not have to rebuild the slaves.  If the new NIS master will have 
a different IP address or hostname, then you will need to remove NIS from the 
slave(s) and rebuild all of the NIS slave servers. Refer to section 3.2 and 3.3

of the NIS PSD to set up a NIS slave.

9. All the nis clients will now bind to either a slave(s) currently configured
or the new NIS master.  If you ran the ypinit -c to setup the clients, then you

will need to edit the file, 

	/var/yp/binding/'domainname'/ypservers

adding the name of the new NIS master to the list of servers and also removing 
the name of the old NIS master.

If the clients are running ypbind with the -broadcast option, then
this step is not necessary.
Product Area Gen. Network
Product YP/NIS
OS Solaris 2.x
Hardware n/a

Top

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only
Feedback to SunSolve Team