The Network Information Service (NIS) is similar to Windows Active directory by concept. Initially NIS is developed under name Yellow Pages or YP by SUN. Since the name "Yellow Pages" is already made as trademark by British Telecom for its commerial telephone directory SUN released the package as NIS. NIS uses client-server method which allows users to login from dump terminal to a remote system where all his account credentials are maintained.
Server Configuration
Packages Required:
ypserv
yp-bind
yp-tool
/etc/sysconfig/network
/etc/yp.conf
/var/yp
Install
yum install yp*
Set the NISDOMAIN variable
# Edit /etc/sysconfig/network and add the following entry. The NISDOMAIN should be same as host name.
NISDOMAIN=<ServerDomain>
Ex:
# If hostname is server.animal.com then set NISDOMAIN as below.
NISDOMAIN=server.animal.com
(OR)
#Alertnatively run the below command which will do the same
nisdomainname server.animal.com
# Edit /etc/yp.conf to add the domain details
domain <domain name> server <server ip>
Ex:
domain server.animal.com server 192.168.1.3
# Now run the init command with -m option to make the setting to act as master.
# This will create an entry server.animal.com in /var/yp folder.
/usr/lib/yp/ypinit -m
#Add the domain name (server.animal.com) if not there
Cntl+D
y/n - y
# Now complete the initialization by running make command.
cd /var/yp
make
#Restart the following services
service ypserv restart
service yppasswdd restart
service ypxfrd restart
service ypbind restart
service rpcbind restart
#Now create a user and set password
Ex:
Ex:
useradd nisuser
passwd nisuser
Client Configuration
Packages Required:
yp-bind
yp-tool
Install
yum install yp*
Set the NISDOMAIN variable which is set in Server.
# Edit /etc/sysconfig/network and add the following entry. The NISDOMAIN should be same as host name.
NISDOMAIN=<ServerDomain>
Ex: (If server.animal.com is NIS server name).
NISDOMAIN=server.animal.com
(OR)
#Alertnatively run the below command which will do the same
nisdomainname server.animal.com
#Run authconfig-tui tool to enable NIS service.
authconfig-tui
[*] Use NIS ###Click Next
NIS Name: server.animal.com
Server : 192.168.1.3 ###Click Next
#Restart the following services
service ypbind restart
service rpcbind restart
#Verify NIS is working by logging into NIS user created at server side.
su nisuser
password: nisuser
Note:
In real time the home directory of user will be mounted on client using NFS.
Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.
ReplyDeleteGood Day:
IT security companies in Chennai