NIS+ Configuration

NIS+ Configuration

In this section, we will walk through a configuration session with NIS+, focusing on using a script-based installation, which makes using NIS+ much easier. The main tasks involved in setting up NIS+ involve domain, master server, slave server, and user configuration. These tasks can only be performed once a network has been designed along the lines discussed in previous sections.

Whether or not you are setting up a root or a nonroot domain, the basic process is the same: after initializing a master server and creating the appropriate administrative groups, the NIS+ tables are populated, and clients and servers can then be installed. In the case of a root domain, these servers can then act as master servers for lower-level domains. In this section, we review the process of setting up a master server, populating the NIS+ tables, configuring clients and servers, and setting up other domains.

Setting Up a Root Domain

The first step in creating an NIS+ namespace is to create the root master server for the new domain. Continuing with the example for the Panther.Edu. domain, we create the root master server for Panther.Edu by using the nisserver command. The server will be known in DNS as This command is used for most server configuration operations. In this case, we use the following command: nisserver –r –d Panther.Edu.

This creates a root domain master server without backward compatibility with NIS. In order to enable NIS support, you need to use this command: nisserver –Y –r –d Panther.Edu.

Populating Tables

After creating the master root server for the Panther.Edu. domain on, the next step is to populate the NIS+ tables. To achieve this, we need to use the nispopulate command: nispopulate –F –p /nis+files –d Panther.Edu.

This populates all the tables for the Panther.Edu. domain and stores the information on the master server. Again, if you need to support NIS, you need to include the -Y option: nispopulate –Y –F –p /nis+files –d Panther.Edu.

In order to administer the NIS+ namespace, we need to add administrators to the admin group. We can achieve this by using the nisgrpadmin command. In the Panther.Edu. example, imagine we have two administrators, michael and adonis. In order to add these administrators, use the following command: nisgrpadm –a admin.Panther.Edu. michael.Panther.Edu. adonis.Panther.Edu.

If you are satisfied with the configuration, it is best to checkpoint the configuration and transfer the domain configuration information to disk copies of the tables. This can be achieved by using the nisping command: nisping –C Panther.Edu.

Now that we have successfully created the root domain, we can create clients that will act as master and slave servers for the two subdomains in the Panther.Edu. root domain: Graduate.Panther.Edu. and Undergrad.Panther.Edu.

Setting Up Clients

To create master servers for the nonroot domain Undergrad.Panther.Edu., we first need to set up the client within a domain by using the nisclient command. For the host, which will become the master server for the nonroot domain, the command is nisclient –i –d Panther.Edu. –h Ns.Panther.Edu

In order to actually set up clients within the domain, we can use also use the command nisclient, when executed from a nonprivileged user’s shell: nisclient –u

If this was for the user maya, maya would now be able to access the namespace. Next, we need to turn the client host we have initialized into a nonroot domain master server.

Setting Up Servers

After the root server is created, most organizations will want to create new master servers for each of the subdomains that form the domain. For example, in the Panther.Edu. domain, there are two subdomains (Undergrad.Panther.Edu. and Graduate.Panther.Edu.). In this case, two clients must be created from the root master server and then converted to be servers. Initially, these are root server replicas, but their designation then changes to a nonroot master server for each of the subdomains. Replica servers for the subdomain master servers can also be enabled.

In the following example, we designate two client machines whose DNS names are and (recall that the master server for the root domain is These two clients will actually become the master and slave servers for the subdomain Undergrad.Panther.Edu. To begin the server creation process, a similar approach is followed for the root domain as for the creation of the master server. First, we need to start the rpc daemon on the client machine that will become the master server for the nonroot domain: rpc.nisd

Next, we need to convert the client1 server to a root replica server in the first instance. This ensures that the subdomain inherits the appropriate settings from the top-level domain: nisserver –R –d Panther.Edu. –h

After replicating the settings from the root master server, the new nonroot master server is ready to begin serving the new subdomain. In this case, the root master server ( must delegate this authority explicitly to the master of Undergrad.Panther.Edu., which is nisserver –M –d Undergrad.Panther.Edu. –h

Following the same routine we outlined for the root master server, we must now populate the tables of the new subdomain server nispopulate –F –p /nis+files –d Undergrad.Panther.Edu.

Finally, having created a new master server for the new subdomain, we have to create a replica server to ensure service reliability in the event of failure: nisclient –R –d Undergrad.Panther.Edu. –h

The process of installing a server for the Undergrad.Panther.Edu. subdomain would need to be adapted to create the other subdomain (Graduate.Panther.Edu.), but the general process of setting up a client, converting it to a replicate server, and populating the tables would be very similar to this domain. Now that we have investigated how to create subdomains, the next section covers the day-to-day usage of NIS+, and the most commonly used commands that access tables, groups, and objects in the namespace.

Part I: Solaris 9 Operating Environment, Exam I