JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Working With Naming and Directory Services in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

Part I About Naming and Directory Services

1.  Naming and Directory Services (Overview)

2.  Name Service Switch (Overview)

3.  Managing DNS (Tasks)

4.  Setting Up Oracle Solaris Active Directory Clients (Tasks)

Part II NIS Setup and Administration

5.  Network Information Service (Overview)

6.  Setting Up and Configuring NIS (Tasks)

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

How to Prepare Source Files for Conversion

Preparing /var/yp/Makefile

How to Install the NIS Master Server Package

How to Set Up the Master Server

How to Support Multiple NIS Domains on One Master Server

Starting and Stopping NIS Services on an NIS Server

Starting the NIS Service Automatically

How to Enable the NIS Server Services Manually

How to Disable the NIS Server Services

How to Refresh the NIS Server Service

Setting Up NIS Slave Servers

Preparing a Slave Server

How to Set Up a Slave Server

How to Start NIS on a Slave Server

How to Add a New Slave Server

Administering NIS Clients

How to Configure an NIS Client in Broadcast Mode

How to Configure an NIS Client Using Specific NIS Servers

Disabling the NIS Client Services

7.  Administering NIS (Tasks)

8.  NIS Troubleshooting

Part III LDAP Naming Services

9.  Introduction to LDAP Naming Services (Overview)

10.  Planning Requirements for LDAP Naming Services (Tasks)

11.  Setting Up Oracle Directory Server Enterprise Edition With LDAP Clients (Tasks)

12.  Setting Up LDAP Clients (Tasks)

13.  LDAP Troubleshooting (Reference)

14.  LDAP Naming Service (Reference)

15.  Transitioning From NIS to LDAP (Tasks)

Glossary

Index

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 the ypinit command to create the slave servers, first make sure that the svc:/network/nis/domain service has been configured.


Note - NIS domain names are case-sensitive, although DNS domain names are not.


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

How to Set Up a Slave Server

The following procedure explains how to set up a slave server. Repeat this procedure for each machine you want configured as an NIS slave server.

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Edit the /etc/inet/hosts file.

    Add the name and IP address of each of the other NIS servers. Use the following format: IPaddress FQDN-hostname aliases.

    For example:

    129.0.0.1    master.example.com master
    129.0.0.2    slave1.example.com slave1
    129.0.0.3    slave2.example.com slave2
  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 obtain the NIS maps from the master server for the first time. See Administering NIS Clients for details.


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

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

  5. Determine if the client services are running, then start or restart the services as needed.
    # svcs \*nis\*
    STATE          STIME     FMRI
    online         20:32:56  svc:/network/nis/domain:default
    online         20:32:56  svc:/network/nis/client:default

    If the services are displayed with an online state, then NIS is running. If the service state is disabled, then NIS is not running.

    1. If the client services are running, restart the client services.
      # svcadm restart network/nis/domain
      # svcadm restart network/nis/client
    2. If the client services are not running, start the client services.
      # svcadm enable network/nis/domain
      # svcadm enable network/nis/client
  6. Determine if the NIS master server is running, then start or restart the service as needed.
    # svcs network/nis/server
    STATE          STIME     FMRI
    offline        20:32:56  svc:/network/nis/server:default
    1. If the master NIS server is running, restart the service.
      # svcadm restart network/nis/server
    2. If the master NIS server is not running, start the service.
      # svcadm enable network/nis/server
  7. Initialize this machine as a slave server.
    # /usr/sbin/ypinit -s master

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

How to Start NIS on a Slave Server

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

  1. Become an administrator.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Restart the client service and start all NIS server processes.
    # svcadm restart network/nis/domain
    # svcadm restart network/nis/client
    # svcadm enable network/nis/server

How to Add a New Slave Server

After NIS is running, you might need to create an NIS slave server that you did not include in the initial list given to the ypinit command. Use this procedure to add a new NIS slave server.

  1. Become an administrator on the NIS master server.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  2. Change to the NIS domain directory.
    # cd /var/yp/domainname
  3. Disassemble the ypservers file.
    # makedbm -u ypservers >/tmp/temp_file

    The makedbm command converts ypservers from ndbm format to a temporary ASCII file /tmp/temp_file.

  4. Edit the /tmp/temp_file file.

    Add the name of the new slave server to the list of servers. Then, save and close the file.

  5. Run the makedbm command with temp_file as the input file and ypservers as the output file.
    # makedbm /tmp/temp_file ypservers

    The makedbm command then converts ypservers back into ndbm format.

  6. Verify that the ypservers map is correct.

    Because there is no ASCII file for ypservers, type the following on the slave server:

    slave3# makedbm -u ypservers

    The makedbm command displays each entry in ypservers on your screen.


    Note - If a machine name is not in ypservers, it will not receive updates to the map files because yppush consults this map for the list of slave servers.


  7. Become an administrator on the new NIS slave server.

    For more information, see How to Use Your Assigned Administrative Rights in Oracle Solaris 11.1 Administration: Security Services.

  8. Verify that the NIS domain name is set.
    # domainname
    example.com
  9. Set up the new slave server's NIS domain directory.

    Copy the NIS map set from the master server, then start the NIS client. When running the ypinit command, follow the prompts and list the NIS servers in order of preference.

    slave3# cd /var/yp
    slave3# ypinit -c
  10. Initialize this machine as a slave.
    slave3# /usr/sbin/ypinit -s ypmaster

    where ypmaster is the machine name of the existing NIS master server.

  11. Stop the machine running as an NIS client.
    slave3# svcadm disable network/nis/client
  12. Determine if the client services are running, then start or restart the services as needed.
    # svcs \*nis\*
    STATE          STIME     FMRI
    online         20:32:56  svc:/network/nis/domain:default
    online         20:32:56  svc:/network/nis/client:default

    If the services are displayed with an online state, then NIS is running. If the service state is disabled, then NIS is not running.

    1. If the client services are running, restart the client services.
      # svcadm restart network/nis/domain
      # svcadm restart network/nis/client
    2. If the client services are not running, start the client services.
      # svcadm enable network/nis/domain
      # svcadm enable network/nis/client
  13. Determine if the NIS server is running, then start or restart the service as needed.
    # svcs network/nis/server
    STATE          STIME     FMRI
    offline        20:32:56  svc:/network/nis/server:default
    1. If the NIS server is running, restart the service.
      slave3# svcadm restart network/nis/server
    2. If the NIS server is not running, start the service.
      slave3# svcadm enable network/nis/server