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)

About the Name Service Switch

Format of the nsswitch.conf File

Search Criteria

Switch Status Messages

Switch Action Options

Default Search Criteria

What if the Syntax is Wrong?

Auto_home and Auto_master

Timezone and the Switch File

Comments in nsswitch.conf Files

Keyserver and publickey Entry in the Switch File

The nsswitch.conf Template Files

The Default Switch Template Files

The nsswitch.conf File

Selecting a Different Configuration File

How to Modify the Name Service Switch

DNS and Internet Access

IPv6 and Solaris Naming Services

Ensuring Compatibility With +/- Syntax

The Switch File and Password Information

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

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



Selecting a Different Configuration File

When you change a machine's naming service, you need to modify that machine's switch file accordingly. For example, if you change a machine's naming service from files to NIS, you need to install a switch file appropriate for NIS. You change switch files by copying the appropriate template file to nsswitch.conf.

If you are installing NIS+ on a machine using the NIS+ installation scripts, the NIS+ template script is copied to nsswitch.conf for you. In this case, you do not have to configure the switch file unless you want to customize.

Before proceeding to change switch files, make sure the sources listed in the file are properly set up. In other words, if you are going to select the NIS version, the client must eventually have access to NIS service. If you select the local files version, those files must be properly set up on the client.

How to Modify the Name Service Switch

To change to a switch file, follow these steps.

Note - In order to use LDAP naming services, you must also properly configure all LDAP client machines, in addition to modifying the nsswitch.conf. See Chapter 12, Setting Up LDAP Clients (Tasks) for more information.

  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. Copy the appropriate alternate file for the machine's naming service over the nsswitch.conf file.

    NIS+ Version (done automatically for you by NIS+ scripts)

    client1# cd /etc
    client1# cp nsswitch.nisplus nsswitch.conf

    NIS Version

    client1# cd /etc
    client1# cp nsswitch.nis nsswitch.conf

    Local /etc Files Version

    client1# cd /etc
    client1# cp nsswitch.files nsswitch.conf
  3. Reboot the machine.

    The nscd daemon caches switch information. See the nscd(1M) man page for information.

    Some library routines do not periodically check the nsswitch.conf file to see whether the file has been changed. You must reboot the machine to make sure that the daemon and those routines have the latest information in the file.