The nisdefaults command displays the seven default values currently active in the namespace. These default values are either
Preset values supplied by the NIS+ software
The defaults specified in the NIS_DEFAULTS environment variable (if you have NIS_DEFAULTS values set)
Any object that you create on this machine will automatically acquire these default values unless you override them with the -D option of the command you are using to create the object.
Table 15–9 NIS+ Default Values and nisdefaults Options
Default |
Option |
From |
Description |
---|---|---|---|
Domain |
-d |
/etc/defaultdomain |
Displays the home domain of the machine from which the command was entered. |
Group |
-g |
NIS_GROUP environment variable |
Displays the group that would be assigned to the next object created from this shell. |
Host |
-h |
uname -n |
Displays the machine's host name. |
Principal |
-p |
gethostbyname() |
Displays the fully qualified user name or host name of the NIS+ principal who entered the nisdefaults command. |
Access Rights |
-r |
NIS_DEFAULTS environment variable |
Displays the access rights that will be assigned to the next object or entry created from this shell. Format: ----rmcdr---r--- |
Search path |
-s |
NIS_PATH environment variable |
Displays the syntax of the search path, which indicate the domains that NIS+ will search through when looking for information. Displays the value of the NIS_PATH environment variable if it is set. |
Time-to-live |
-t |
NIS_DEFAULTS environment variable |
Displays the time-to-live that will be assigned to the next object created from this shell. The default is 12 hours. |
All (terse) |
-a |
|
Displays all seven defaults in terse format. |
Verbose |
-v |
Display specified values in verbose mode. |
|
You can use these options to display all default values or any subset of them:
To display all values in verbose format, type the nisdefaults command without arguments.
master% nisdefaults Principal Name : topadmin.doc.com. Domain Name : doc.com. Host Name : rootmaster.doc.com. Group Name : salesboss Access Rights : ----rmcdr---r--- Time to live : 12:00:00:00:00 Search Path : doc.com. |
To display all values in terse format, add the -a option.
To display a subset of the values, use the appropriate options. The values are displayed in terse mode. For example, to display the rights and search path defaults in terse mode, type the following.
rootmaster% nisdefaults -rs ----rmcdr---r--- doc.com. |
To display a subset of the values in verbose mode, add the -v flag.