Wednesday, September 12, 2007


Hi friends,

This articles helps you to setup a NIS server and client in your network. In active directory environment we create all user account in the server and user can login in any domain pc and also configured with roaming profile to have their profile loaded from some shared location. Likewise in Linux environment, this setup is possible by setting up the NIS server. This enables us to have the user created in the server premise and allow to login in the client machines and stores their home directory in the server. Please find the steps below for implementing the NIS server and client.

Package Information :
Related packages - ypbind, ypserv and yp-tools.
Check for
#rpm -qa | grep yp
or install the respective package.

Let us consider

In NIS server :
1. Install the packages
2. Create a share for storing their home directories.
#mkdir /share
3. #vi /etc/exports [add the below entry]
/share/username *,sync)
4. #useradd username -d /share/username
5. #passwd -d username [empty password] or
#passwd username [set some password]
6. set the domain name for NIS
#domainname REDHAT
7. Install yp
#cd /var/yp
8. Restart all dependent services.
#service nfs restart
#service portmap restart
#service ypserv restart
#service yppasswdd restart

In NIS client :
1. #mkdir /share
2. #vi /etc/auto.master
/share /etc/auto.misc --timeout=60
3. #vi /etc/auto.misc
username rw,soft,init
4. #authconfig [Select NIS server and give next enter the server name and ipaddress]
5. Restart the service
#service autofs restart

Thats the end , in the clent machine open the new console and enter the username and password created in the NIS server and you will be able to login now with that credentials and their respective home directory data are stored in the server share location.

Please let me know if you have any queastions.


No comments: