Home > Articles > Certification > Other IT

Solaris Name Services


The NIS, formerly called the "Yellow Pages (YP)," is a distributed database system that enables the system administrator to administer the configuration of many hosts from a central location. Common configuration information, which would have to be maintained separately on each host in a network without NIS, can be stored and maintained in a central location and then propagated to all the nodes in the network. NIS stores information about workstation names and addresses, users, the network itself, and network services. This collection of network information is referred to as the NIS namespace. This chapter explains how to configure and administer the servers and clients in a NIS domain.


The NIS was formerly known as Sun Yellow Pages (YP). The functionality of the two remains the same; only the name has changed. The name "Yellow Pages" is a registered trademark in the United Kingdom of British Telecommunications PLC, and it may not be used without permission.

NIS is a huge topic, which could potentially span several volumes. The purpose of this chapter is to prepare you for questions regarding NIS that might appear on the exam. I also want to provide an overview of NIS, complete enough so that you are equipped to set up a basic NIS network and have a basic understanding of its use. Before I begin a discussion of the structure of NIS, you need to be aware that the NIS administration databases are called maps. A domain is a collection of systems that share a common set of NIS maps.

Structure of the NIS Network

The systems within a NIS network are configured in the following ways:

  • Master server

  • Slave servers

  • Clients of NIS servers

The center of the NIS network is the NIS master server. The system designated as master server contains the set of maps that you, the NIS administrator, create and update as necessary. After the NIS network is set up, any changes to the maps must be made on the master server. Each NIS domain must have one, and only one, master server. The master server should be a system that can propagate NIS updates with minimal performance degradation.

In addition to the master server, you can create backup servers, called NIS slave servers, to take some of the load off the master server and to substitute for the master server if it is down. If you create a NIS slave server, the maps on the master server are transferred to the slave server. A slave server has a complete copy of the master set of NIS maps. If a change is made to a map on the master server, the updates are propagated among the slave servers. The existence of slave servers enables the system administrator to evenly distribute the load that results from answering NIS requests. It also minimizes the impact of a server becoming unavailable.

Typically, all the hosts in the network, including the master and slave servers, are NIS clients. If a process on a NIS client requests configuration information, it calls NIS instead of looking in its local configuration files. For group and password information and mail aliases, the /etc/files might be consulted first, then NIS might be consulted if the requested information is not found in the /etc/files.

Any system can be a NIS client, but only systems with disks should be NIS servers, whether master or slave. Servers are also clients of themselves.

As mentioned earlier, the set of maps shared by the servers and clients is called the NIS domain. The master copies of the maps are located on the NIS master server, in the directory /var/yp/<domainname>, in which domainname is a chosen name for your own domain. Under the domainname directory, each map is stored as two files: mapname.dir and mapname.pag. Each slave server has an identical directory containing the same set of maps.

When a client starts up, it broadcasts a request for a server that serves its domain. Any server that has the set of maps for the client's domain, whether it's a master or a slave server, can answer the request. The client "binds" to the first server that answers its request, and that server then answers all its NIS queries.

A host cannot be the master server for more than one NIS domain. However, a master server for one domain might be a slave server for another domain. A host can be a slave server for multiple domains. A client belongs to only one domain.

Determining the Number of NIS Servers You Need

The following guidelines can be used for determining the number of NIS servers that you need in your domain:

  • You should put a server on each sub network in your domain. When a client starts up, it broadcasts a message to find the nearest server. Solaris 2.6 does not require the server to be on the same subnet; however, earlier implementations of NIS historically have required that a server exist on every subnet using NIS.

  • In general, a server can serve about 30 NIS clients, if the clients and servers run at the same speed. If the clients are faster than the servers are, then you need more servers. If the clients are slower than the servers are, each server can serve 50 or more clients.

Determining Which Hosts Will Be NIS Servers

Determine which systems on your network will be NIS servers as follows:

  • Choose servers that are reliable and highly available.

  • Choose fast servers that are not used for CPU-intensive applications. Do not use gateways or terminal servers as NIS servers.

  • Distribute servers appropriately among client networks. Because a NIS client can bind only to a server on its own subnet, each subnet must have enough servers to accommodate the clients on that subnet.

Information Managed by NIS

NIS stores information in a set of files called maps. NIS maps were designed to replace UNIX /etc files, as well as other configuration files.

NIS maps are two-column tables. One column is the key and the other column is the information value related to the key. NIS finds information for a client by searching through the keys. Some information is stored in several maps because each map uses a different key. For example, the names and addresses of systems are stored in two maps: hosts.byname and hosts.byaddr. If a server has a system's name and needs to find its address, it looks in the hosts.byname map. If it has the address and needs to find the name, it looks in the hosts.byaddr map.

Maps for a domain are located in each server's /var/yp/<domainname> directory. For example, the maps that belong to the domain pyramid.com are located in each server's /var/yp/pyramid.com directory.

A NIS Makefile is stored in the /var/yp directory of the NIS server at installation time. If you run the /usr/ccs/bin/make command in that directory, makedbm creates or modifies the default NIS maps from the input files. For example, an input file might be /etc/hosts. By now, you should be familiar with the content of this file. Issue the following command to create the NIS map files:

cd /var/yp


Never make the maps on a slave server. Always run the make command on the master server.

Creating NIS maps is described in more detail in the "Configuring a NIS Master Server" section.

Solaris provides a default set of NIS maps, described in Table 7-1. You might want to use all or only some of these maps. NIS can also use whatever maps you create or add if you install other software products.

Table 7-1 Default NIS Maps

Map Name


Description NIS Admin File



This map contains the path names that file's clients need during start up: root, swap, and possibly others.



This map contains system names and Ethernet addresses. The Ethernet address is the key in the map.



This map is the same as ethers.byaddr, except that the key is the system name instead of the Ethernet address.



This map contains group security information with GID (group ID) as the key.



This map contains group security information with group name as the key.



This map contains system name, and IP address, with IP address as the key.



This map contains system name and IP address, with system (host) name as the key.



This map contains aliases and mail addresses, with aliases as the key.



This map contains mail address and alias, with mail addresses as the key.



This map contains group name, user name, and system name, with the system name as the key.



This map is the same as netgroup.byhost, except that key is the user name.



This map is the same as netgroup.byhost, except that key is the group name.



This map is used for UNIX-style hosts and group authentication. Contains system name and mail address (including domain name). If there is a netid file available, it is consulted, in addition to the data available through the other files.



This map contains the network masks to be used with IP submitting, with the address as the key.



This map contains names of networks known to your system and their IP addresses, with the address as the key.



This map is the same as networks.byaddr, except the key is name of network.


passwd and

This map contains auditing shadow information and the hidden password information for C2 clients.


passwd and

This map contains password shadow information with the user name as key.


passwd and

This map is the same as passwd.byname, shadow except that key is user ID.



This map contains the network protocols known to your network with protocol as key.



This map is the same as protocols.byname, except that the key is protocol number.



This map contains program number and name of Remote Procedure Calls (RPCs) known to your system. The key is the RPC program number.



This map lists Internet services known to your network. The key is the port or protocol.



This map lists Internet services known to your network. The key is the service name.



This map lists the NIS servers known to your network.

The information in these files is put into NIS databases automatically when you create a NIS master server. Other system files can also be managed by NIS, if you want to customize your configuration.

NIS makes updating network databases much simpler than with the /etc file system. You no longer have to change the administrative /etc files on every system each time you modify the network environment. For example, if you add a new system to a network running NIS, you only have to update the input file in the master server and run /usr/ccs/bin/make. This process automatically updates the hosts.byname and hosts.byaddr maps. These maps are then transferred to any slave servers and made available to all the domain's client systems and their programs.

Just as you use the cat command to display the contents of a text file, you can use the ypcat command to display the values in a map. The ypcat basic syntax is:

ypcat <mapname>

In this case, mapname is the name of the map you want to examine.

You can use the ypwhich command to determine which server is the master of a particular map. Type the following:

ypwhich -m <mapname>

In this case, mapname is the name of the map whose master you want to find. ypwhich responds by displaying the name of the master server.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020