Creates non-root NIS+ directories.
nismkdir [ -D Defaults ] [ -m MasterHost | -s ReplicaHost ] DirName
The nismkdir command creates subdirectories within an existing domain. It can also create replicated directories. Without any flags, the nismkdir command creates a subdirectory with the same master server and replica servers as its parent directory's. In addition, the nismkdir command can add a replica to an already existing directory.
A host that serves an NIS+ directory must be an NIS+ client in a directory above the one being served. The only exception is a root NIS+ server that acts as both client and server to the same NIS+ directory.
If the host's default domain is not the domain where the nismkdir command is executed, then the host name specified in the parameter with the -s or -m flags must be fully qualified.
Note: You should use the nisserver command to create an NIS+ domain that consists of the named directory with the org_dir and group_dir.
|-m MasterHost||If the directory named by the DirName parameter does not yet
exist, then the -m flag creates the new directory with
MasterHost as its master server. If the directory named by
DirName does exist, then the host named by the
MasterHost parameter becomes its master server.
Note: To create a directory you must have create rights to the parent directory on that domain master server.
|-s ReplicaHost||Adds a nonroot NIS+ directory and its master server to an existing
system. Also, the -s flag can assign a new replica server to
an existing directory. If DirName already exists, then the
nismkdir command does not recreate it. Instead, it only
assigns the new replica server to that existing directory.
After invoking the -s flag, you must run the nisping command from the master server on the directory that was added or assigned the replica server. You should include a nisping command for each directory in its master server's cron file so that it is pinged at least once every 24 hours before being updated.
|-D Defaults||Specifies a different set of defaults for the new directory. The
defaults string is a series of tokens each separated by a colon. These
tokens represent the default values to be used for the generic object
|NIS_DEFAULTS||Contains a defaults string that overrides the NIS+ standard defaults. If the -D flag is invoked then those values override both the NIS_DEFAULTS variable and the standard defaults.|
|NIS_PATH||If the NIS+ directory name is not fully qualified, searches all directories specified until the directory is found (see nisdefaults).|
This command returns the following the exit values:
|1||An error occurred.|
nismkdir\ \-m myhost.abc.com.\ def.abc.com.
nismkdir\ \-s replica.abc.com.\ def.abc.com.
The nischmod command, nisdefaults command, nisls command, nisrmdir command, and nisserver command.