NIS+: Changing the IP address of a NIS+ server

1. First you need to dump the  NIS+ files

  # mkdir -p /var/tmp/nisfiles
  # cd /var/tmp/nisfiles

  # /usr/lib/nis/nisaddent -d aliases > aliases
  # /usr/lib/nis/nisaddent -d bootparams > bootparams
  # /usr/lib/nis/nisaddent -d ethers > ethers
  # /usr/lib/nis/nisaddent -d group > group
  # /usr/lib/nis/nisaddent -d hosts > hosts
  # /usr/lib/nis/nisaddent -d netgroup > netgroup
  # /usr/lib/nis/nisaddent -d netid > netid
  # /usr/lib/nis/nisaddent -d netmasks > netmasks
  # /usr/lib/nis/nisaddent -d networks > networks
  # /usr/lib/nis/nisaddent -d passwd > passwd
  # /usr/lib/nis/nisaddent -d protocols > protocols
  # /usr/lib/nis/nisaddent -d publickey > publickey
  # /usr/lib/nis/nisaddent -d rpc > rpc
  # /usr/lib/nis/nisaddent -d services > services
  # /usr/lib/nis/nisaddent -d shadow > shadow
  # /usr/lib/nis/nisaddent -d timezone > timezone
  # /usr/lib/nis/nisaddent -d -t auto_home.org_dir key-value >auto_home
  # /usr/lib/nis/nisaddent -d -t auto_master.org_dir key-value >auto_master

2.  Edit the newly dumped host files to reflect the new IP address.

3.  Erase all reference of the old NIS+ server
 
   # rm -f /etc/.rootkey
   # rm -fr /var/nis/*

4.  Put in the new IP address.
   # sys-unconfig

5. Initialize the new NIS+ server.

 #nisinit -r

6.  Run the NIS+ daemon at low security

 #/usr/sbin/rpc.nisd -r -B -S 0

7. Reinitialize the NIS+ client

 #nisinit -c  -B

8. Recreate the sub-directories org_dir and groups_dir

 #/usr/lib/nis/nissetup

9. Populate all NIS+ tables.

 #cd /var/tmp/nisfiles
 #/usr/lib/nis/nispopulate -v -F

10. Kill  the rpc.nisd daemon.

11. Restart the NIS+ server.

 #/etc/init.d/rcp rpcstart


  • solaris
    By : gnanam ( Fri Jul 21 04:34:54 2006 )


  • Name :
    Password :
    E-mail :
    Subject :
    Comments :



    UNIXguide.net
    Suggest a Site