Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




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

Starting and Stopping NIS Service on the Master Server

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

  • By using the Service Management Facility svcadm enable <fmri> and svcadm disable <fmri> commands from the command line

    See svcadm(1M) for more information about SMF.

  • By using the ypstart(1M) and ypstop(1M) commands from the command line

Starting NIS Service Automatically

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.

Starting and Stopping NIS From the Command Line

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.

To begin NIS service from the command line, run the svcadm enable command or the ypstart command.

# svcadm enable network/nis/server:<instance>
# svcadm enable network/nis/client:<instance>
# 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.

To stop NIS service, run the svcadm disable command or the ypstop.

# svcadm disable network/nis/server:<instance>
# svcadm disable network/nis/client:<instance>
# ypstop

To stop and immediately restart an NIS service, use the svcadm restart command.

# svcadm restart network/nis/server:<instance>
# svcadm restart network/nis/client:<instance>
Previous Next

  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire