1nispopulate(1M) System Administration Commands nispopulate(1M)
2
3
4
6 nispopulate - populate the NIS+ tables in a NIS+ domain
7
9 /usr/lib/nis/nispopulate -Y [-x] [-f] [-n] [-u] [-v]
10 [-S 0 | 2] [-l <network_passwd>]
11 [-d <NIS+_domain>] -h <NIS_server_host>
12 [-a <NIS_server_addr>] -y <NIS_domain>
13 [table] ...
14
15
16 /usr/lib/nis/nispopulate -F [-x] [-f] [-u] [-v] [-S 0 | 2]
17 [-d <NIS+_domain>] [-l <network_passwd>]
18 [-p <directory_path>] [table] ...
19
20
21 /usr/lib/nis/nispopulate -C [-x] [-f] [-v]
22 [-d <NIS+_domain>] [-l <network_passwd>]
23 [hosts | passwd]
24
25
27 The nispopulate shell script can be used to populate NIS+ tables in a
28 specified domain from their corresponding files or NIS maps. nispopu‐
29 late assumes that the tables have been created either through nis‐
30 server(1M) or nissetup(1M).
31
32
33 The table argument accepts standard names that are used in the adminis‐
34 tration of Solaris systems and non-standard key-value type tables. See
35 nisaddent(1M) for more information on key-value type tables. If the ta‐
36 ble argument is not specified, nispopulate will automatically populate
37 each of the standard tables. These standard (default) tables are:
38 auto_master, auto_home, ethers, group, hosts, ipnodes, networks,
39 passwd, protocols, services, rpc, netmasks, bootparams, netgroup,
40 aliases and shadow. Note that the shadow table is only used when popu‐
41 lating from files. The non-standard tables that nispopulate accepts are
42 those of key-value type. These tables must first be created manually
43 with the nistbladm(1) command.
44
45
46 Use the first synopsis (-Y) to populate NIS+ tables from NIS maps. nis‐
47 populate uses ypxfr(1M) to transfer the NIS maps from the NIS servers
48 to the /var/yp/<NIS_domain> directory on the local machine. Then, it
49 uses these files as the input source. Note that <NIS_domain> is case
50 sensitive. Make sure there is enough disk space for that directory.
51
52
53 Use the second synopsis (-F) to populate NIS+ tables from local files.
54 nispopulate will use those files that match the table name as input
55 sources in the current working directory or in the specified directory.
56
57
58 Note that when populating the hosts, ipnodes, and passwd tables, nis‐
59 populate will automatically create the NIS+ credentials for all users
60 and hosts (ipnodes) that are defined in the hosts, ipnodes, and passwd
61 tables, respectively. A network passwd is required to create these cre‐
62 dentials. This network password is used to encrypt the secret key for
63 the new users and hosts. This password can be specified using the -l
64 option or it will use the default password, nisplus. nispopulate will
65 not overwrite any existing credential entries in the credential table.
66 Use nisclient(1M) to overwrite the entries in the cred table. It cre‐
67 ates both LOCAL and DES credentials for users, and only DES credentials
68 for hosts. To disable automatic credential creation, specify the "-S 0"
69 option.
70
71
72 The third synopsis (-C) is used to populate NIS+ credential table with
73 level 2 authentication (DES) from the hosts, ipnodes and passwd tables
74 of the specified domain. The valid table arguments for this operation
75 are hosts, ipnodes and passwd. If this argument is not specified then
76 it will use hosts, ipnodes and passwd as the input source. If other
77 authentication mechanisms are configured using nisauthconf(1M), the
78 NIS+ credential table will be loaded with credentials for those mecha‐
79 nisms.
80
81
82 If nispopulate was earlier used with "-S 0" option, then no credentials
83 were added for the hosts or the users. If later the site decides to add
84 credentials for all users and hosts, then this (-C) option can be used
85 to add credentials.
86
88 -a <NIS_server_addr> Specifies the IP address for the NIS server.
89 This option is only used with the -Y option.
90
91
92 -C Populate the NIS+ credential table from hosts,
93 ipnodes, and passwd tables using DES authenti‐
94 cation (security level 2). If other authentica‐
95 tion mechanisms are configured using nisauth‐
96 conf(1M), the NIS+ credential table will be
97 populated with credentials for those mecha‐
98 nisms.
99
100
101 -d <NIS+_domain.> Specifies the NIS+ domain. The default is the
102 local domain.
103
104
105 -F Populates NIS+ tables from files.
106
107
108 -f Forces the script to populate the NIS+ tables
109 without prompting for confirmation.
110
111
112 -h <NIS_server_host> Specifies the NIS server hostname from where
113 the NIS maps are copied from. This is only used
114 with the -Y option. This hostname must be
115 present in the NIS+ hosts or ipnodes table, or
116 in the /etc/hosts file. If the hostname is not
117 defined, the script will prompt you for its IP
118 address, or you can use the -a option to spec‐
119 ify the address manually.
120
121
122 -l <network_passwd> Specifies the network password for populating
123 the NIS+ credential table. This is only used
124 when you are populating the hosts, ipnodes, and
125 passwd tables. The default passwd is "nisplus".
126
127
128 -n Does not overwrite local NIS maps in
129 /var/yp/<NISdomain> directory if they already
130 exist. The default is to overwrite the existing
131 NIS maps in the local /var/yp/<NISdomain>
132 directory. This is only used with the -Y
133 option.
134
135
136 -p <directory_path> Specifies the directory where the files are
137 stored. This is only used with the -F option.
138 The default is the current working directory.
139
140
141 -S 0|2 Specifies the authentication level for the NIS+
142 clients. Level 0 is for unauthenticated clients
143 and no credentials will be created for users
144 and hosts in the specified domain. Level 2 is
145 for authenticated (DES) clients and DES creden‐
146 tials will be created for users and hosts in
147 the specified domain. The default is to set up
148 with level 2 authentication (DES). There is no
149 need to run nispopulate with -C for level 0
150 authentication. Also, if other authentication
151 mechanisms are configured with nisauthconf(1M),
152 credentials for those mechanisms will also be
153 populated for the NIS+ clients.
154
155
156 -u Updates the NIS+ tables (ie., adds, deletes,
157 modifies) from either files or NIS maps. This
158 option should be used to bring an NIS+ table up
159 to date when there are only a small number of
160 changes. The default is to add to the NIS+
161 tables without deleting any existing entries.
162 Also, see the -n option for updating NIS+
163 tables from existing maps in the /var/yp direc‐
164 tory.
165
166
167 -v Runs the script in verbose mode.
168
169
170 -x Turns the "echo" mode on. The script just
171 prints the commands that it would have exe‐
172 cuted. Note that the commands are not actually
173 executed. The default is off.
174
175
176 -Y Populate the NIS+ tables from NIS maps.
177
178
179 -y <NIS_domain> Specifies the NIS domain to copy the NIS maps
180 from. This is only used with the -Y option. The
181 default domainname is the same as the local
182 domainname.
183
184
186 Example 1 Using nispopulate
187
188
189 To populate all the NIS+ standard tables in the domain xyz.sun.com.
190 from NIS maps of the yp.sun.COM domain as input source where host
191 yp_host is a YP server of yp.sun.COM:
192
193
194 nis_server# /usr/lib/nis/nispopulate -Y -y yp.sun.COM \
195 -h yp_host -d xyz.sun.com.
196
197
198
199
200 To update all of the NIS+ standard tables from the same NIS domain and
201 hosts shown above:
202
203
204 nis_server# /usr/lib/nis/nispopulate -Y -u -y yp.sun.COM -h yp_host \
205 -d xyz.sun.com.
206
207
208
209
210 To populate the hosts table in domain xyz.sun.com. from the hosts file
211 in the /var/nis/files directory and using somepasswd as the network
212 password for key encryption:
213
214
215 nis_server# /usr/lib/nis/nispopulate -F -p \
216 /var/nis/files -l somepasswd hosts
217
218
219
220
221 To populate the passwd table in domain xyz.sun.com. from the passwd
222 file in the /var/nis/files directory without automatically creating the
223 NIS+ credentials:
224
225
226 nis_server# /usr/lib/nis/nispopulate -F -p /var/nis/files \
227 -d xys.sun.com. -S 0 passwd
228
229
230
231
232 To populate the credential table in domain xyz.sun.com. for all users
233 defined in the passwd table.
234
235
236 nis_server# /usr/lib/nis/nispopulate -C -d xys.sun.com. passwd
237
238
239
240
241 To create and populate a non-standard key-value type NIS+ table, pri‐
242 vate, from the file /var/nis/files/private: (nispopulate assumes that
243 the private.org_dirkey-value type table has already been created).
244
245
246 nis_server# /usr/bin/nistbladm -D access=og=rmcd,nw=r \
247 -c private key=S,nogw= value=,nogw= private.org.dir
248 nis_server# /usr/lib/nis/nispopulate -F -p /var/nis/files private
249
250
251
253 nispopulate normally creates temporary files in the directory /tmp. You
254 may specify another directory by setting the environment variable
255 TMPDIR to your chosen directory. If TMPDIR is not a valid directory,
256 then nispopulate will use /tmp).
257
259 /etc/inet/hosts local database associating names of nodes with IP
260 addresses
261
262
263 /var/yp NIS (YP) domain directory
264
265
266 /var/nis NIS+ domain directory
267
268
269 /tmp
270
271
273 See attributes(5) for descriptions of the following attributes:
274
275
276
277
278 ┌─────────────────────────────┬─────────────────────────────┐
279 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
280 ├─────────────────────────────┼─────────────────────────────┤
281 │Availability │SUNWnisu │
282 └─────────────────────────────┴─────────────────────────────┘
283
285 NIS+[22m(1), nistbladm(1), nisaddcred(1M), nisaddent(1M), nisauthconf(1M),
286 nisclient( 1M), nisserver(1M), nissetup(1M), rpc.nisd(1M), ypxfr(1M),
287 attributes(5)
288
290 NIS+ might not be supported in future releases of the Solaris operating
291 system. Tools to aid the migration from NIS+ to LDAP are available in
292 the current Solaris release. For more information, visit
293 http://www.sun.com/directory/nisplus/transition.html.
294
295
296
297SunOS 5.11 17 Aug 2006 nispopulate(1M)