3 uss_bulk - Provides instructions for the uss bulk command
7 The uss bulk input file lists instructions for the B<uss> command
8 interpreter to execute when running the B<uss bulk> command. If the file
9 includes C<add> instructions that reference a B<uss> template file, then
10 the template file must also exist.
12 =head2 Summary of Bulk Input File Instructions
14 The bulk input file can include the following instructions, each on its
15 own line. A more detailed description of each instruction's syntax follows
22 Creates a user account. Equivalent to the B<uss add> command.
26 Deletes a user account. Equivalent to the B<uss delete> command.
30 Removes the volume and VLDB entry for each account referenced by a
31 C<delete> instruction that follows this instruction in the bulk input
40 Preserves the volume and VLDB entry for each account referenced by a
41 C<delete> instruction that follows this instruction in the bulk input
46 =head2 The add Instruction for Creating an Account
48 The C<add> instruction creates a user account. Each instance in the bulk
49 input file is equivalent in effect to a B<uss add> command issued on the
50 command line. The order of the instruction's fields matches the order of
51 arguments to the B<uss add> command, although some arguments do not have a
52 corresponding field. Like the B<uss add> command's arguments, many of the
53 fields correspond to (provide a value for) a variable in the B<uss>
54 template file, as indicated in the following description of each field.
56 The instruction's syntax is as follows. It appears on multiple lines here
57 only for the sake of legibility -- each C<add> instruction must appear on
58 a single line in the bulk input file.
60 add <username>[:<full_name>][:<password>][:<expires>]
61 [:<file_server>][:<partition>][:<mount_point>][:<uid>]
62 [:<var1>][:<var2>][:<var3>][:<var4>][:<var5>][:<var6>][:<var7>]
65 To omit a value for a field (presumably because it is optional or the
66 template specifies a constant value for it), type nothing between the two
67 colons that surround it. After the last argument provided, end the line
68 with either a colon and carriage return, or a carriage return alone.
70 The meaning of, and acceptable values for, each field are as follows.
76 Names the user's Authentication Database and Protection Database
77 entries. It can include up to eight alphanumeric characters, but not the
78 C<:> (colon), C<.> (period), or C<@> (at-sign) characters. Because it
79 becomes the username (the name under which a user logs in), it is best not
80 to include shell metacharacters and to obey the restrictions that many
81 operating systems impose on usernames (usually, to contain no more than
82 eight lowercase letters).
84 Corresponding argument to the B<uss add> command: B<-user>. Corresponding
85 variable in the template file: $USER.
89 Specifies the user's full name. Do not surround it with double quotes
90 (C<"">), even if it contains spaces. If not provided, it defaults to the
91 username in the <username> field.
93 Corresponding argument to the B<uss add> command: B<-realname>.
94 Corresponding variable in the template file: $NAME. Many operating systems
95 include a field for the full name in a user's entry in the local password
96 file (F</etc/passwd> or equivalent), and this variable can be used to pass
97 a value to be used in that field.
101 Specifies the user's initial password. Although the AFS commands that
102 handle passwords accept strings of virtually unlimited length, it is best
103 to use a password of eight characters or less, which is the maximum length
104 that many applications and utilities accept. If not provided, this
105 argument defaults to the string C<changeme>.
107 Corresponding argument to the B<uss add> command: B<-pass>. Corresponding
108 variable in the template file: none.
112 Sets the number of days after a user's password is changed that it remains
113 valid. Provide an integer from the range C<1> through C<254> to specify
114 the number of days until expiration, or the value C<0> to indicate that
115 the password never expires (the default).
117 When the password becomes invalid (expires), the user is unable to
118 authenticate, but has 30 more days in which to issue the B<kpasswd>
119 command to change the password (after that, only an administrator can
122 Corresponding argument to the B<uss add> command: B<-pwexpires>.
123 Corresponding variable in the template file: $PWEXPIRES.
127 Names the file server machine on which to create the new user's volume. It
128 is best to provide a fully-qualified hostname (for example,
129 C<fs1.abc.com>), but an abbreviated form is acceptable provided that the
130 cell's naming service is available to resolve it at the time the volume is
133 Corresponding argument to the B<uss add> command: B<-server>.
134 Corresponding variable in the template file: $SERVER.
138 Specifies the partition on which to create the user's volume; it must
139 reside on the file server machine named in the <file_server>
140 field. Identify the partition by its complete name (for example,
141 F</vicepa>, or use one of the following abbreviations:
143 /vicepa = vicepa = a = 0
144 /vicepb = vicepb = b = 1
146 After F</vicepz> (for which the index is 25) comes
148 /vicepaa = vicepaa = aa = 26
149 /vicepab = vicepab = ab = 27
153 /vicepiv = vicepiv = iv = 255
155 Corresponding argument to the B<uss add> command: B<-partition>.
156 Corresponding variable in template: $PART.
160 Specifies the complete pathname for the user's home directory.
162 Corresponding argument to the B<uss add> command: B<-mount>.
164 Corresponding variable in template: $MTPT, but in the template file's C<V>
165 instruction only. Occurrences of the $MTPT variable in template
166 instructions that follow the C<V> instruction take their value from the
167 C<V> instruction's <mount_point> field. Thus the value of this command
168 line argument becomes the value for the $MTPT variable in instructions
169 that follow the C<V> instruction only if the string $MTPT appears alone in
170 the C<V> instruction's <mount_point> field.
174 Specifies a positive integer other than C<0> (zero) to assign as the
175 user's AFS UID. If this argument is omitted, the Protection Server assigns
176 an AFS UID that is one greater than the current value of the C<max user
177 id> counter (use the B<pts listmax> command to display the counter). If
178 including this argument, first use the B<pts examine> command to verify
179 that no existing account already has the desired AFS UID; if one does, the
180 account-creation process terminates with an error.
182 Corresponding argument to the B<uss add> command: B<-uid>. Corresponding
183 variable in template: $UID.
185 =item <var1> through <var9>
187 Specifies values for each of the number variables $1 through $9 that can
188 appear in the template file. The number variables allow the administrator
189 to provide values for variables other than the set defined by the B<uss>
192 Corresponding argument to the B<uss add> command: B<-var>. Corresponding
193 variables in template: $1 through $9.
195 If providing a value in any of the fields, then in every field that
196 precedes it either provide an actual value or indicate an empty field by
197 putting nothing between two colons. It is acceptable, but not necessary,
198 to indicate empty fields by putting colons after the last field that
199 contains an actual value.
203 =head2 The delete Instruction for Deleting an Account
205 The C<delete> instruction deletes a user account from the system. Each
206 instance in the bulk input file is equivalent in effect to a B<uss delete>
207 command issued on the command line. The order of the instruction's fields
208 matches the order of arguments to the B<uss delete> command:
210 delete <username>:<mount_point>[:( savevolume | delvolume )][:]
218 Names the entry to delete from the Protection and Authentication
223 Specifies the complete pathname to the user's home directory, which is
224 deleted from the filespace. By default, the volume mounted there is also
225 deleted from the file server machine where it resides, as is its record
226 from the Volume Location Database (VLDB). To prevent deletion, include the
227 C<savevolume> string in the instruction's third field, or precede this
228 C<delete> instruction with a C<savevolume> instruction. Partial pathnames
229 are interpreted relative to the current working directory.
233 Retains the volume on its file server machine, and the corresponding entry
234 in the VLDB. Provide this value or C<delvolume> in the third field, or
235 omit both values to treat the volume according to the prevailing default,
236 which is set by a preceding C<savevolume> or C<delvolume> instruction in
241 Removes the volume from its file server machine, and the corresponding
242 entry from the VLDB. Provide this value or C<savevolume> in the third
243 field, or omit both values to treat the volume according to the prevailing
244 default, which is set by a preceding C<savevolume> or C<delvolume>
245 instruction in the bulk input file.
249 After the last argument provided, end the line with either a colon and
250 carriage return or a carriage return alone.
252 =head2 The exec Instruction for Executing a Command
254 The C<exec> instruction executes the specified command, which can be a
255 UNIX shell script or command, a program, or an AFS command. The B<uss>
256 command interpreter must have the necessary privileges in AFS and the
257 local file system; it assumes the AFS and local identities of the issuer
258 of the B<uss bulk> command.
260 The instruction's syntax is as follows:
264 =head2 The delvolume and savevolume Instructions
266 The C<savevolume> and C<delvolume> instructions determine the default
267 treatment of volumes referenced by the C<delete> instructions that follow
268 them in the bulk input file. Their syntax is as follows:
273 The C<savevolume> instruction prevents the removal of the volume and VLDB
274 entry for all C<delete> instruction that follow it in the bulk input file,
275 and the C<delvolume> instruction removes the volume and VLDB entry for all
276 subsequent C<delete> instructions. Either setting persists until its
277 opposite appears in the file, or until the end of the bulk file.
279 If neither line appears in the bulk input file, the default is to remove
280 the volume and the VLDB entry; C<delete> instructions that appear before
281 the first C<savevolume> instruction are also subject to this default. If a
282 C<delete> instruction's third field specifies either C<savevolume> or
283 C<delvolume>, that setting overrides the default.
287 The following example add instruction creates an authentication-only
288 account. The user's initial password is C<changeme> (the default).
292 The following example add instructions refer to the indicated C<V>
293 instruction in a template file (which must appear on a single line in the
296 add smith:John Smith:::fs1:a:::::marketing
297 add jones:Pat Jones:::fs3:c:::::finance
298 V user.$USER $SERVER.abc.com /vicep$PART 2000 \
299 /afs/abc.com/usr/$3/$USER $UID $USER all
301 The first add instruction creates an account called C<smith> in the
302 Protection and Authentication Databases, with an initial password
303 C<changeme> and a value for $UID provided by the Protection Server. The
304 volume C<user.smith> resides on partition F</vicepa> of file server
305 machine C<fs1.abc.com> and is mounted at
306 F</afs/abc.com/usr/marketing/smith>. He owns his home directory and has
307 all access permissions on its root directory's access control list
308 (ACL). The account for C<jones> is similar, except that the volume resides
309 on partition F</vicepc> of file server machine C<fs3.abc.com> and is
310 mounted at F</afs/abc.com/usr/finance/jones>.
312 Notice that the fields corresponding to the volume mount point, UID, $1
313 variable, and $2 variable are empty (between C<a> and C<marketing> on the
314 first example line), because their corresponding variables do not appear
315 in the template file. The initial password field is also empty.
317 The following add instructions are equivalent in effect to the preceding
318 example, but explicitly indicate empty fields for all of the number
319 variables that don't have a value:
321 add smith:John Smith:::fs1:a:::::marketing::::::
322 add jones:Pat Jones:::fs3:c:::::finance::::::
324 The following example shows a complete bulk file containing a set of
325 C<delete> instructions combined with a C<savevolume> instruction. Because
326 the C<delete> instruction for users C<smith>, C<pat>, and C<rogers> appear
327 before the C<savevolume> instruction and the third field is blank in each,
328 the corresponding home volumes are removed. The volume for user C<terry>
329 is retained because the default established by the C<savevolume>
330 instruction applies to it, but user C<johnson>'s volume is removed because
331 the third field of her C<delete> instruction overrides the current
334 delete smith:/afs/abc.com/usr/smith
335 delete pat:/afs/abc.com/usr/pat
336 delete rogers:/afs/abc.com/usr/rogers
338 delete terry:/afs/abc.com/usr/terry
339 delete johnson:/afs/abc.com/usr/johnson:delvolume
341 The following example exec instruction appears between sets of C<add> and
342 C<delete> instructions in a bulk input file. A message appears in the
343 command shell where the B<uss bulk> command is issued, to indicate when
344 the additions are finished and the deletions beginning.
346 exec echo "Additions completed; beginning deletions..."
357 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
359 This documentation is covered by the IBM Public License Version 1.0. It was
360 converted from HTML to POD by software written by Chas Williams and Russ
361 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.