Configuring NIS clients on Solaris

To configure the NIS client on a Solaris computer:

  1. Stop any running NIS service and remove all files from the /var/yp/binding directory. For example, run the following commands on Solaris 8 or 9:

    kill ypbind
    rm -rf /var/yp/binding/*

    On Solaris 10, stop the service by running:

    svcadm disable network/nis/client

  2. Set the NIS domain name for the client to the zone name of the computer where adnisd is running.

    domainname zone_name

    For example, if you have installed adnisd on a computer in the corpHQ zone:

    domainname corpHQ

  3. Run the ypinit -c command and enter the name of the computer where adnisd is installed.

This step is not required if you use the broadcast option to locate the server when you run the ypbind command. You must use ypinit, however, if your network topology would prevent a broadcast from reaching the desired servers. For example, if the router does not transmit broadcasts across subnets, use the ypinit -c command to specify a server on a different subnet.

Start the ypbind service. On most versions of Solaris, run:


If you are using the broadcast option to locate the server, start the service with that option. For example:

/usr/lib/netsvc/yp/ypbind -broadcast

On Solaris 10, run:

svcadm enable network/nis/client

Modify the passwd, group, and shadow lines in /etc/nsswitch.conf file to use compat as the source:

passwd: compat
group: compat
shadow: compat

Restart services that rely on the NIS domain or reboot the computer to restart all services. The most common services to restart are autofs, NSCD, cron and sendmail.