HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)

n
nisdefaults(1) nisdefaults(1)
NAME
nisdefaults - display NIS+ default values
SYNOPSIS
nisdefaults [ -adghprstv ]
DESCRIPTION
nisdefaults prints the default values that are returned by calls to the NIS+ local name functions (see
nis_local_names(3N)). With no options specified, all defaults will be printed in a verbose format. With
options, only that option is displayed in a terse form suitable for shell scripts. See the example below.
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 host name.
-p Print the default principal name.
-r Print the default access rights with which new objects will be 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.
EXAMPLES
Print the NIS+ defaults for a root process on machine example in the
foo.bar. domain:
example# nisdefaults
Principal Name : example.foo.bar.
Domain Name : foo.bar.
Host Name : example.foo.bar.
Group Name :
Access Rights : ----rmcdr- - -r---
Time to live : 12:00:00
Search Path : foo.bar.
Set a variable in a shell script to the default domain:
DOMAIN=‘nisdefaults -d‘
Print out the default time to live in a verbose format:
nisdefaults -tv
Time to live : 12:00:00
Print out the time to live in the terse format:
nisdefaults -t
43200
EXTERNAL INFLUENCES
Environment Variables
Several environment variables affect the defaults associated with a process.
NIS_DEFAULTS This variable contains a defaults string that will override 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. All of the legal tokens are
described below.
ttl=time
This token 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. (See
nischttl(1)). The default value is 12 hours.
Section 1624 Hewlett-Packard Company 1 HP-UX 11i Version 1: September 2005