Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Apropos / Subsearch:
optional field

 nisaddent(1M)						       nisaddent(1M)

      nisaddent - create NIS+ tables from corresponding /etc files or NIS

      /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 ]

      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 systems.
      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, or timezone 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.

 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000

 nisaddent(1M)						       nisaddent(1M)

      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).

      -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

      -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 publickey 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.

      -p	Process the password field when loading password information
		from a file.  By default, the password field is ignored
		because it is usually not valid (the actual password appears
		in a shadow file).

      -q	Dump tables in "quick" mode.  The default method for dumping
		tables processes each entry individually.  For some tables
		(e.g., hosts), multiple entries must be combined into a
		single line, so extra requests to the server must be made.
		In "quick" mode, all of the entries for a table are

 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000

 nisaddent(1M)						       nisaddent(1M)

		retrieved in one call to the server, so the table can be
		dumped more quickly.  However, for large tables, there is a
		chance that the process will run out of virtual memory and
		the table will not be dumped.

      -r	Replace the file or map in the existing NIS+ table by first
		deleting any existing entries, and then add the entries from
		the source (/etc files, or NIS+ maps).	This option has the
		same effect as the -m option.  The use of this option is
		strongly discouraged due to its adverse impact on
		performance, unless there are a large number of changes.

      -t table	Specify that table should be the NIS+ table for this
		operation. This should be a relative name as compared to
		your default domain or the domainname if it has been

      -v	Verbose.

      -y ypdomain
		Use the dbm files for the appropriate NIS map, from the NIS
		domain ypdomain, as the source of input.  The files are
		expected to be on the local machine in the /var/yp/ypdomain
		directory.  If the machine is not an NIS server, use
		ypxfr(1M) to get a copy of the dbm files for the appropriate

      -A	All data. This option specifies that the data within the
		table and all of the data in tables in the initial table's
		concatenation path be returned.

      -D defaults
		This option specifies a different set of defaults to be used
		during this operation. 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.

		     This token sets the default time to live for objects
		     that are created by this command. The value time is
		     specified in the format as defined by the nischttl(1)
		     command.  The default is 12 hours.

		     This token specifies that the NIS+ principal ownername
		     should own the created object. The default for this
		     value is the principal who is executing the command.

		     This token specifies that the group groupname should be

 Hewlett-Packard Company	    - 3 -   HP-UX Release 11i: November 2000

 nisaddent(1M)						       nisaddent(1M)

		     the group owner for the object that is created. The
		     default is NULL.

		     This token specifies the set of access rights that are
		     to be granted for the given object. The value rights is
		     specified in the format as defined by the nischmod(1)
		     command.  The default is ----rmcdr---r---.

      -M	Master server only. This option specifies that lookups
		should be sent to the master server.  This guarantees that
		the most up-to-date information is seen at the possible
		expense that the master server may be busy, or that it may
		be made busy by this operation.

      -P	Follow concatenation path. This option specifies that
		lookups should follow the concatenation path of a table if
		the initial search is unsuccessful.

      -Y map	Use the dbm files for map as the source of input.

      Add the contents of /etc/passwd to the passwd.org_dir table:

	   cat /etc/passwd | nisaddent passwd

      Add the shadow information (note that the table type here is
      shadow,not passwd, even though the actual information is stored in the
      passwd table):

	   cat /etc/shadow | nisaddent shadow

      Replace the hosts.org_dir table with the contents of /etc/hosts (in
      verbose mode):

	   nisaddent -rv -f /etc/hosts hosts

      Merge the passwd map from myypdomain with the passwd.org_dir.nisdomain
      table (in verbose mode) (the example assumes that the
      /var/yp/myypdomain directory contains the yppasswd map.):

	   nisaddent -mv -y myypdomain passwd nisdomain

      Merge the auto.master map from myypdomain with the auto_master.org_dir

	   nisaddent -m -y myypdomain -Y auto.master \
		     -t auto_master.org_dir key-value

      Dump the hosts.org_dir table:

 Hewlett-Packard Company	    - 4 -   HP-UX Release 11i: November 2000

 nisaddent(1M)						       nisaddent(1M)

	   nisaddent -d hosts

    Environment Variables
      NIS_DEFAULTS	This variable contains a default string that will
			override the NIS+ standard defaults. If the -D
			switch is used, those values will then override both
			the NIS_DEFAULTS variable and the standard defaults.

      NIS_PATH		If this variable is set, and neither the nisdomain
			nor the table is fully qualified, each directory
			specified in NIS_PATH will be searched until the
			table is found (see nisdefaults(1)).

      nisaddent returns 0 on success and 1 on failure.

      nisaddent was developed by Sun Microsystems, Inc.

      niscat(1), nischmod(1), nisdefaults(1), nistbladm(1), nispopulate(1M),
      nisserver(1M), nissetup(1M), ypxfr(1M), hosts(4), passwd(4).

 Hewlett-Packard Company	    - 5 -   HP-UX Release 11i: November 2000