~ CHAPTER 19:
NETWORK INFORMATION SERVICE (NIS)
~
The Network Information Service (NIS) makes possible the sharing the data of critical files
across the local area network.
The main benefit achieved from using
and whenever that data is updated, it automatically propagates to all of the network users.
Inside
The Network Information Service is really just a simple database that clients can query. It
contains a series of independent tables. Each table originated as a straight text file, such as
/etc/passwd, which is tabular in nature and has at least one column that is unique for every
row.
NOTE: Although it is technically correct to refer
to
more typically called maps. (In this context, we are mapping keys to values). Using the
/etc/passwd file as an example, we map a user’s login name (which we know is always
unique) to the rest of the password entry.
The
somewhat similar to the DNS).
to helping distribute the load, secondary servers also provide a mechanism to better
handle
server failures. The secondary
even while the master or other secondary servers are down.
so that the masters and slaves remain in sync. The process of keeping the secondary
servers in sync with the primary is called the server push.
NOTE: A server pull mechanism also exists for
reserved for more complex configurations, such as when you have hundreds of slave
servers. In a smaller network, this should not be an issue.
======================================================================
linux19.html PAGE 2 2002/07/20
Domains
Primary
difference is that the
a client to join.
When
But invoked a lawsuit in the U.K with the trademark of British Telecom. To avoid a lawsuit.
Sun renamed the package Network Information Service, and other UNIX vendors followed suit.
Configuring the Master
you to do is enable the service (if it isn’t enabled already).
Establishing a Domain Name
Setting the
domainname^bluesky.com
Starting
The ypserv daemon is responsible
for handling
onto a live server, most likely you will not want to reboot the server to complete the
installation.
/etc/rc.d/init.d/ypserv^start
======================================================================
linux19.html PAGE 3 2002/07/20
Editing the Makefile
need to be compiled and then invokes the necessary program to perform the compilation.
that the file’s contents have been modified. If the file has been modified, that tells make
that the file needs to be recompiled.
Using upinit
Once you have the makefile ready, you need to initialize the UP (NIS) server using the ypinit command.
Makefile Errors
If you made a mistake in the makefile, you may get an error when ypinit runs the make program.
If you see this error: See page 435.
Updating
If you have updated the files configured to be shared by
need to rebuild the map files.
cd^/var/yp;make
Setting up the Startup Script
The
this is started in the /etc/rc.d/init.d/ypbind startup script.
Testing your
ypcat
command is used to dump a map from the
the following command:
ypcat^passwd
======================================================================
linux19.html PAGE 4 2002/07/20
Setting up the NIS Master to Push to Slaves
If you haven’t already configured the master
you should do so now. This requires two tasks: First edit the /var/yp/ypservers file so that it
lists all the secondary
form the database via the command line.
supply a key value to ypmatch and only the entry corresponding to that key is pulled down.
between the two is that the yppasswd command allows the user to set their password on the
Using
One of the most popular uses of
log in to all hosts on the network by making a single modification to the master /etc/passwd map.
A Small Network
We define a small network to be one with fewer than 30 to 40 UNIX /Linux systems, all of
which exist on the same subnet.
A Segmented Network
For growing network, however, segmenting is likely to be a necessity. By segmenting your traffic
into two or more discrete networks, you can better keep traffic on each segment down to a
controllable level.
of using broadcasts.
======================================================================
linux19.html PAGE 5 2002/07/20
Networks Bigger than Buildings
It isn’t uncommon for networks to grow bigger than the buildings they’re located in. Remote
offices connected through a variety of methods mean a variety of administrative decisions –
and not just concerning
Summary:
servers do not perform authentication.
additional setups. Changes to the files that you need to share via NISD
(such as /etc/passwd) are updated and propagated by running cd^/var/yp;make.
and then only the ypbind program is set running.