Network Information Service (NIS) was created by Sun Microsystems as a way of managing information that is shared among a group of host computers on a network. Using NIS, computers can share a common set of user accounts, user groups, and TCP/IP host names, as well as other information.
NIS was originally called Yellow Pages, but Sun had to change this name because it was trademarked. Some people still refer to NIS as YP, and many of the NIS commands (and even NIS package names) begin with the letters "yp." To use NIS as a client, you need to have the ypbind and yp-tools packages installed. To configure an NIS server, you need the ypserv package installed as well.
The information you share with NIS comes from files that are used with UNIX systems and, therefore, compatible with other UNIX-like systems, such as Red Hat Linux. The group of computers that the master NIS server supports is referred to as an NIS domain. This domain is a defined set of host computers that may or may not be the same group of computers contained in a TCP/IP domain.
With NIS, an administrator creates information databases called maps from common UNIX (or Linux) system files. The NIS maps are created on the master NIS server and are accessible to other host computers from that server. Just in case the master server is down or inaccessible, one or more slave servers can be defined. The NIS slave servers contain copies of the NIS maps and can provide that information to client computers when the master is unavailable. However, NIS slave servers are not used to create the maps.
When the maps have been shared among the computers in the NIS domain, the main result is that all the computers share a common set of users and network configuration. The following is a list of files that are available for sharing by NIS (not all of them are set up for sharing by default).
/etc/group — Defines the groups to which users on the computer belong.
/etc/passwd — Defines the users who have accounts set up on the computer.
/etc/shadow — Contains encrypted passwords for the users set up in the /etc/passwd file.
/etc/gshadow — Contains encrypted passwords associated with groups contained in the /etc/groups file. (This file is optional and is usually not used.)
/etc/passwd.adjunct — Secures password entries if your system doesn't use shadow passwords. (This file is used with SunOS systems.)
/etc/aliases — Contains user aliases used with e-mail. It allows mail that is sent to a particular user name to be directed to a different user (or set of users). On some systems, this file may be /etc/mailaliases instead.
/etc/ethers — Used by the RARP to map Ethernet addresses into IP numbers. This file is optional. (By default, RARP support is not configured into Red Hat Linux.)
/etc/bootparams — Contains entries needed to start diskless workstations (typically used to boot Sun Microsystems diskless workstations).
/etc/hosts — Contains the names and IP addresses of computers that can be reached on TCP/IP networks. (Often used to contain all the addresses for a private LAN, while Internet addresses would be determined from a DNS server.)
/etc/networks — Used to attach a name to a network. In this way, you can refer to networks by name rather than by number.
/etc/printcap — Contains printer definitions.
/etc/protocols — Identifies numbers that are assigned to different Internet network protocols (such as IP, TCP, UDP, and others).
/etc/publickey — Used on some UNIX systems to contain user names and associated public and private keys for secure networking in NFS and related features.
/etc/rpc — Contains listings of supported Remote Procedure Call (rpc) protocols. These protocols are used with Sun Microsystems UNIX systems to allow requests for network services, such as NIS and others.
/etc/services — Contains listings that identify port number and protocols for supported network services that are used with Internet protocols.
/etc/netgroup — Used to define users (from particular hosts and domains) for permission-checking associated with remote mounts, remote shells, and remote logins.
/etc/netid — Contains information that maps RPC network names to UNIX credentials.
Some of the files just shown may not be applicable to your Red Hat Linux system. Don't worry if some of these files don't exist. In the course of setting up your system (adding users, configuring networks, and so on), you will set up the files you need.
Although these files are created in the /etc directory, the NIS administrator can copy these files to a different location and change them, so as not to share the master NIS server's original configuration files. Files can also be added to this list or removed from the list as the NIS administrator chooses. When an NIS client computer is configured, this configuration information can be obtained from the NIS master server.