HP-UX Reference (11i v2 03/08) - 1M System Administration Commands N-Z (vol 4)
n
nisaddent(1M) nisaddent(1M)
NAME
nisaddent - create NIS+ tables from corresponding /etc files or NIS maps
SYNOPSIS
/usr/lib/nis/nisaddent
[ -D
defaults ][-Parv ][-t table ] type [ nisdomain ]
/usr/lib/nis/nisaddent
[ -D
defaults ][-Paprmv ] -f file [ -t table ] type
[ nisdomain ]
/usr/lib/nis/nisaddent
[ -D
defaults ][-Parmv ][-t table ] -y ypdomain [ -Y
map ]
type [ nisdomain ]
/usr/lib/nis/nisaddent -d [-AMq]
[ -t table ] type [ nisdomain ]
DESCRIPTION
nisaddent creates entries in NIS+ tables from their corresponding
/etc files and NIS maps. This
operation is customized for each of the standard tables that are used in the administration of HP-UX sys-
tems. The type argument specifies the type of the data being processed. Legal values for this type are
one of
aliases, bootparams, ethers,
group, hosts, netid, netmasks, networks, passwd,
protocols, publickey, rpc, services,
shadow,ortimezone for the standard tables, or key-
value for a generic two-column (key, value) table. For a site specific table, which is not of
key-value
type, one can use nistbladm (1) to administer it.
The NIS+ tables should have already been created by nistbladm (1), nissetup (1M), or nisserver (1M).
It is easier to use nispopulate (1M) instead of
nisaddent to populate the system tables.
By default,
nisaddent reads from the standard input and adds this data to the NIS+ table associated
with the type specified on the command line. An alternate NIS+ table may be specified with the
-t
option. For type key-value, a table specification is required.
Note that the data type can be different from the table name (
-t
). For example, the automounter tables
have
key-value as the table type.
Although, there is a shadow data type, there is no corresponding shadow table. Both the shadow and the
passwd data are stored in the passwd table itself.
Files may be processed using the
-f option, and NIS version 2 (YP) maps may be processed using the
-y option. The merge option is not available when reading data from standard input.
When a ypdomain is specified, the
nisaddent command takes its input from the dbm files for the
appropriate NIS map (
mail.aliases, bootparams, ethers.byaddr
, group.byname,
hosts.byaddr, netid.byname, netmasks.byaddr
, networks.byname, passwd.byname,
protocols.byname
, publickey.byname, rpc.bynumber, services.byname
,or
timezone.byname). An alternate NIS map may be specified with the
-Y option. For type key-
value, a map specification is required. The map must be in the /var/yp/
ypdomain directory on the
local machine. Note that ypdomain is case sensitive. ypxfr(1M) can be used to get the NIS maps.
If a nisdomain is specified,
nisaddent operates on the NIS+ table in that NIS+ domain; otherwise the
default domain is used.
In terms of performance, loading up the tables is fastest when done through the dbm files (
-y).
Options
-a Add the file or map to the NIS+ table without deleting any existing entries. This option is the
default. Note that this mode only propagates additions and modifications, not deletions.
-d Dump the NIS+ table to the standard output in the appropriate format for the given type.For
tables of type key-value, use niscat (1) instead. To dump the cred table, dump the pub-
lickey and the netid types.
-f file Specify that file should be used as the source of input (instead of the standard input).
-m Merge the file or map with the NIS+ table. This is the most efficient way to bring an NIS+
table up to date with a file or NIS map when there are only a small number of changes. This
option adds entries that are not already in the database, modifies entries that already exist (if
changed), and deletes any entries that are not in the source. Use the -m option whenever the
database is large and replicated, and the map being loaded differs only in a few entries. This
option reduces the number of update messages that have to be sent to the replicas. Also see
the -r option.
Section 1M−−542 Hewlett-Packard Company − 1 − HP-UX 11i Version 2: August 2003