Solaris Naming Setup and Configuration Guide

Selecting a Different Configuration File

When you change a workstation's naming service, you need to change that machine's switch file to one appropriate for the new service. For example, if you change a workstation's name service from NIS 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 workstation 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 it.

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 are going to select the local files version, those files must be properly set up on the client.

Security Considerations

You must perform this operation as superuser.

Setting Up the Name Service Switch

Table 1-1 Task Map: Setting Up the Name Service Switch

Task 

Description 

For Instructions, Go To 

Setting Up the Name Service Switch 

Set up a configuration file for NIS+ or NIS. and reboot the workstation 

"How to Select a Different Configuration File"

How to Select a Different Configuration File

To change to a switch file, follow these steps:

  1. Log in to the client as superuser.

  2. Copy the alternate file appropriate for the machine's name 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 workstation.

    The nscd name service cache daemon caches switch information. Some library routines do not periodically check the nsswitch.conf file to see whether it has been changed. You must reboot the workstation to make sure that the daemon and those routines have the latest information in the file.