Linux nisdefaults command

Updated: 11/06/2021 by Computer Hope
nisdefaults command

On the Solaris operating system, the nisdefaults command displays NIS+ default values.

Description

The nisdefaults utility prints the default values returned by calls to the NIS+ local name functions. With no options specified, all defaults are printed in a verbose format. With options, only that option displays in a terse form suitable for shell scripts. See the example below.

Syntax

nisdefaults [-adghprstv]

Options

-a Print all defaults in a terse format.
-d Print the default domain name.
-g Print the default group name.
-h Print the default hostname.
-p Print the default principal name.
-r Print the default access rights with which new objects are created.
-s Print the default directory search path.
-t Print the default time to live value.
-v Print the defaults in a verbose format. This prepends an identifying string to the output.

Environment

nisdefaults makes use of the following environment variables:

NIS_DEFAULTS Variable containing a defaults string that overrides the NIS+ standard defaults. The defaults string is a series of tokens separated by colons. These tokens represent the default values to be used for the generic object properties. Legal tokens are:

ttl=time Token that sets the default time to live for objects that are created. The value time is specified in the format as defined by the nischttl command. The default value is 12 hours.
owner=ownername Token that specifies that the NIS+ principal ownername should own created objects. The default for this value is the principal who is executing the command.
group=groupname Token that specifies that the group groupname should be the group owner for created objects. The default is NULL.
access=rights Token that specifies the set of access rights that are to be granted for created objects. The value rights is specified in the format as defined by the nischmod command. The default value is:

----rmcdr---r---
NIS_GROUP Variable containing the name of the local NIS+ group. If the name is not fully qualified, the default domain is appended to it.
NIS_PATH Variable that overrides the default NIS+ directory search path. It contains an ordered list of directories separated by ':' (colon) characters. The '$' (dollar sign) character is treated specially. Directory names that end in '$' have the default domain appended to them, and a '$' by itself is replaced by the list of directories between the default domain and the global root that are at least two levels deep. The default NIS+ directory search path is '$'.

Refer to the Name Expansion subsection in NIS+ for more details.

Examples

nisdefaults

Display default NIS values. Output appears similar to the following example:

Principal Name : example.computerhope.com.
Domain Name    : computerhope.com.
Host Name      : example.computerhope.com.
Group Name     :
Access Rights  : ----rmcdr---r---
Time to live   : 12:00:00
Search Path    : computerhope.com.

nischmod — Change access rights on an NIS+ object.
nischttl — Change the time to live value of an NIS+ object.