chmaster Command

Purpose

The chmaster command executes the ypinit command and restarts the NIS daemons to change a master server.

Syntax

/usr/etc/yp/chmaster [ -s HostName [ , HostName ... ] ] [ -O | -o ] [ -E | -e ] [ -P | -p ] [ -U | -u ] [ -C | -c ] [ -I | -B | -N ]

Description

The chmaster command invokes the ypinit command to update the NIS maps for the current domain, assuming that the domain name of the system is currently set. After the ypinit command completes successfully, the chmaster command comments or uncomments the entries in the /etc/rc.nfs file for the ypserv command, yppasswdd command, ypupdated command, and ypbind command.

You can use the Network application in Web-based System Manager (wsm) to change network characteristics. You could also use the System Management Interface Tool (SMIT) smit chmaster fast path to run this command.

Flags

Item Description
-B Updates the /etc/rc.nfs file to start the appropriate daemons, invokes the ypinit command, and starts the daemons.
-C Starts the ypbind daemon along with the ypserv daemon. This flag is the default.
-c Suppresses the start of the ypbind daemon.
-E Exits from the ypinit command and the chmaster command if errors are encountered. This flag is the default.
-e Suppresses an exit from the ypinit command and the chmaster command if errors are encountered.
-I Directs the chmaster command to change the /etc/rc.nfs file to start the appropriate daemons on the next system restart. The execution of the ypinit command occurs when this command is invoked.
-N Invokes the ypinit command and starts the appropriate daemons. No changes are made to the /etc/rc.nfs file.
-O Overwrites existing maps for this domain.
-o Prevents the overwriting of NIS maps. This flag is the default.
-P Starts the yppasswdd daemon along with the ypserv daemon.
-p Suppresses the start of the yppasswdd daemon. This flag is the default.
-s HostName [, HostName ] Specifies the slave host names for the slave for this master server. The chmaster command automatically adds the current host to this list.
-U Starts the ypupdated daemon along with the ypserv daemon.
-u Suppresses the start of the ypupdated daemon. This flag is the default.

Examples

To invoke the ypinit command to rebuild the NIS maps for the current domain, enter:

chmaster -s chopin -O -p -u -B

In this example, the chmaster command overwrites the existing maps and the yppasswdd and ypupdated daemons are not started. The host name chopin is specified to be a slave server.

Files

Item Description
/etc/rc.nfs Contains the startup script for the NFS and NIS daemons.
/var/yp/domainname Contains the NIS maps for the NIS domain.