Understanding NIS

Formerly known as Yellow Pages (yp), Network Information Service (NIS) provides a simple network look-up service that consists of databases and processes. An NIS domain consists of a client and one or more servers. Clients use the NIS protocol to look up information stored in NIS databases, which are replicated among servers. A single master server is assigned to update databases, while subordinate servers provide read-only services. Databases are synchronized by copying them from master servers to subordinate servers periodically or when changes occur.

A database served by NIS is called an NIS map. The NIS lookup calls require a map (database) name and an NIS domain name. An NIS domain consists of a collection of such maps. In addition to map databases, the master NIS server maintains the time stamp that indicates when each database was last modified.

Each database is created from a source file. For example, passwd.byname and passwd.byuid databases are created from the source file named passwd. When source files change, administrators either run a shell script called ypmake or a makefile to update the databases. In addition, the makefiles used to create the databases push the databases to subordinate NIS servers using yppush. The transfer uses ypxfr, a program that runs on subordinate servers.

Clients can use many functions and remote procedure calls to connect to the network lookup service, including the following:

  • yp_match

  • yp_first

  • yp_next

  • yp_all

  • yp_order

  • yp_master

  • yperr_string

  • ypprot_err

In addition there are usually many tools for administering NIS, such as ypwhich, yppoll, ypset, ypcat, and domainname.

Note

Server for NIS does not support ypxfrd, which might cause some UNIX subordinate NIS servers to display warning messages. The warning messages originate in ypinit and do not indicate actual errors. Some UNIX subordinate NIS servers run ypxfrd on the master NIS server to replicate NIS maps. If they fail to connect to ypxfrd, they obtain copies of NIS maps by using yp_all.

See Also


Table Of Contents