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

Document Information


Part I About Naming and Directory Services

1.  Naming and Directory Services (Overview)

2.  The Name Service Switch (Overview)

Part II DNS Setup and Administration

3.  DNS Setup and Administration (Reference)

Part III NIS Setup and Administration

4.  Network Information Service (NIS) (Overview)

5.  Setting Up and Configuring NIS Service

Configuring NIS Task Map

Before You Begin Configuring NIS

NIS and the Service Management Facility

Planning Your NIS Domain

Identify Your NIS Servers and Clients

Preparing the Master Server

Source Files Directory

Passwd Files and Namespace Security

Preparing Source Files for Conversion to NIS Maps

How to Prepare Source Files for Conversion

Preparing the Makefile

Setting Up the Master Server With ypinit

How to set up the master server using ypinit

Master Supporting Multiple NIS Domains

Starting and Stopping NIS Service on the Master Server

Starting NIS Service Automatically

Starting and Stopping NIS From the Command Line

Setting Up NIS Slave Servers

Preparing a Slave Server

Setting Up a Slave Server

How to Set Up a Slave Server

How to Start NIS on a Slave Server

Setting Up NIS Clients

6.  Administering NIS (Tasks)

7.  NIS Troubleshooting

Part IV LDAP Naming Services Setup and Administration

8.  Introduction to LDAP Naming Services (Overview/Reference)

9.  LDAP Basic Components and Concepts (Overview)

10.  Planning Requirements for LDAP Naming Services (Tasks)

11.  Setting Up Sun Java System Directory Server With LDAP Clients (Tasks)

12.  Setting Up LDAP Clients (Tasks)

13.  LDAP Troubleshooting (Reference)

14.  LDAP General Reference (Reference)

15.  Transitioning From NIS to LDAP (Overview/Tasks)

16.  Transitioning From NIS+ to LDAP

A.  Solaris 10 Software Updates to DNS, NIS, and LDAP

Service Management Facility Changes


pam_ldap Changes

Documentation Errors



Setting Up NIS Slave Servers

Your network can have one or more slave servers. Having slave servers ensures the continuity of NIS services when the master server is not available.

Preparing a Slave Server

Before actually running ypinit to create the slave servers, you should run the domainname command on each NIS slave to make sure the domain name is consistent with the master server.

Note - Domain names are case-sensitive.

Make sure that the network is working properly before you configure an NIS slave server. In particular, check to be sure you can use rcp to send files from the master NIS server to NIS slaves.

Setting Up a Slave Server

The following procedure shows how to set up a slave server.

How to Set Up a Slave Server

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  2. Edit the /etc/hosts or /etc/inet/ipnodes file on the slave server to add the name and IP addresses of all the other NIS servers.
  3. Change directory to /var/yp on the slave server.

    Note - You must first configure the new slave server as an NIS client so that it can get the NIS maps from the master for the first time. See Setting Up NIS Clients for details.

  4. Initialize the slave server as a client.
    # /usr/sbin/ypinit -c

    The ypinit command prompts you for a list of NIS servers. Enter the name of the local slave you are working on first, then the master server, followed by the other NIS slave servers in your domain in order from the physically closest to the furthest in network terms.

  5. Determine if the NIS client is running, then start the client service as needed.
    # svcs network/nis/client
    STATE          STIME     FMRI
    online         20:32:56  svc:/network/nis/client:default

    If svc:/network/nis/client is displayed with an online state, then NIS is running. If the service state is disabled, then NIS is not running.

    1. If the NIS client is running, restart the client service.
      # svcadm restart network/nis/client
    2. If the NIS client is not running, start the client service.
      # svcadm enable network/nis/client
  6. Initialize this machine as a slave.
    # /usr/sbin/ypinit -s master

    Where master is the machine name of the existing NIS master server.

    Repeat the procedures described in this section for each machine you want configured as an NIS slave server.

How to Start NIS on a Slave Server

The following procedure shows how to start NIS on a slave server.