JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Naming and Directory Services (NIS+)
search filter icon
search icon

Document Information

Preface

Part I About Naming and Directory Services

1.  Name Service Switch

Part II NIS+ Setup and Configuration

2.  NIS+: An Introduction

3.  NIS+ Setup Scripts

4.  Configuring NIS+ With Scripts

5.  Setting Up the NIS+ Root Domain

6.  Configuring NIS+ Clients

7.  Configuring NIS+ Servers

Setting Up an NIS+ Server

NIS+ Standard Configuration and NIS-Compatible Configuration of an NIS+ Server

Security Considerations When Configuring NIS+ Servers

Prerequisites to Configuring NIS+ Servers

Information You Need to Configure an NIS+ Server

How to Configure an NIS+ Server

Adding a Replica to an Existing NIS+ Domain

Using NIS+ Commands to Configure a Replica Server

How to Configure a Replica Server With NIS+ Commands

Using nisrestore to Load Data Onto an NIS+ Replica Server

How to Load NIS+ Namespace Data by Using the nisrestore Command

Using nisping to Load Data Onto an NIS+ Replica Server

How to Load NIS+ Namespace Data by Using the nisping Command

NIS+ Server Configuration Summary

8.  Configuring an NIS+ Non-Root Domain

9.  Setting Up NIS+ Tables

Part III NIS+ Administration

10.  NIS+ Tables and Information

11.  NIS+ Security Overview

12.  Administering NIS+ Credentials

13.  Administering NIS+ Keys

14.  Administering Enhanced NIS+ Security Credentials

15.  Administering NIS+ Access Rights

16.  Administering NIS+ Passwords

17.  Administering NIS+ Groups

18.  Administering NIS+ Directories

19.  Administering NIS+ Tables

20.  NIS+ Server Use Customization

21.  NIS+ Backup and Restore

22.  Removing NIS+

23.  Information in NIS+ Tables

24.  NIS+ Troubleshooting

A.  NIS+ Error Messages

About NIS+ Error Messages

Common NIS+ Namespace Error Messages

B.  Updates to NIS+ During the Solaris 10 Release

Solaris 10 and NIS+

Glossary

Index

Adding a Replica to an Existing NIS+ Domain

To have regularly available NIS+ service, you should always create one or more replica servers for each domain. Having replicas can also speed network-request resolution because multiple servers are available to handle requests.

For performance reasons, you should have no more than a few replicas per domain.

If your network includes multiple subnets or different sites connected by a Wide Area Network (WAN), you might need additional replicas:

See Creating an NIS+ Root Replica Server for more information on replica distribution and on how to determine the optimum number of replicas. To add a replica to an existing domain you must first configure the new replica, then load the NIS+ data set for your namespace.

The two ways to configure and load a new replica server are:

Using NIS+ Commands to Configure a Replica Server

This section describes how to add a replica server to an existing domain using the NIS+ command.

How to Configure a Replica Server With NIS+ Commands

Use NIS+ commands to set up an NIS+ server. In this example, the master server is named master1, and the new replica is named replica2.

Before You Begin

The NIS+ principal performing this operation must have modify rights to the domain's directory object.

You also need the following information:

  1. Log in to the domain's master server.
  2. Make sure the NIS+ serive is running.
    master1# svcs -l network/rpc/nisplus:default
  3. Add the replica to the domain.

    Run the nismkdir command with the -s option. The example below adds the replica machine named replica2 to the doc.com.domain.

    master1# nismkdir -s replica2 doc.com. 
    master1# nismkdir -s replica2 org_dir.doc.com. 
    master1# nismkdir -s replica2 groups_dir.doc.com.

    When you run the nismkdir command on a directory object that already exists, it does not recreate the directory but modifies it, according to the flags you provide. In this case, the -s flag assigns the domain an additional replica server. You can verify that the replica was added by examining the directory object's definition, using the niscat -o command.


    Caution

    Caution - Never run nismkdir on the replica machine. Running nismkdir on a replica creates communications problems between the master and the replicas.


    Your new replica is now configured. You can now load your NIS+ data set on to the replica. You can do this in two ways:

    • nisping. If you do nothing, your master server will use the nisping command to load your namespace data on to your newly configured replica server. If your namespace is large, this process can take hours. During this process, requests for naming information can be delayed. See Using nisping to Load Data Onto an NIS+ Replica Server for details.

    • Backup and restore. You can interrupt the transfer of data by using the nisping command. You then use the NIS+ backup and restore capabilities to load your namespace data on to a newly configured replica server, as described in Using nisrestore to Load Data Onto an NIS+ Replica Server. Because it is so much faster and more efficient, this is the preferred method.

Using nisrestore to Load Data Onto an NIS+ Replica Server

This section describes how to use the NIS+ backup and restore utilities to load namespace data onto a newly configured replica. This is the preferred method of loading data on to a replica.

How to Load NIS+ Namespace Data by Using the nisrestore Command

Use the nisrestore command to load data on to a replica server. In this example, the master server is named master1, and the new replica is named replica2.

Before You Begin

The NIS+ principal performing this operation must have modify rights to the domain's directory object.

  1. Stop the NIS+ service on the new replica server.

    This interrupts the automatic transfer of namespace data from the master to the replica with the nisping command.

    replica2# svcadm disable /network/rpc/nisplus:default
  2. Perform an NIS+ backup on the master server.

    This step is described in more detail in System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP). The example below shows how to use the nisbackup command to backup up the master1 server to the /var/master1_bakup directory.

    master1# nisbackup -a /var/master1_bakup

    The most convenient method of using nisrestore to configure a new replica is to back up the master's data to an NFS mounted directory that the new replica can access. This example assumes that both the master and the new replica server have access to the /var/master1_bakup directory.

    Another method is to use the tar command to copy the data from the /var/master1_bakup directory to some transferable storage media, such as a tape cartridge, then copy the data from storage media into a directory mounted on the new replica, then use that directory as the source for the nisrestore command, as described in Step 3.

  3. Download the NIS+ data set onto the new replica using the nisrestore command.

    This step is described in more detail in System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP). The example below shows how to use the nisrestore command to down load NIS+ data on to the client2 replica from the /var/master1_bakup directory.

    replica2# nisrestore -a /var/master1_bakup

    If the replica you are creating is for the root domain, or if you get an error message that nisrestore cannot verify or look up needed data, then use the nisrestore -f option. For example:

    replica2# nisrestore -f -a /var/master1_bakup
  4. Start the NIS+ service on the new replica.

    See How to Configure an NIS+ Server for details.

Using nisping to Load Data Onto an NIS+ Replica Server

This section describes how to use the nisping command to load namespace data onto a newly configured replica. In most cases, it is not necessary to actually run the nisping command because the process should begin automatically.

The problem with the nisping method is that it requires a full resync of data from the master to the replica over the network using NIS+ protocols. If your namespace is large, this process can take hours, during which requests for naming information can be delayed.

How to Load NIS+ Namespace Data by Using the nisping Command

Normally, the loading for namespace data is automatically initiated by the master server. If that does not occur, run the nisping command as described in this procedure.

Before You Begin

The NIS+ principal performing this operation must have modify rights to the domain's directory object.