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.
#rpm -qa | grep yp
or install the respective package.
Let us consider
NIS SERVER : 192.168.1.5
NIS CLIENT : 192.168.1.50
LAN NETWORK : 192.168.1.0/24
In NIS server :
1. Install the packages
2. Create a share for storing their home directories.
3. #vi /etc/exports [add the below entry]
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
7. Install 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 192.168.1.5:/share/username
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.