Server Side Configuration

1) export home directory on ur NIS server

# vim /etc/exports

2) Activate the exported directory

# exportfs  -a

3) start the following services

# service nfs restart

# service portmap restart

# service nfslock restart

4) Verify the list of exported directory by issuing the command

# showmount -e

5) Install the ypserv ypbind yp-tools make nd cached rpms by following command

# yum install ypserv* ypbind* yp-tools* cach* make*

6) Add the NIS domain you wish to use in the /etc/sysconfig/network file

# vim /etc/sysconfig/network


7) Start the following services

# service ypserv start

# service ypbind start

# service yppasswdd start

Make sure service starts on system reboot by issuing following commands

# chkconfig ypserv on

# chkconfig ypbind on

# chkconfig yppasswdd on

8) Edit Your /etc/yp.conf File

domain server

9)Initialize Your NIS Domain

# /usr/lib/yp/ypinit -m

10) Start the following service

# service ypxfrd start

# chkconfig ypxfrd on

11) Make Sure The Daemons Are Running

# rpcinfo  -p  localhost

12) Add New NIS Users

# useradd -g users nisuser

# passwd nisuser

# cd  /var/yp

13) check if the user’s authentication information has been updated by using the ypmatch command

# ypmatch nisuser passwd

NIS Client side Configuration

configure the NFS client first

14) start the following services

# service nfslock start

# service netfs start

# service portmap start

Make sure service starts on system reboot by issuing following commands

# chkconfig nfslock on

# chkconfig netfs on

# chkconfig portmap on

15) Keep a copy of the old /home directory, and create a new directory /home on which you’ll mount the NFS server’s directory.

# mv /home /

# mkdir /home

16) Mount the home directory of NFS Server on NFS Client

# mount -t nfs /home

# umount /home

17) Edit your /etc/auto.master file to refer to file /etc/auto.home for mounting information whenever the /home directory is accessed

# vim  /etc/auto.master

/home      /etc/auto.home –timeout 600

18) Edit file /etc/auto.home to do the NFS mount whenever the /home directory is accessed

*   -fstype=nfs,soft,intr,rsize=8192,wsize=8192,nosuid,tcp

19) Start the autofs service

# service autofs start

# chkconfig autofs on

20) Run authconfig

The authconfig program automatically configures your NIS files after prompting you for the IP address and domain of the NIS server

21) Start The NIS Client Related Daemons

# service ypbind start

# chkconfig ypbind on

Test NIS Access To The NIS Server

# ypcat passwd

# ypmatch nisuser passwd

# getent passwd nisuser

Posted in: Linux.
Last Modified: January 12, 2017

Leave a reply