Step by Step NIS Server Configuration

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


About Manish Jha

Hi All I am Manish Kumar Jha aka Alex Hunt. I am currently working in Iono,Inc as Cloud Solutions Architect. I have around 8 Years of IT experience and have exposure on VMware vSphere, vCloud Director, RHEL and modern data center technologies like Cisco UCS and Cisco Nexus 1000v and NSX. If you find any post informational to you please press like and share it across social media and leave your comments if you want to discuss further on any post. Disclaimer: All the information on this website is published in good faith and for general information purpose only. I don’t make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this blog is strictly at your own risk. The Views and opinions published on this blog are my own and not the opinions of my employer or any of the vendors of the product discussed.
This entry was posted in Server Configuration. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s