Friday, February 3, 2012

Setting up a NIS slave server

This note explains how to setup a nis slave server. It is assumed that you have a NIS server running .

       Existing NIS server  named  mahalanobis  on
       The slave  server is to be set up  is named  gauss on

Install ubuntu 10. 04 Lucid on  gauss Setup the network interface and make sure that it works as a standalone machine.

Install NIS software on Gauss

 # apt-get install   portmap nis

Setup the slave as a NIS client

 Edit /etc/yp.conf  and add

Edit  /etc/hosts on master ( Mahalanobis) and add an entry for slave    gauss
Edit  /etc/hosts on  slave ( Gauss) and add an entry for master     mahalanobis

Log on to the master server. Add the slave server to the master 
server's database map by editing the /var/yp/ypservers file on the 
 # File: /var/yp/ypservers
The make file in the /var/yp directory defines how the NIS server will 
build the database map and how the master will relate to the NIS slave. 
Edit the make file to allow the master to push maps to the slave.

# File: /var/vp/Makefile
# Allow the master to do database pushes to the slave

Run make command. (You must be in /var/yp )

Iniitialise slave database 
#  /usr/lib/yp/ypinit -s  mahalanobis

On   slave ( gauss) edit /etc/defaults/nis ) Change  the flag NISSERVER to slave

  # /etc/defaults/nis    Configuration settings for the NIS daemons.

# Are we a NIS server and if so what kind (values: false, slave, master)?

Restart   nis services on  slave

  #/etc/init.d/nis restart


   On a client machine which is being authenticated by the master edit /etc/yp.conf  and change the  ypserv  entry to point to the new slave machine.
Restart nis on that client machine and see if you are able to login.

No comments: