System Administration Commands nispopulate(1M)
NAME
nispopulate - populate the NIS] tables in a NIS] domain
SYNOPSIS
/usr/lib/nis/nispopulate -Y [-x] [-f] [-n] [-u] [-v]
[-S 0 2] [-l ]
[-d ] -h
[-a ] -y
[table] ...
/usr/lib/nis/nispopulate -F [-x] [-f] [-u] [-v] [-S 0 2]
[-d ] [-l ]
[-p ] [table] ...
/usr/lib/nis/nispopulate -C [-x] [-f] [-v]
[-d ] [-l ]
[hosts passwd]
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 speci-
fied, nispopulate will automatically populate each of the
standard tables. These standard (default) tables are:
automaster, autohome, ethers, group, hosts, ipnodes, net-
works, passwd, protocols, services, rpc, netmasks, boot-
params, 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.
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/ directory
on the local machine. Then, it uses these files as the input
source. Note that is case sensitive. Make sure
there is enough disk space for that directory.
SunOS 5.11 Last change: 17 Aug 2006 1
System Administration Commands nispopulate(1M)
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, ipnodes, and passwd
tables, nispopulate will automatically create the NIS]
credentials for all users and hosts (ipnodes) that are
defined in the hosts, ipnodes, and passwd tables, respec-
tively. A network passwd is required to create these creden-
tials. This network password is used to encrypt the secret
key for the new users and hosts. This password can be speci-
fied using the -l option or it will use the default pass-
word, 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. To disable automatic credential
creation, specify the "-S 0" option.
The third synopsis (-C) is used to populate NIS] credential
table with level 2 authentication (DES) from the hosts,
ipnodes and passwd tables of the specified domain. The valid
table arguments for this operation are hosts, ipnodes and
passwd. If this argument is not specified then it will use
hosts, ipnodes and passwd as the input source. If other
authentication mechanisms are configured using
nisauthconf(1M), the NIS] credential table will be loaded
with credentials for those mechanisms.
If nispopulate was earlier used with "-S 0" option, then no
credentials were added for the hosts or the users. If later
the site decides to add credentials for all users and hosts,
then this (-C) option can be used to add credentials.
OPTIONS
-a Specifies the IP address for the NIS
server. This option is only used
with the -Y option.
-C Populate the NIS] credential table
from hosts, ipnodes, and passwd
tables using DES authentication
(security level 2). If other authen-
tication mechanisms are configured
using nisauthconf(1M), the NIS]
credential table will be populated
with credentials for those
SunOS 5.11 Last change: 17 Aug 2006 2
System Administration Commands nispopulate(1M)
mechanisms.
-d 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 Specifies the NIS server hostname
from where the NIS maps are copied
from. This is only used with the -Y
option. This hostname must be
present in the NIS] hosts or ipnodes
table, or in the /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 manu-
ally.
-l Specifies the network password for
populating the NIS] credential
table. This is only used when you
are populating the hosts, ipnodes,
and passwd tables. The default
passwd is "nisplus".
-n Does not overwrite local NIS maps in
/var/yp/ directory if
they already exist. The default is
to overwrite the existing NIS maps
in the local /var/yp/
directory. This is only used with
the -Y option.
-p Specifies the directory where the
files are stored. This is only used
with the -F option. The default is
the current working directory.
SunOS 5.11 Last change: 17 Aug 2006 3
System Administration Commands nispopulate(1M)
-S 02 Specifies the authentication level
for the NIS] clients. Level 0 is for
unauthenticated clients and no
credentials will be created for
users and hosts in the specified
domain. Level 2 is for authenticated
(DES) clients and DES credentials
will be created for users and hosts
in the specified domain. The default
is to set up with level 2 authenti-
cation (DES). There is no need to
run nispopulate with -C for level 0
authentication. Also, if other
authentication mechanisms are con-
figured with nisauthconf(1M),
credentials for those mechanisms
will also be populated for the NIS]
clients.
-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.
-x Turns the "echo" mode on. The script
just prints the commands that it
would have executed. Note that the
commands are not actually executed.
The default is off.
-Y Populate the NIS] tables from NIS
maps.
-y 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.
SunOS 5.11 Last change: 17 Aug 2006 4
System Administration Commands nispopulate(1M)
EXAMPLES
Example 1 Using nispopulate
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 yphost is a YP server of yp.sun.COM:
nisserver# /usr/lib/nis/nispopulate -Y -y yp.sun.COM \
-h yphost -d xyz.sun.com.
To update all of the NIS] standard tables from the same NIS
domain and hosts shown above:
nisserver# /usr/lib/nis/nispopulate -Y -u -y yp.sun.COM -h yphost \
-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:
nisserver# /usr/lib/nis/nispopulate -F -p \
/var/nis/files -l somepasswd hosts
To populate the passwd table in domain xyz.sun.com. from the
passwd file in the /var/nis/files directory without automat-
ically creating the NIS] credentials:
nisserver# /usr/lib/nis/nispopulate -F -p /var/nis/files \
-d xys.sun.com. -S 0 passwd
To populate the credential table in domain xyz.sun.com. for
all users defined in the passwd table.
nisserver# /usr/lib/nis/nispopulate -C -d xys.sun.com. passwd
SunOS 5.11 Last change: 17 Aug 2006 5
System Administration Commands nispopulate(1M)
To create and populate a non-standard key-value type NIS]
table, private, from the file /var/nis/files/private:
(nispopulate assumes that the private.orgdirkey-value type
table has already been created).
nisserver# /usr/bin/nistbladm -D access=og=rmcd,nw=r \
-c private key=S,nogw= value=,nogw= private.org.dir
nisserver# /usr/lib/nis/nispopulate -F -p /var/nis/files private
ENVIRONMENT VARIABLES
nispopulate normally creates temporary files in the direc-
tory /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).
FILES
/etc/inet/hosts local database associating names of nodes
with IP addresses
/var/yp NIS (YP) domain directory
/var/nis NIS] domain directory
/tmp
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
ATRIBUTE TYPE ATRIBUTE VALUE
Availability SUNWnisu
SEE ALSO
NIS](1), nistbladm(1), nisaddcred(1M), nisaddent(1M),
nisauthconf(1M), nisclient( 1M), nisserver(1M),
nissetup(1M), rpc.nisd(1M), ypxfr(1M), attributes(5)
SunOS 5.11 Last change: 17 Aug 2006 6
System Administration Commands nispopulate(1M)
NOTES
NIS] might not be supported in future releases of the
Solaris operating system. Tools to aid the migration from
NIS] to LDAP are available in the current Solaris release.
For more information, visit
http:/www.sun.com/directory/nisplus/transition.html.
SunOS 5.11 Last change: 17 Aug 2006 7
|