nispopulate(1M)
NAME
nispopulate - populate the NIS+ tables in a NIS+ domain.
SYNOPSIS
/usr/lib/nis/nispopulate −Y [ −fnuv ] [ −l <network_passwd> ]
[ −d <NIS+_domain> ] −h <NIS_server_host> [ −a <NIS_server_addr> ]
−y <NIS_domain> [ table ] ...
/usr/lib/nis/nispopulate -F [ −fuv ] [ −d <NIS+_domain> ] [ −l <network_passwd> ]
[ −p <directory_path> ] [ table ] ...
DESCRIPTION
The nispopulate shell script can be used to populate NIS+ tables in a specified domain from their corresponding files or NIS maps. nispopulate assumes that the tables have been created either through nisserver(1M) or nissetup(1M).
The table argument accepts standard names that are used in the administration of Solaris systems and non-standard key-value type tables. See nisaddent(1M) for more information on key-value type tables. If the table argument is not specified, nispopulate will automatically populate each of the standard tables. These standard (default) tables are: auto_master, auto_home, ethers, group, hosts, networks, passwd, protocols, services, rpc, netmasks, bootparams, netgroup, aliases and shadow.
Note that the shadow table is only used when populating from files.
The non-standard tables that nispopulate accepts are those of key-value type. These tables must first be created manually with the nistbladm(1) command.
You must be logged in as an NIS+ principal and have write permission to the NIS+ tables in the specified domain.
Use the first synopsis (−Y) to populate NIS+ tables from NIS maps. nispopulate uses ypxfr(1M) to transfer the NIS maps from the NIS servers to the /var/yp/<NIS_domain> directory on the local machine. Then, it uses these files as the input source. Note that <NIS_domain> is case sensitive. Make sure there is enough disk space in that directory.
Use the second synopsis (−F) to populate NIS+ tables from local files. nispopulate will use those files that match the table name as input sources in the current working directory or in the specified directory.
Note that when populating the hosts and passwd tables, nispopulate will automatically create the NIS+ credentials for all users and hosts which are defined in the passwd and hosts tables respectively. A network passwd is required to create these credentials. This network password is used to encrypt the secret key for the new users and hosts. This password can be specified using the −l option or it will use the default password, "nisplus". nispopulate will not overwrite any existing credential entries in the credential table. Use nisclient(1M) to overwrite the entries in the cred table. It creates both LOCAL and DES credentials for users, and only DES credentials for hosts.
OPTIONS
−a <NIS_server_addr>
specifies the IP address for the NIS server. This option is ONLY used with the −Y option.
−d <NIS+_domain.> specifies the NIS+ domain. The default is the local domain.
−F populates NIS+ tables from files.
−f forces the script to populate the NIS+ tables without prompting for confirmation.
−h <NIS_server_host>
specifies the NIS server hostname from where the NIS maps are copied from. This is ONLY used with the −Y option. This host must be already exist in either the NIS+ hosts table or /etc/hosts file. If the hostname is not defined, the script will prompt you for its IP address, or you can use the −a option to specify the address manually.
−l <network_passwd> specifies the network password for populating the NIS+ credential table. This is ONLY used when you are populating the hosts and passwd tables. The default passwd is “nisplus”.
−n does not overwrite local NIS maps in /var/yp/<NISdomain> directory if they already exist. The default is to overwrite the existing NIS maps in the local /var/yp/<NISdomain> directory. This is ONLY used with the −Y option.
−p <directory_path> specifies the directory where the files are stored. This is ONLY used with the −F option. The default is the current working directory.
−u updates the NIS+ tables (ie., adds, deletes, modifies) from either files or NIS maps. This option should be used to bring an NIS+ table up to date when there are only a small number of changes. The default is to add to the NIS+ tables without deleting any existing entries. Also, see the −n option for updating NIS+ tables from existing maps in the /var/yp directory.
−v runs the script in verbose mode.
−Y populate the NIS+ tables from NIS maps.
−y <NIS_domain> specifies the NIS domain to copy the NIS maps from. This is ONLY used with the −Y option. The default domainname is the same as the local domainname.
table must be the last argument.
ENVIRONMENT
TMPDIR
nispopulate normally creates temporary files in the directory /tmp. You may specify another directory by setting the environment variable TMPDIR to your chosen directory. If TMPDIR is not a valid directory, then nispopulate will use /tmp).
EXAMPLES
To populate all the NIS+ standard tables in the domain xyz.sun.com. from NIS maps of the yp.sun.COM domain as input source where host yp_host is a YP server of yp.sun.COM.:
nis_server# /usr/lib/nis/nispopulate -Y -y yp.sun.COM -h yp_host -d xyz.sun.com.
To update all of the NIS+ standard tables from the same NIS domain and hosts shown above:
nis_server# /usr/lib/nis/nispopulate -Y -u -y yp.sun.COM −h yp_host \
-d xyz.sun.com.
To populate the hosts table in domain xyz.sun.com. from the hosts file in the /var/nis/files directory and using "somepasswd" as the network password for key encryption:
nis_server# /usr/lib/nis/nispopulate -F -p /var/nis/files -l somepasswd hosts
To create and populate a non-standard key-value type NIS+ table, "private", from the file /var/nis/files/ private:
nis_server# /usr/bin/nistbladm −D access=og=rmcd,nw=r \
−c private key=S,nogw= value=,nogw= private.org.dir
nis_server# /usr/lib/nis/nispopulate -F -p /var/nis/files private
FILES
/etc/hosts local host name database
/var/yp NIS(YP) domain directory
/var/nis NIS+ domain directory
/tmp
SEE ALSO
nis(1), nistbladm(1), nisaddcred(1M), nisaddent(1M), nisclient(1M), nisserver(1M), nissetup(1M), ypxfr(1M)
Sun Microsystems — Last change: 01 Jun 1993