SunSolve Internal
 

Infodoc ID   Synopsis   Date
21287   Moving NIS+ root master to different With Same IP and Name   21 Dec 1999

Description Top

How to Move the NIS+ root master to a new machine With Same IP and NAMEDETAIL 

DESCRIPTION:This tip sheet assumes that you already have a NIS+ master configured and 
need to move to another mechine but with the same ip address, name, and credentials.

SETTING UP THE NEW MACHINE AS THE ROOT-MASTER:

----------------------------------------------

1) Dump the nis+ datbase from the old master:    

   old-master# mkdir /var/nisfiles  
   old-master# cd /var/nisfiles    
   old-master# /usr/lib/nis/nisping -C groups_dir.`domainname`.  
   old-master# /usr/lib/nis/nisping -C org_dir.`domainname`.  
   old-master# /usr/lib/nis/nisping -C `domainname`.    
   old-master# nisaddent -d aliases > aliases  
   old-master# nisaddent -d bootparams > bootparams  
   old-master# nisaddent -d ethers > ethers  
   old-master# nisaddent -d group > group  
   old-master# nisaddent -d hosts > hosts  
   old-master# nisaddent -d netgroup > netgroup  
   old-master# nisaddent -d netid > netid  
   old-master# nisaddent -d netmasks > netmasks  
   old-master# nisaddent -d networks > networks  
   old-master# nisaddent -d passwd > passwd  
   old-master# nisaddent -d protocols > protocols  
   old-master# nisaddent -d publickey > publickey  
   old-master# nisaddent -d rpc > rpc  
   old-master# nisaddent -d services > services  
   old-master# nisaddent -d shadow > shadow  
   old-master# nisaddent -d timezone > timezone  
   old-master# nisaddent -d -t auto_home.org_dir key-value > auto_home  
   old-master# nisaddent -d -t auto_master.org_dir key-value > auto_master  

   please copy all ascii files of customised tables into /var/nisfilesdirectory.  

2) Make a "/var/nisfiles" directory on the new master and copy all the files    
   under /var/nisfiles on the old master to /var/nisfiles on the new master.      

   As the same IP and the name are being used for the old master and   
   the new master machines, the files need to be copied to a third machine.   

   Then, the old-master must be removed from the network and the new master   
   configured so that it assumes the name and IP address of the old master. 

3) Build the new master

***NOTE: If the new-master is already an NIS+ machine (replica/client)   
         belonging to the old domain, NIS+ has to be removed from the machine  
     
   new-master# cp /etc/nsswitch.files /etc/nsswitch.conf  
   new-master# /etc/init.d/rpc stop  
   new-master# rm -f /etc/.rootkey  
   new-master# rm -rf /var/nis/*  
   new-master# rm -rf /etc/defaultdomain  
   new-master# /etc/init.d/rpc start  

4) Change the root passwd to the root-passwd of the old-master   

*** REBOOT at this point.  

   new-master# nisserver -v -r -d <domainame.with.railing.dot>   

5) Populate the tables on the new master.     

   new-master# cd /var/nisfiles   
   new-master# nispopulate -v -F     
   new-master# keylogin -r  

6) Update the database with the original publikeys.     

   new-master# nisaddent -rv -f /var/nisfiles/publickey  publickey

7) Bring the rpc.nisd to unsecure level.      

   new-master# ps -ef | grep rpc.nisd   
   new-master# kill -9 <pid of rpc.nisd>   
   new-master# /usr/lib/nis/rpc.nisd -S0   

8) Update the directory objects and the .rootkey   

   new-master# nisupdkeys <domain>.  org_dir.<domain> . groups_dir.<domain>.   
   new-master# keylogout -f   
   new-master# keylogin -r     ---> please use the original root passwd here   

9) Restart the rpc.nisd in level 2   

   new-master# ps -ef | grep rpc.nisd   
   new-master# kill -9 <pid of rpc.nisd>   
   new-master# /usr/lib/nis/rpc.nisd

10) Checkpoint the database     

   new-master# nisping -C org_dir   
   new-master# nisping -C groups_dir   
   new-master# nisping -C

SunWeb Home SunWeb Search SunSolve Home Simple Search

Sun Proprietary/Confidential: Internal Use Only