Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nisaddent(1M) — SunOS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nischmod(1)

nisdefaults(1)

nistbladm(1)

nissetup(1M)

ypxfr(1M)

nisaddent(1M)

NAME

nisaddent − create /etc files and NIS maps from their corresponding NIS+ tables

SYNOPSIS

/usr/lib/nis/nisaddent [ −D defaults ] [ −Parv ] [ −t table ] type [ nisdomain ]

/usr/lib/nis/nisaddent [ −D defaults ] [ −Parmv ] −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 −dAM [ −t table ] type [ nisdomain ]

DESCRIPTION

nisaddent creates /etc files and NIS maps from their corresponding NIS+ tables.  This operation is customized for each of the standard tables that are used in the administration of Solaris systems.  The type argument specifies the type of the table 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. 

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. 

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. 

If a nisdomain is specified, nisaddent operates on the NIS+ table in that NIS+ domain, otherwise the default domain is used. 

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. 

−r Replace the file or map in the existing NIS+ table by first deleting any existing entries. 

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

−d Dump the NIS+ table to the standard output in the appropriate format for the given type.

−v Verbose. 

−f file Specify that file should be used as the source of input (instead of the standard input). 

−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 map. 

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

−t table
Specify that table should be the NIS+ table for 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. 

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

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

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

ttl=time
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. 

owner=ownername
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. 

group=groupname
This token specifies that the group groupname should be the group owner for the object that is created.  The default is NULL. 

access=rights
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−−−. 

EXIT CODES

This command returns 0 on success and 1 on failure. 

EXAMPLES

This example adds the contents of /etc/passwd to the passwd.org_dir table. 

example% cat /etc/passwd | nisaddent passwd

Note: For adding the shadow information, the table used is the passwd table. 
 

This example replaces the hosts.org_dir table with the contents of /etc/hosts (in verbose mode). 

example% nisaddent −rv −f /etc/hosts hosts

This example merges the passwd map from myypdomain with the passwd.org_dir.mynisdomain table (in verbose mode). 

example% nisaddent −mv −y myypdomain passwd mynisdomain

This example dumps the hosts.org_dir table. 

example% nisaddent −d hosts

This example merges the auto.master map from myypdomain with the auto_master.org_dir table. 

example% nisaddent −m −y myypdomain −Y auto.master −t auto_master.org_dir key-value

ENVIRONMENT

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 are supplied fully qualified, each directory specified will be searched until the table is found (see nisdefaults(1)). 

SEE ALSO

nischmod(1), nisdefaults(1), nistbladm(1), nissetup(1M), ypxfr(1M)
 

SunOS 5.1  —  Last change: 26 Sep 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026