- Table of Contents
- Copyright
- About the Lead Authors
- About the Contributing Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- I. Red Hat Linux Installation and User Services
- Chapter 1. Introduction to Red Hat Linux
- Chapter 2. Installation of Your Red Hat System
- Chapter 3. LILO and Other Boot Managers
- Chapter 4. Configuring the X Window System, Version 11
- Chapter 5. Window Managers
- Chapter 6. Connecting to the Internet
- Chapter 7. IRC, ICQ, and Chat Clients
- Chapter 8. Using Multimedia and Graphics Clients
- II. Configuring Services
- Chapter 9. System Startup and Shutdown
- Chapter 10. SMTP and Protocols
- Chapter 11. FTP
- Chapter 12. Apache Server
- Chapter 13. Internet News
- Chapter 14. Domain Name Service and Dynamic Host Configuration Protocol
- Chapter 15. NIS: Network Information Service
- Chapter 16. NFS: Network Filesystem
- Chapter 17. Samba
- III. System Administration and Management
- Chapter 18. Linux Filesystems, Disks, and Other Devices
- Chapter 19. Printing with Linux
- Chapter 20. TCP/IP Network Management
- Chapter 21. Linux System Administration
- Chapter 22. Backup and Restore
- Chapter 23. System Security
- IV. Red Hat Development and Productivity
- Chapter 24. Linux C/C++ Programming Tools
- Chapter 25. Shell Scripting
- Chapter 26. Automating Tasks
- Chapter 27. Configuring and Building Kernels
- Chapter 28. Emulators, Tools, and Window Clients
- V. Appendixes
- A. The Linux Documentation Project
- B. Top Linux Commands and Utilities
- C. The GNU General Public License
- D. Red Hat Linux RPM Package Listings
Understanding NIS
As you configure your network, you will find that some of your configuration files are not host specific, but they require frequent updating. /etc/passwd and /etc/group are two that come to mind. NIS enables you to set up a master server where these files are stored and then configure each machine on your network as clients to this server. Whenever a client needs to fetch an entry from the /etc/passwd file, it consults the NIS server instead.
Two prerequisites must be met in order for a file to be sharable via NIS. First, the file must be tabular with at least one entry that is unique across the entire file. In the /etc/passwd file, this entry is either the login or UID. Second, the file in its raw form must be a straight text file.
With the criteria met, the files are converted into DBM files, a simple database format allowing for quick searches. You must create a separate DBM for each key to be searched. In the /etc/passwd file, for instance, you need the database to be searchable by login and by UID. The result is two DBM files, passwd.byname and passwd.byuid.
The original text file, along with the DBM files created from it, is maintained at the NIS master server. Clients that connect to the server to obtain information do not cache any returned results.
NIS Domains
NIS servers and clients must be in the same NIS domain to communicate with one another. Note that the NIS domain is not the same as a DNS domain, although it is valid for them to share the same name.
Both the clients and servers bind themselves to a domain; hence, a client can only belong to one NIS domain at a given time. Once bound, clients send a broadcast to find the NIS server for the given domain.
The Different Servers
So far, you might have noticed that I've referenced the NIS server explicitly as the master server. The two kinds of NIS servers are master servers and slave servers.
Master NIS servers are the actual truth holders. They contain the text files used to generate the DBM files, and any changes to the database must be made to these files.
Slave NIS servers are designed to supplement master NIS servers by taking some of the load off. When a file is updated on the server, a server push is initiated and the slave NIS server gets an updated copy of the DBM files.
Installing the Software | Next Section

Account Sign In
View your cart