4 How it works

Contents of this section

Within a network there must be at least one machine acting as a NIS server. If there are more machines in the network providing NIS, then one machine is said to be the master NIS server and all the other NIS servers are so-called slave NIS servers. Slave servers only have copies of the NIS databases and receive these copies from the master NIS server whenever changes are made to the master's databases. Depending on the number of machines in your network and the reliability of your network, you might decide to install one or more slave servers. Whenever a NIS server goes down or is too slow in responding to requests, a NIS client connected to that server will try to find one that is up or quicker.

With NYS, however, the /etc/nsswitch.conf file determines which host you want to go to for a particular service (as there is no binding deamon `ypbind') if your primary NIS server is not running or is too slow to respond. This adds more flexibility as you are able to choose on a per-service basis which host should answer what query. For example, you may specify that if the master server `A' is down then, for host queries, go to server `B' and for password queries go to server `C' etc..

NIS databases are in so-called DBM format, derived from ASCII databases. For example, the files /etc/passwd and /etc/group can be directly converted to DBM format using ASCII-to-DBM translation software ('dbload', it's included with the server software). The master NIS server should have both, the ASCII databases and the DBM databases. Slave servers or client machines will be notified of any change to the NIS maps, (via the "ypbind" deamon), and automatically retrieve the necessary changes in order to synchronize their databases. The author of the YP clients for linux has informed us that the newest ypbind (from yp-clients.tar.gz) is able to get the server from a configuration file - thus not need to broadcast.

Next Chapter, Previous Chapter

Table of contents of this chapter, General table of contents

Top of the document, Beginning of this Chapter