System Administration Guide: Naming and Directory Services (FNS and NIS+)

Displaying NIS+ Defaults—The nisdefaults Command

The nisdefaults command displays the seven default values currently active in the namespace. These default values are either

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–12 The Seven 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:


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.