Solaris 11 NIS client
At the current time (July 2014) Oracle's documentation for how to set up
a NIS client, is horrible at best, and wrong at worst.
So, here's accurate information on how to set up a Solaris 11 machine (or
zone) as a NIS client.
It should be noted that if you want to do this by hand, you can mostly just
and in theory, everything should be set up for you.
Unfortunately, however, you still need to set the NIS domain name, and the
manpage for ypinit does not tell you how to do this. (But I do, lower
The general reason for this page existing, is if you want to do the configs by
means of some kind of automation script.
Most of the steps involve adjusting SMF settings, with the exception of the
- Define the NIS domain
- Define the NIS servers
- Add server entries to /etc/hosts
- Enable nis/client service
Define the NIS domain
svccfg -s /network/nis/domain setprop config/domainname = NISNameHere
# if you are going to run ypinit -c, also run
# svcadm refresh nis/domain
Define the NIS servers
svccfg -s /network/nis/domain setprop config/ypservers = \
Add entries to /etc/hosts
If you wish to have your ypservers property be hostnames, rather than IP
addresses, you can.. but you must add entries for each server you
mentioned, into /etc/hosts.
If on the other hand, you use IP address, then entries in /etc/hosts do not
seem to be required.
Enable nis/client service
You'll want to first "refresh" the SMF properties you tweaked above.
Then the following commands should make your changes live,
so long as nsswitch is already set in the manner you prefer.
svcadm refresh nis/domain
# you might even need a "restart" of nis/domain
svcadm enable nis/client
This material is copyrighted by
Bolthole Top -
Solaris Top -