NIS

NIS

NIS is handy in situations where you have several machines networked together to serve a common group of users. By default, there would be multiple copies of the access control files (e.g. /etc/passwd, /etc/hosts ), one per machine. This is OK if you have only one or two machines, or one or two users. But in real-world situations where there are dozens of machines and hundreds of users, the man hours required to keep all those files synchronized can quickly become prohibitively expensive. NIS provides a mechanism for replacing the multiple sets of files spread across the network with a single set stored on a central server (or servers). When one of the client machines needs to find out user Timmy's password, it asks the server. When Timmy leaves the company, the system administrator needs to remove him from only one set of files.

NIS data files are referred to as maps. A host that requests information from a map is called a client. A host that handles client requests for map data is called a server. A server that can serve client requests, but not modify data in maps, is called a slave server; a server that can both handle client requests and modify data in maps is called a master server. Note that being a server for one map does not necessarily exclude a host from being a client for another map.

Obviously, you want to use NIS to manage files that are more or less the same across all systems on your network. Typically, these might include

/etc/aliases

Aliases and mail lists

/etc/group

System group definitions

/etc/hosts

IP address to hostname translation table

/etc/passwd

System user definitions

/etc/services

Port number to network service translation table

Setting Up an NIS Server

1.       Set the local host's domain name with domainname.

2.       Initialize a master server with ypinit.

3.       Initialize any slave servers with ypinit (optional).

4.       Invoke the ypserv daemon on the servers. If your system is a commercial distribution, there is probably already a script for it somewhere under your /etc directory. (If not, you can start it by hand "ypserv" will do it.)

Setting Up an NIS Client

1.       Put NIS marker entries in all the files you want to refer to the NIS server for information (e.g., in /etc/passwd, include the entry "+::::::").

2.       Set the domain name with domainname.

3.       Invoke the ypbind daemon.

 



Linux Desk Reference
Linux Desk Reference (2nd Edition)
ISBN: 0130619892
EAN: 2147483647
Year: 2000
Pages: 174
Authors: Scott Hawkins

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