Setup and Configure NIS on Solaris 10
WHAT IS NIS :
NIS is a Network Information Service consist of Server-client protocol for distributing system configuration data such as user and hostnames between computers on computer networks.
Following is the process of Configuring NIS server and NIS client
1. Setup NIS Server
2. Setup up NIS slave
3. Setup NIS client
Setup NIS Server:
First thing is to copy the NIS file to CONF file.
# cp /etc/nsswitch.nis /etc/nsswitch.conf
Select the domainname
# domainname lab.com
# domainname > /etc/defaultdomain
Domainname has been created.
# cd /etc
Following files have to be cretaed using touch
# touch ethers bootparams locale timezone netgroup netmask
Make this system as master server
# ypinit -m
Give the hostname of the system
^D
Then press y’y’ for correct
And then ‘q’ for quit
Start the NIS demons
# /usr/lib/netsvc/yp/ypstart
Now create the nis map on the server
# cd /var/yp
# /usr/ccs/bin/make
This will setup your NIS MASTER SERVER . To test it type
# ypwhich
It will display the name of the master server.
Setup NIS Slave Server
Copy nis files to conf file
# cp /etc/nsswitch.nis /etc/nsswitch.conf
Give domainname
# domainname lab.com
# domainname > /etc/defaultdomain
Make this sytem as NIS Slave server
# ypinit -s
Enter the master server host name
press y
press ^D
Start the NIS demons
# /usr/lib/netsvc/yp/ypstart
This creates the NIS SLAVE SERVER
Setup NIS Client
Copy the nis files to conf files
# cp /etc/nsswitch.nis /etc/nsswitch.conf
Give domainname
# domainname lab.com
# domainame > /etc/defaultdomain
Make the system as NIS client
#ypinit -c
Enter the master server name
Enter the slave server name
press ‘y’
press ^D
Start the NIS demons
# /usr/lib/netsvc/yp/ypstart
# ypwhich
will list the master server
Now next step is to create a user on NIS master and try to login on Client system
# useradd -d /export/home/new-user -m -s /bin/ksh new-user
# usermod -d /home/new-user
# passwd new-user
Configure user’s home directory to reside on the server for that edit /etc/dfstab file.
Edit /etc/auto_master file
Comment all line with # and change /home to /- and change -nobrowse to -browse
Also, edit /etc/auto_home file
Comment all the line and enter following things
/export/home Master-server-ip or hostname:/export/home
save and quit
Update the master map
# cd /var/yp
# /usr/ccs/bin/make
Now login with the user name and password on the client system, it will login directly to the user’s home directory.

Leave a Reply