|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) Oracle Solaris 11 Express 11/10|
Now that the master maps are created, you can start the NIS daemons on the master server and begin service. When you enable the NIS service, ypserv and ypbind start on the server. When a client requests information from the server, ypserv is the daemon that answers information requests from clients after looking them up in the NIS maps. The ypserv and ypbind daemons are administered as a unit.
There are three ways that NIS service can be started or stopped on a server:
By automatically invoking the /usr/lib/netsvc/yp/ypstart script during the boot process
See svcadm(1M) for more information about SMF.
After the NIS master server has been configured by running ypinit, ypstart is automatically invoked to start up ypserv when the machine is booted. See Setting Up the Master Server With ypinit.
Use the Service Management Facility svcadm commands or the ypstart/ypstop commands to start and stop NIS from the command line. When using svcadm, the instance name is needed only if you are running more than one instance of the service. For more information, see NIS and the Service Management Facility, or see the svcadm(1M), ypstart(1M), and ypstop(1M) man pages.
# svcadm enable network/nis/server:<instance> # svcadm enable network/nis/client:<instance> or # ypstart
Note - Because there is a slight delay before ypserv is ready to respond to calls after startup, you should issue a three to five second sleep after svcadm when calling it from inside a program or script.
# svcadm disable network/nis/server:<instance> # svcadm disable network/nis/client:<instance> or # ypstop
# svcadm restart network/nis/server:<instance> # svcadm restart network/nis/client:<instance>