System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

How to Modify the Name Service Switch

To change to a switch file, follow these steps.

  1. Become superuser.

  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. 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.


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 16, Setting Up Clients (Tasks) for more information.