You are here
Home > Redhat > NIS Server

NIS Server

Packages for Server: yptool, ypserv,ypbind

Install yptool,ypserv and ypbind packages in server system

To start service

service yppasswdd start

service nfs start

service portmap start

Configure domain name

Open /etc/sysconfig/network file and add the following line to assign your domain name.

NISDOMAIN = domainname

Open /etc/sysconfig/authconfig file and convert no to yes


To check nis domainname

Execute the following command and restart all service given below


service ypserv restart

service yppasswdd restart

service portmap restart

service nfs restart

To bind nis execute the following command and press ctrl D and type yes

/usr/lib/yp/ypinit -m

Restart the following service

service ypbind restart

service ypxfrd restart

To check whether ports are open execute the following command

rpcinfo -p localhost

Configure nfs

Open /etc/exports file and enter the following line to share folder

/home * (rw,sync)

Create user by following command

useradd nis1

Execute make command from the following folder /var/yp as given below

cd /var/yp


Now the nisdomain directory will be created under /var/yp folder

restart all above services

Nis Client

Package: ypbind

Install the ypbind package

Open /etc/sysconfig/network file and add the following line


Start service

service ypbind restart

Execute the following command and configure nis


select nis

domain name :

server ip :

Mount client to server automatically

Package: autofs

Add the following line in /etc/auto.master file

/misc /etc/auto.misc

/home /etc/auto.home

Create /etc/auto.home file and add the following any line without bracket content

nis1 -rw,soft,intr serverip:/home/nis1 ( for particular user)


* -rw,soft/intr serverip:/home/& ( for all users )

Now you can login as nis1 from client by using following command

su – nis1

Leave a Reply

2 × 2 =