NIS developed by Sun Microsystems and was known as Sun's Yellow Pages (YP). NIS server or YP server maintains information on maps (special database files). Individual systems on the network use NIS clients to make requests from the NIS server which include: ypwhich, ypcat, yppoll, ypmatch, yppasswd and ypset. The NIS server programs include: ypserv, ypinit, yppasswdd, yppush, ypxfr, and netgroup.
NIS works for information required for most administrative tasks relating to users, network access, or devices. For example, to maintain user and password information with the NIS service, a user needs to update only NIS password files. NIS+ provides support for encryption and authentication.
Configuring NIS Server
- Define the NIS domain name by defining NIS_DOMAIN variable in the /etc/sysconfig/network file
NIS_DOMAIN=ananova.com
domainname ananova.com - Start the ypserv daemon
- In the /var/yp/Makefile file, set NIS server options and specify configuration files to manage. NIS server options are kept in the /etc/ypserv.conf file.
ypcat: list NIS configuration files
ypwhich: display the name of the NIS server the client uses
ypmatch: find particular entry in a configuration file - Use the /usr/lib/ypinit to create the NIS version of the configuration files.
NIS server options
- NOPUSH: set to true to indicate that there is no slave NIS servers, otherwise set it to false
- MINUID or MINGID: The minimum users and group IDs
MINUID=200
MINGID=200 - NIS password and other configuration files are defined using
YPSRCDIR=/etc
YPPWDDIR=/etc - PASSWD: password
$(YPPWDDIR)/passwd - GROUP: groups
$(YPPWDDIR)/group - PRINTCAP: printers
$(YPPWDDIR)/printcap - SHADOW
$(YPPWDDIR)/shadow - GSHADOW
$(YPPWDDIR)/gshadow - ALIASES
/etc/aliases - ETHERS
$(YPPWDDIR)/ethers - BOOTPARAMS
$(YPPWDDIR)/bootparams - HOSTS
$(YPPWDDIR)/hosts - NETWORKS
$(YPPWDDIR)/networks - PROTOCOLS
$(YPPWDDIR)/protocols
NIS Database
ypinit -m: Create NIS database consisting of the NIS configuration files. The command is located in the /usr/lib/yp directory.
Update NIS server files using the make command
cd /var/yp
make
The /var/yp/securenets file enables access by hosts on NIS server, referenced by network or individually via subnet mask and IP address.
Netgroups
Create network-level group of users for networkwide services. They are defined in the /etc/netgroup file, consist of netgroup name followed by member identifiers (host, user and NIS domain)
group (host, user, NIS-domain) (host, user, NIS-domain) …