Friday, February 09, 2007

Backup NIS+ Tables

Today we had some serious problems with our NIS+ tables. I would strongly advise that you make a backup of the /etc/.rootkey file and /var/nis directory. Also, you should dump the NIS+ tables to files on a frequent basis.

Here is a recommended procedure:

If C shell
# cd /var/nis/backup
# setenv PATH $PATH:/usr/lib/nis

If Bourne or Korn Shell
# PATH=$PATH:/usr/lib/nis; export PATH
# nisaddent -d aliases > aliases
# nisaddent -d bootparams > bootparams
# nisaddent -d ethers > ethers
# nisaddent -d group > group
# nisaddent -d hosts > hosts
# nisaddent -d netgroup > netgroup
# nisaddent -d netid > netid
# nisaddent -d netmasks > netmasks
# nisaddent -d networks > networks
# nisaddent -d passwd > passwd
# nisaddent -d protocols > protocols
# nisaddent -d publickey > publickey
# nisaddent -d rpc > rpc
# nisaddent -d services > services
# nisaddent -d trusted > trusted
# nisaddent -d timezone > timezone
# nisaddent -d auto_home.org_dir > auto_home
# niscat auto_master.org_dir > auto_master
# niscat auto_direct.org_dir > auto_direct

No comments: