Introduction:-
The Network Information Service (NIS) provides a simple network lookup service consisting of databases and processes. It was formerly known as Sun Yellow Pages (YP). The functionality of the two remains the same; only the name has changed. Its purpose is to provide information, that has to be known throughout the network, to all machines on the network. Information likely to be distributed by NIS is:
- Login names/passwords/home directories (/etc/passwd)
- Group Information (/etc/group)
- Hostnames and IP numbers (/etc/hosts)
- Configure NIS server IP = 192.168.1.1
- Configure NIS client IP = 192.168.1.2
- Configure NIS server Hostname = server.rootuser.in
- Configure NIS client Hostname = clinet.rootuser.in
- Firewall must be disabled.
1] Install NIS server required pakage.
2] Set NIS domain name.
NISDOMAIN=mylinux
:wq
3] Crete two new users and apply full permission to home directory.
4] Share home directory using NIS service.
/home 192.168.1.0/255.255.255.0(rw,sync)
5] Make changes in Makefile.
Before changes–109 all: passwd group hosts rpc services netid protocols mail \
After changes - 109 all: passwd group hosts netid \
:wq
6] Create database using make command.
7] Now update this database.
press <control + d> [ To add NIS server ]
press Y [ Confirm by pressing Y ]
8] Start all the service there should be no error.
9] Make this services on after restart.
Client Side Configuration:-
1] Check communication with NIS server.
2] Install two package which required to configure NIS client.
3] Set the NIS domain for client
NISDOMAIN=mylinux
:wq
4] Run the setup command to authenticate client to use NIS domain.
[root@client ~]# setup ==> Select Authentication configuration ==> Select [ * ] Use NIS from User Information ==> Now set Domain : mylinux & Server : 192.168.1.1 ==> Click on Ok
5] Configure autofs for automounting home directory of NIS server after every restart.
/home /etc/auto.misc
:wq
6] Now open auto.misc file.
anup -rw,soft,intr 192.168.1.1:/home/anup
shubham -rw,soft,intr 192.168.1.1:/home/shubham
:wq
7] Restart autofs and ypbind service.
8] Finally reboot the client system and login as user anup or shubham.
Add New NIS User:-
1] Go to NIS server machine & create new user. Once the new user created you then have to update the NIS domain authentication files by executing the make command in the /var/yp directory.
2] To check whether user's authentication information has updated or not.