UsMan's WoRkSpAce

Friday, September 01, 2006

All about Network Information Service (NIS)

-- NIS server stores information in databases called maps. NIS namespace is flat. One organization domain maps to one NIS map. Each domain must have only one master server. NIS domain is a collection of machines that share a common set of NIS maps. There can however be different master servers for different maps. NIS domain is case-sensitive.

-- NIS provides a forwarding service to forward host lookups to DNS, if information is not present in NIS map. NIS+ is a different software that supports features such as hierarchical namespace and namespace security that NIS doesn't support. NIS+ server can run in NIS compatibility mode servicing the requests of NIS clients.

-- Principal NIS servers are called masters, whereas backups are called slave.

-- NIS service is provided by five daemons, ypserv, ypbind, ypxfrd, rpc.yppasswdd and rpc.ypupdated. makedbm, ypcat, ypinit, yppmatch, yppoll, yppush, ypset, ypwhich and ypxfr are nine utilities. Ypbind must run on all servers and clients. Ypinit creates maps from text files. ypcat, ypwhich and ypmatch commands get information from maps. ypwhich shows master server for a map. yppush only works for maps that are already defined on slaves. Otherwise use ypxfr on the slave to get the maps. ypxfr can be scheduled in cron. ypxfr activities are logged into /var/yp/ypxfr.log file.

-- NIS maps are two-column tables. One column is the key and the other is value related to the column. Maps are located in /var/yp/domainname directory. Maps can be queried by their name or their nicknames. Nicknames are stored in a text file, /var/yp/nicknames, which is user-editable. Maps are created from input text files. They should not be the files in /etc directory. /usr/ccs/bin/make passwd command is used to update maps. It also propagates changes to other servers. Each map has an entry for its master server, that needs to be modified in case of change in master. Supported maps are modified in /var/yp/Makefile directory. makedbm is used for updating non-default maps, one which are not defined in Makefile. Map are made of two well-formed dbm files. hosts.byname and hosts.byaddr maps can be modified to forward queries to DNS server, in case they are not found in NIS maps.

-- NIS request can be made in two modes, server-list mode, where ypbind daemon on client refers to the file /var/yp/binding/[domainname]/ypservers file to locate servers and broadcast mode, where ypbind issues an RPC broadcast to server an NIS server. RPC broadcast doesn't cross subnets, therefore there must be at least one server in each subnet. Once a client binds to a server, it remains so until server goes out of service. /var/yp/securenets file provides IP based access control for client requests.

-- NIS netgroups are users and machines defined for administrative purposes. They are placed in maps in place of users or machines. netgroups can be defined in /etc/netgroup file and uploaded to netgroup map.

0 Comments:

Post a Comment

<< Home