32.1 NIS Concepts

   

The Network Information System is based on the domain concept. Each host on a network may be part of one domain only. Data files about hosts and users are maintained on the NIS master server. Text files are converted into dbm format with the help of the ypmake program and are commonly called NIS maps. Each map consists of two files ending with .pag and .dir . For example, when the /etc/passwd file is converted into an NIS map that is indexed on user names , it results in two files named passwd.byname.dir and passwd.byname.pag .

Any NIS-enabled host on a network may be an NIS master server, a slave server, or a client. The NIS server can also act as a client at the same time. Some of the terminology used with NIS is as follows .

NIS Domains

The NIS domain is a single word and is used to group a number of hosts on a network. Any host may be a member of only one domain although multiple NIS domains can exist on a single physical network. Domain names can be set in the /etc/rc.config.d/namesvrs file with the help of the NIS_DOMAIN variable or by using the domainname command at any time. There is no relation between an NIS domain and a DNS domain. In this book we will use testdom as the NIS domain name .

NIS Maps

An NIS map is a data base built from ASCII configuration files. Maps are indexed on some field in the data base. For example, the password data base is indexed on the user name or user ID. The map that uses the user name as the index field is known as passwd.byname , and the one indexed on the user ID is called passwd.byuid . Common NIS maps are listed in Table 32-1.

Table 32-1. NIS Maps
Map Name Description
group.bygid Group map based on /etc/group and indexed on the group ID.
group.byname Group map based on /etc/group and indexed on the group name.
hosts.byaddr Hosts map based on /etc/hosts and indexed on the host IP address.
hosts.byname Hosts map based on /etc/hosts and indexed on the host name.
mail.aliases Map showing mail aliases.
networks.byaddr Based on /etc/networks and indexed on network addresses.
networks.byname Based on /etc/networks and indexed on network names.
passwd.byname Passwords map indexed on login names.
passwd.byuid Passwords map indexed on user IDs.
protocols.byname Map for supported protocols. It is indexed on protocol names and is based on the /etc/protocols file.
protocols.bynumber Map for supported protocols. It is indexed on protocol numbers and is based on the /etc/protocols file.
services.byname Based on /etc/services and indexed on service names.
ypservers This map is automatically generated and does not depend on any file.

Every map has two files stored in a directory with the domain name under /var/yp . For example, if our domain name is testdom , the directory where the map files are stored is /var/yp/testdom . One of these files ends with .pag and the other one ends with .dir .

NIS Roles

Any host participating in an NIS domain falls into one of three categories. A brief explanation of these categories is given next .

MASTER NIS SERVER

The master NIS server keeps NIS maps. All of the text files on which these maps are based are present on the master server. Whenever any information on the master server changes, one or more map files are regenerated. These updated maps can be transferred to slave servers by either of two methods . Either the master server pushes the updated maps to slave servers, or the slave servers can pull the maps from the master server. Neither of these operations is automatic. You have to do it manually or use cron at regular time intervals.

SLAVE NIS SERVER

Slave servers depend on information provided by the NIS master server. Slave servers keep the same copy of NIS maps as the master server. They also update their maps from time to time using the ypxfr command. Usually, system administrators run this command through cron .

NIS CLIENT

An NIS client gets system and user information from one of the NIS servers. For example, during the login process, the client machine contacts an NIS server for user name and password verification.


   
Top


HP Certified
HP Certified: HP-UX System Administration
ISBN: 0130183741
EAN: 2147483647
Year: 2000
Pages: 390
Authors: Rafeeq Rehman

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net