1nistbladm(1) User Commands nistbladm(1)
2
3
4
6 nistbladm - NIS+ table administration command
7
9 nistbladm -a | -A [-D defaults] colname = value... tablename
10
11
12 nistbladm -a | -A [-D defaults] indexedname
13
14
15 nistbladm -c [-D defaults] [-p path] [-s sep] type colname =
16 [flags] [, access]... tablename
17
18
19 nistbladm -d tablename
20
21
22 nistbladm -e | -E colname = value... indexedname
23
24
25 nistbladm -m colname = value... indexedname
26
27
28 nistbladm -r | -R [colname = value...] tablename
29
30
31 nistbladm -r | -R indexedname
32
33
34 nistbladm -u [-p path] [-s sep] [-t type]
35 [colname = access...] tablename
36
37
39 The nistbladm command is used to administer NIS+ tables. There are
40 five primary operations that it performs: creating and deleting tables,
41 adding entries to, modifying entries within, and removing entries from
42 tables.
43
44
45 Though NIS+ does not place restrictions on the size of tables or
46 entries, the size of data has an impact on the performance and the disk
47 space requirements of the NIS+ server. NIS+ is not designed to store
48 huge pieces of data, such as files; instead, pointers to files should
49 be stored in NIS+.
50
51
52 NIS+ design is optimized to support 10,000 objects with a total size of
53 10M bytes. If the requirements exceed the above, it is suggested that
54 the domain hierarchy be created, or the data stored in the tables be
55 pointers to the actual data, instead of the data itself.
56
57
58 When creating tables, a table type, type, and a list of column defini‐
59 tions must be provided.
60
61
62 type is a string that is stored in the table and later used by the ser‐
63 vice to verify that entries being added to it are of the correct type.
64
65
66 Syntax for column definitions is:
67
68
69 colname=[flags][,access]
70
71
72 flags is a combination of:
73
74 S Searchable. Specifies that searches can be done on the column's
75 values (see nismatch(1)).
76
77
78 I Case-insensitive (only makes sense in combination with S). Speci‐
79 fies that searches should ignore case.
80
81
82 C Crypt. Specifies that the column's values should be encrypted.
83
84
85 B Binary data (does not make sense in combination with S). If not
86 set, the column's values are expected to be null terminated ASCII
87 strings.
88
89
90 X XDR encoded data (only makes sense in combination with B).
91
92
93
94 access is specified in the format as defined by the nischmod(1) com‐
95 mand.
96
97
98 When manipulating entries, this command takes two forms of entry name.
99 The first uses a series of space separated colname=value pairs that
100 specify column values in the entry. The second is a NIS+ indexed name,
101 indexedname, of the form:
102
103 [ colname=value, ... ],tablename
104
105
107 The following options are supported:
108
109 -a | A Adds entries to a NIS+ table. The difference between
110 the lowercase `a' and the uppercase `A' is in the
111 treatment of preexisting entries. The entry's contents
112 are specified by the column=value pairs on the command
113 line. Values for all columns must be specified when
114 adding entries to a table.
115
116 Normally, NIS+ reports an error if an attempt is made
117 to add an entry to a table that would overwrite an
118 entry that already exists. This prevents multiple par‐
119 ties from adding duplicate entries and having one of
120 them get overwritten. If you wish to force the add, the
121 uppercase `A' specifies that the entry is to be added,
122 even if it already exists. This is analogous to a mod‐
123 ify operation on the entry.
124
125
126 -c Creates a table named tablename in the namespace. The
127 table that is created must have at least one column and
128 at least one column must be searchable.
129
130
131 -d tablename Destroys the table named tablename. The table that is
132 being destroyed must be empty. The table's contents can
133 be deleted with the -R option below.
134
135
136 -e|E Edits the entry in the table that is specified by
137 indexdname. indexdname must uniquely identify a single
138 entry. It is possible to edit the value in a column
139 that would change the indexed name of an entry.
140
141 The change (colname=value) may affect other entries in
142 the table if the change results in an entry whose
143 indexed name is different from indexedname and which
144 matches that of another existing entry. In this case,
145 the -e option will fail and an error will be reported.
146 The -E option will force the replacement of the exist‐
147 ing entry by the new entry (effectively removing two
148 old entries and adding a new one).
149
150
151 -m A synonym for -E. This option has been superseded by
152 the -E option.
153
154
155 -r|R Removes entries from a table. The xentry is specified
156 by either a series of column=value pairs on the com‐
157 mand line, or an indexed name that is specified as
158 entryname. The difference between the interpretation of
159 the lowercase `r' versus the uppercase `R' is in the
160 treatment of non-unique entry specifications. Normally
161 the NIS+ server will disallow an attempt to remove an
162 entry when the search criterion specified for that
163 entry resolves to more than one entry in the table.
164 However, it is sometimes desirable to remove more than
165 one entry, as when you are attempting to remove all of
166 the entries from a table. In this case, using the
167 uppercase `R' will force the NIS+ server to remove all
168 entries matching the passed search criterion. If that
169 criterion is null and no column values specified, then
170 all entries in the table will be removed.
171
172
173 -u Updates attributes of a table. This allows the concate‐
174 nation path (-p), separation character (specified with
175 the (-s)), column access rights, and table type string
176 (-t) of a table to be changed. Neither the number of
177 columns, nor the columns that are searchable may be
178 changed.
179
180
181 -D defaults When creating objects, this option specifies a differ‐
182 ent set of defaults to be used during this operation.
183 The defaults string is a series of tokens separated by
184 colons. These tokens represent the default values to be
185 used for the generic object properties. All of the
186 legal tokens are described below.
187
188 ttl=time This token sets the default time to
189 live for objects that are created by
190 this command. The value time is
191 specified in the format as defined
192 by the nischttl(1) command. The
193 default value is 12 hours.
194
195
196 owner=ownername This token specifies that the NIS+
197 principal ownername should own the
198 created object. Normally this value
199 is the same as the principal who is
200 executing the command.
201
202
203 group=groupname This token specifies that the group
204 groupname should be the group owner
205 for the object that is created. The
206 default value is NULL.
207
208
209 access=rights This token specifies the set of
210 access rights that are to be granted
211 for the given object. The value
212 rights is specified in the format as
213 defined by the nischmod(1) command.
214 The default value is
215 −−−−rmcdr−−−r−−−.
216
217
218
219 -p path When creating or updating a table, this option speci‐
220 fies the table's search path. When a nis_list() func‐
221 tion is invoked, the user can specify the flag FOL‐
222 LOW_PATH to tell the client library to continue search‐
223 ing tables in the table's path if the search criteria
224 used does not yield any entries. The path consists of
225 an ordered list of table names, separated by colons.
226 The names in the path must be fully qualified.
227
228
229 -s sep When creating or updating a table, this option speci‐
230 fies the table's separator character. The separator
231 character is used by niscat(1) when displaying tables
232 on the standard output. Its purpose is to separate col‐
233 umn data when the table is in ASCII form. The default
234 value is a space.
235
236
237 -t type When updating a table, this option specifies the ta‐
238 ble's type string.
239
240
242 Example 1 Creating an Unmodifiable Table
243
244
245 This example creates a table named hobbies in the directory foo.com.
246 of the type hobby_tbl with two searchable columns, name and hobby.
247
248
249 example% nistbladm -c hobby_tbl name=S,\
250 a+r,o+m hobby=S,a+r hobbies.foo.com.
251
252
253
254
255 The column name has read access for all (that is, owner, group, and
256 world) and modify access for only the owner. The column hobby is read‐
257 able by all, but not modifiable by anyone.
258
259
260
261 In this example, if the access rights had not been specified, the ta‐
262 ble's access rights would have come from either the standard defaults
263 or the NIS_DEFAULTS variable (see below).
264
265
266 Example 2 Adding Entries to the Table
267
268
269 To add entries to this table:
270
271
272 example% nistbladm -a name=bob hobby=skiing hobbies.foo.com.
273 example% nistbladm -a name=sue hobby=skiing hobbies.foo.com.
274 example% nistbladm -a name=ted hobby=swimming hobbies.foo.com.
275
276
277
278
279 Example 3 Adding the Concatenation Path
280
281
282 In the following example, the common root domain is foo.com (NIS+
283 requires at least two components to define the root domain) and the
284 concatenation path for the subdomains bar and baz are added:
285
286
287 example% nistbladm -u -p hobbies.bar.foo.com.:hobbies.baz.foo.com. \
288 hobbies
289
290
291
292 Example 4 Deleting Skiers from the List
293
294
295 To delete the skiers from our list:
296
297
298 example% nistbladm -R hobby=skiing hobbies.foo.com.
299
300
301
302
303 Note: The use of the -r option would fail because there are two
304 entries with the value of skiing.
305
306
307 Example 5 Naming a Column with no Flags Set
308
309
310 To create a table with a column that is named with no flags set, you
311 supply only the name and the equals (=) sign as follows:
312
313
314 example% nistbladm -c notes_tbl name=S,a+r,o+m note= notes.foo.com.
315
316
317
318
319 This example created a table, named notes.foo.com., of type notes_tbl
320 with two columns name and note. The note column is not searchable.
321
322
323 Example 6 Protecting Terminal Characters
324
325
326 When entering data for columns in the form of a value string, it is
327 essential that terminal characters be protected by single or double
328 quotes. These are the characters equals (=), comma (,), left bracket
329 ([), right bracket (]), and space ( ). These characters are parsed by
330 NIS+ within an indexed name. These characters are protected by enclos‐
331 ing the entire value in double quote (") characters as follows:
332
333
334 example% nistbladm -a fullname="Joe User" nickname=Joe nicknames
335
336
337
338
339 If there is any doubt about how the string will be parsed, it is better
340 to enclose it in quotes.
341
342
344 NIS_DEFAULTS This variable contains a defaults string that will be
345 override the NIS+ standard defaults. If the -D switch
346 is used those values will then override both the
347 NIS_DEFAULTS variable and the standard defaults.
348
349
350 NIS_PATH If this variable is set, and the NIS+ table name is not
351 fully qualified, each directory specified will be
352 searched until the table is found. See nisdefaults(1).
353
354
356 The following exit values are returned:
357
358 0 Successful operation.
359
360
361 1 Operation failed.
362
363
365 See attributes(5) for descriptions of the following attributes:
366
367
368
369
370 ┌─────────────────────────────┬─────────────────────────────┐
371 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
372 ├─────────────────────────────┼─────────────────────────────┤
373 │Availability │SUNWnisu │
374 └─────────────────────────────┴─────────────────────────────┘
375
377 NIS+[22m(1), niscat(1), nischmod(1), nischown(1), nischttl(1), nisde‐
378 faults(1), nismatch(1), nissetup(1M), attributes(5)
379
381 NIS+ might not be supported in future releases of the Solaris operating
382 system. Tools to aid the migration from NIS+ to LDAP are available in
383 the current Solaris release. For more information, visit
384 http://www.sun.com/directory/nisplus/transition.html.
385
387 To modify one of the entries, say, for example, from "bob" to "robert":
388
389 example% nistbladm -m name=robert [name=bob],hobbies
390
391
392
393
394 Notice that "[name=bob],hobbies" is an indexed name, and that the char‐
395 acters `[' (open bracket) and `]' (close bracket) are interpreted by
396 the shell. When typing entry names in the form of NIS+ indexed names,
397 the name must be protected by using single quotes.
398
399
400 It is possible to specify a set of defaults such that you cannot read
401 or modify the table object later.
402
403
404
405SunOS 5.11 2 Dec 2005 nistbladm(1)