Initial IBM OpenAFS 1.0 tree
[openafs.git] / src / WINNT / doc / install / Documentation / en_US / html / CmdRef / auarf055.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3190/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 5 Nov 1999 at 13:58:29                -->
7 <META HTTP-EQUIV="updated" CONTENT="Fri, 05 Nov 1999 13:58:29">
8 <META HTTP-EQUIV="review" CONTENT="Sun, 05 Nov 2000 13:58:29">
9 <META HTTP-EQUIV="expires" CONTENT="Mon, 05 Nov 2001 13:58:29">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf054.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf056.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRUSSFILE" HREF="auarf002.htm#ToC_53">uss Template File</A></H2>
19 <P><STRONG>Purpose</STRONG>
20 <A NAME="IDX4110"></A>
21 <A NAME="IDX4111"></A>
22 <A NAME="IDX4112"></A>
23 <P>Provides instructions for the <B>uss add</B> command
24 <P><STRONG>Description</STRONG>
25 <P>The <B>uss</B> template file defines the components of an AFS user
26 account that the <B>uss add</B> command (or <B>add</B> instruction in
27 a <B>uss</B> bulk input file) creates. Use the <B>-template</B>
28 argument to the <B>uss add</B> or <B>uss bulk</B> command to identify
29 the template file.
30 <P><B>Summary of Template File Instructions</B>
31 <P>The template file can include the following instructions, each on its own
32 line. A more detailed description of each instruction&#39;s syntax
33 follows this list.
34 <DL>
35 <P><DT><B>A
36 </B><DD>Imposes restrictions on user passwords and authentication attempts
37 <P><DT><B>D
38 </B><DD>Creates a directory
39 <P><DT><B>E
40 </B><DD>Creates a single-line file
41 <P><DT><B>F
42 </B><DD>Creates a file by copying a prototype
43 <P><DT><B>G
44 </B><DD>Defines a directory that is one of a set of parent directories into which
45 the <B>uss</B> command interpreter evenly distributes newly created home
46 directories
47 <P><DT><B>L
48 </B><DD>Creates a hard link
49 <P><DT><B>S
50 </B><DD>Creates a symbolic link
51 <P><DT><B>V
52 </B><DD>Creates a volume, mounts it in the file space and sets the ACL on the
53 mount point
54 <P><DT><B>X
55 </B><DD>Executes a command
56 </DL>
57 <P>If the template file is empty (zero-length), the <B>uss add</B> command
58 or <B>add</B> instruction in a bulk input file only creates an entry in
59 the Protection and Authentication Databases, naming them according to the name
60 specified with the <B>uss add</B> command&#39;s <B>-user</B>
61 argument, or in the bulk input file <B>add</B> instruction&#39;s
62 <VAR>username</VAR> field.
63 <P><B>The A Instruction for Setting the Default Treatment of Volumes</B>
64 <A NAME="IDX4113"></A>
65 <A NAME="IDX4114"></A>
66 <A NAME="IDX4115"></A>
67 <A NAME="IDX4116"></A>
68 <A NAME="IDX4117"></A>
69 <A NAME="IDX4118"></A>
70 <A NAME="IDX4119"></A>
71 <P>The <B>A</B> instruction in a <B>uss</B> template file enhances
72 cell security by imposing the following restrictions on users&#39; password
73 choice and authentication attempts. For further information on these
74 limits, see the <I>AFS Administration Guide</I> and the <B>kas
75 setfields</B> reference page.
76 <UL>
77 <P><LI>Limiting the user&#39;s password lifetime. When the lifetime
78 expires, the user can no longer authenticate using that password, and must
79 change it.
80 <P><LI>Prohibiting the reuse of the user&#39;s 20 most recently used
81 passwords.
82 <P><LI>Limiting the number of consecutive times that a user can provide an
83 incorrect password during authentication, and for how long the Authentication
84 Server refuses further authentication attempts after the limit is exceeded
85 (referred to as an <I>account lockout</I>). For regular user
86 accounts in most cells, the recommended limit is nine and lockout time is 25
87 minutes.
88 </UL>
89 <P>The instruction has the following syntax&#58;
90 <PRE>   <B>A</B>  <VAR>username</VAR>  <VAR>password_lifetime</VAR>  <VAR>password_reuse</VAR>  <VAR>failures</VAR>  <VAR>locktime</VAR>
91    
92 </PRE>
93 <P>where
94 <DL>
95 <P><DT><B>A
96 </B><DD>Indicates a security-enhancing instruction. It must be a capital
97 letter.
98 <P><DT><B><VAR>username</VAR>
99 </B><DD>Names the Authentication Database entry on which to impose security
100 restrictions. Specify the value <B>$USER</B> to read in the
101 username from the <B>uss add</B> command&#39;s <B>-user</B> argument,
102 or from the <VAR>username</VAR> field of an <B>add</B> instruction in a bulk
103 input file.
104 <P><DT><B><VAR>password_lifetime</VAR>
105 </B><DD>Sets the number of days after the user&#39;s password is changed that it
106 remains valid. When the password becomes invalid (expires), the user is
107 unable to authenticate, but has 30 more days in which to issue the
108 <B>kpasswd</B> command to change the password (after that, only an
109 administrator can change it).
110 <P>Specify an integer from the range <B>1</B> through <B>254</B> to
111 specify the number of days until expiration, the value <B>0</B> to
112 indicate that the password never expires, or the value <B>$PWEXPIRES</B>
113 to read in the number of days from the <B>uss add</B> or <B>uss
114 bulk</B> command&#39;s <B>-pwexpires</B> argument. If the
115 <B>A</B> instruction does not appear in the template file, the default is
116 for the user&#39;s password never to expire.
117 <P><DT><B><VAR>password_reuse</VAR>
118 </B><DD>Determines whether or not the user can change his or her password (using
119 the <B>kpasswd</B> or <B>kas setpassword</B> command) to one that is
120 similar to any of the last twenty passwords. The acceptable values are
121 <B>reuse</B> to allow reuse and <B>noreuse</B> to prohibit it.
122 If the <B>A</B> instruction does not appear in the template file, the
123 default is to allow password reuse.
124 <P><DT><B><VAR>failures</VAR>
125 </B><DD>Sets the number of consecutive times the user can provide an incorrect
126 password during authentication (using the <B>klog</B> command or a login
127 utility that grants AFS tokens). When the user exceeds the limit, the
128 Authentication Server rejects further authentication attempts for the amount
129 of time specified in the <VAR>locktime</VAR> field.
130 <P>Specify an integer from the range <B>1</B> through <B>254</B> to
131 specify the number of failures permitted, or the value <B>0</B> to
132 indicate that there is no limit to the number of unsuccessful attempts.
133 If the <B>A</B> instruction does not appear in the template file, the
134 default is to allow an unlimited number of failures.
135 <P><DT><B><VAR>locktime</VAR>
136 </B><DD>Specifies how long the Authentication Server refuses authentication
137 attempts from a user who has exceeded the failure limit set in the
138 <VAR>failures</VAR> field.
139 <P>Specify a number of hours and minutes (<VAR>hh&#58;mm</VAR>) or minutes
140 only (<VAR>mm</VAR>), from the range <B>01</B> (one minute) through
141 <B>36&#58;00</B> (36 hours). The Authentication Server
142 automatically reduces any larger value to <B>36&#58;00</B> and also
143 rounds up any non-zero value to the next higher multiple of 8.5
144 minutes. A value of <B>0</B> (zero) sets an infinite lockout
145 time; an administrator must always issue the <B>kas unlock</B>
146 command to unlock the account.
147 </DL>
148 <P><B>The D Instruction for Creating a Directory</B>
149 <A NAME="IDX4120"></A>
150 <A NAME="IDX4121"></A>
151 <A NAME="IDX4122"></A>
152 <A NAME="IDX4123"></A>
153 <A NAME="IDX4124"></A>
154 <A NAME="IDX4125"></A>
155 <A NAME="IDX4126"></A>
156 <A NAME="IDX4127"></A>
157 <A NAME="IDX4128"></A>
158 <A NAME="IDX4129"></A>
159 <A NAME="IDX4130"></A>
160 <P>The <B>D</B> instruction in a <B>uss</B> template file creates a
161 directory. Its intended use is to create a subdirectory in the user
162 home directory created by the <B>V</B> instruction in the template
163 file.
164 <P>Any number of <B>D</B> instructions can appear in the template
165 file. If any variables in the instruction take their values from the
166 <B>V</B> instruction (notably, the $MTPT variable), the instruction must
167 follow the <B>V</B> instruction in the file.
168 <P>Although it is possible to use the <B>D</B> instruction to create a
169 directory on the local disk of the machine where the <B>uss</B> command is
170 issued, it is not recommended. The preferred method for automated
171 creation of directories on a local disk is the <B>package</B>
172 program. Two complications arise if the <VAR>pathname</VAR> field refers
173 to a local disk directory&#58;
174 <UL>
175 <P><LI>The <B>uss</B> command prints a warning message because it cannot
176 associate an access control list (ACL) with a local disk directory. It
177 creates the directory nonetheless, and some syntactically correct value must
178 appear in the instruction&#39;s <VAR>ACL</VAR> field.
179 <P><LI>To designate any user other than the issuer as the new directory&#39;s
180 owner, the issuer must log onto the machine as the local superuser
181 <B>root</B>. For local disk directories, only the local superuser
182 <B>root</B> is allowed to issue the UNIX <B>chown</B> command that the
183 <B>uss</B> command interpreter invokes to change the owner from the
184 default value (the directory&#39;s creator, which in this case is the issuer
185 of the <B>uss</B> command). The issuer must then also use the
186 <B>-admin</B> argument to the <B>uss add</B> or <B>uss bulk</B>
187 command to authenticate as a privileged AFS administrator, which is required
188 for creating the Authentication Database and Protection Database entries that
189 the <B>uss</B> command interpreter always creates for a new
190 account.
191 </UL>
192 <P>The instruction has the following syntax&#58;
193 <PRE>   <B>D</B>  <VAR>pathname</VAR>  <VAR>mode_bits</VAR>  <VAR>owner</VAR>  <VAR>ACL</VAR>
194    
195 </PRE>
196 <P>where
197 <DL>
198 <P><DT><B>D
199 </B><DD>Indicates a directory creation instruction. It must be a capital
200 letter.
201 <P><DT><B><VAR>pathname</VAR>
202 </B><DD>Specifies the directory&#39;s full pathname. It can include
203 variables.
204 <P>Specify the read/write path to the directory, to avoid the failure that
205 results from attempting to create a new directory in a read-only
206 volume. By convention, the read/write path is indicated by placing a
207 period before the cell name at the pathname&#39;s second level (for example,
208 <B>/afs/.abc.com</B>). For further discussion of the
209 concept of read/write and read-only paths through the filespace, see the
210 reference page for the <B>fs mkmount</B> command.
211 <P><DT><B><VAR>mode_bits</VAR>
212 </B><DD>Sets the directory&#39;s UNIX mode bits. Acceptable values are the
213 standard three- or four-digit numbers corresponding to combinations of
214 permissions. Examples&#58; <B>755</B> corresponds to
215 <B>rwxr-xr-x</B>, and <B>644</B> to <B>rw-r--r--</B>. The
216 first (owner) <B>x</B> bit must be turned on to enable access to a
217 directory.
218 <P><DT><B><VAR>owner</VAR>
219 </B><DD>Specifies the username or UNIX user ID (UID) of the user to be designated
220 the directory&#39;s owner in the output from the UNIX <B>ls -ld</B>
221 command. If the directory resides in AFS, place the $UID variable in
222 this field. If the directory resides on the local disk, this field must
223 be the username or UID of the <B>uss</B> command&#39;s issuer, unless the
224 issuer is logged in as the local superuser <B>root</B>.
225 <P><DT><B><VAR>ACL</VAR>
226 </B><DD>Sets the ACL on the new directory. It must appear even if the new
227 directory resides on the local disk rather than in AFS, but is ignored in that
228 case. Provide one or more paired values, each pair consisting of an AFS
229 username or group name and the desired permissions, in that order.
230 Separate the two parts of the pair, and each pair, with a space. The
231 <B>fs setacl</B> reference page describes the available
232 permissions.
233 <P>For an AFS directory, grant all permissions to the directory&#39;s owner
234 at least. Usually that is the new user, in which case the appropriate
235 value is <B>$USER all</B>.
236 <P>It is not possible to grant any permissions to the issuer of the
237 <B>uss</B> command. As the last step in account creation, the
238 <B>uss</B> command interpreter automatically deletes that person from any
239 ACLs set during the creation process.
240 </DL>
241 <P><B>The E Instruction for Creating a Single-line File</B>
242 <A NAME="IDX4131"></A>
243 <A NAME="IDX4132"></A>
244 <A NAME="IDX4133"></A>
245 <A NAME="IDX4134"></A>
246 <A NAME="IDX4135"></A>
247 <A NAME="IDX4136"></A>
248 <P>The <B>E</B> instruction in a <B>uss</B> template file creates a
249 file by echoing a specified character string into it. Its intended use
250 is to create files in the user home directory created by the <B>V</B>
251 instruction in the template file, or in a subdirectory created by a
252 <B>D</B> instruction.
253 <P>Any number of <B>E</B> instructions can appear in the template
254 file. If the file resides in a directory created by a <B>D</B>
255 instruction, the <B>E</B> instruction must follow the <B>D</B>
256 instruction in the file.
257 <P>The <B>E</B> and <B>F</B> instructions have complementary
258 advantages. The character string echoed into the file by an
259 <B>E</B> instruction can be customized for each user, because it can
260 include the standard variables for which the <B>uss</B> command
261 interpreter substitutes the values specified by arguments to the <B>uss
262 add</B> command or fields in a bulk input file <B>add</B>
263 instruction. In contrast, a file created using the <B>F</B>
264 instruction cannot include variables and so has the same content for all
265 users. However, a file created by an <B>E</B> instruction can be a
266 single line only, because no carriage returns (newline characters) are allowed
267 in the character string.
268 <P>Although it is possible to use the <B>E</B> instruction to create a
269 file on the local disk of the machine where the <B>uss</B> command is
270 issued, it is not recommended. The preferred method for automated
271 creation of files on a local disk is the <B>package</B> program.
272 The main complication is that designating any user other than the issuer as
273 the new file&#39;s owner requires logging onto the machine as the local
274 superuser <B>root</B>. For local disk files, only the local
275 superuser <B>root</B> is allowed to issue the UNIX <B>chown</B>
276 command that the <B>uss</B> command interpreter invokes to change the
277 owner from the default value (the file&#39;s creator, which in this case is
278 the issuer of the <B>uss</B> command). The issuer must then also
279 use the <B>-admin</B> argument to the <B>uss add</B> or <B>uss
280 bulk</B> command to authenticate as a privileged AFS administrator, which is
281 required for creating the Authentication Database and Protection Database
282 entries that the <B>uss</B> command interpreter always creates for a new
283 account.
284 <P>The instruction has the following syntax&#58;
285 <PRE>   <B>E</B>  <VAR>pathname</VAR>  <VAR>mode_bits</VAR>  <VAR>owner</VAR>  "<VAR>contents</VAR>"
286    
287 </PRE>
288 <P>where
289 <DL>
290 <P><DT><B>E
291 </B><DD>Indicates a file creation instruction. It must be a capital
292 letter.
293 <P><DT><B><VAR>pathname</VAR>
294 </B><DD>Specifies the file&#39;s full pathname. It can include
295 variables.
296 <P>Specify the read/write path to the file, to avoid the failure that results
297 from attempting to create a new file in a read-only volume. By
298 convention, the read/write path is indicated by placing a period before the
299 cell name at the pathname&#39;s second level (for example,
300 <B>/afs/.abc.com</B>). For further discussion of the
301 concept of read/write and read-only paths through the filespace, see the
302 reference page for the <B>fs mkmount</B> command.
303 <P><DT><B><VAR>mode_bits</VAR>
304 </B><DD>Sets the file&#39;s UNIX mode bits. Acceptable values are the
305 standard three- or four-digit numbers corresponding to combinations of
306 permissions. Examples&#58; <B>755</B> corresponds to
307 <B>rwxr-xr-x</B>, and <B>644</B> to <B>rw-r--r--</B>.
308 <P><DT><B><VAR>owner</VAR>
309 </B><DD>Specifies the username or UNIX user ID (UID) of the user to be designated
310 the file&#39;s owner in the output from the UNIX <B>ls -l</B>
311 command. If the file resides in AFS, place the $UID variable in this
312 field. If the file resides on the local disk, specify the username or
313 UID of the <B>uss</B> command&#39;s issuer; otherwise, the account
314 creation operation halts immediately.
315 <P><DT><B><VAR>contents</VAR>
316 </B><DD>Specifies the one-line character string to write into the new file.
317 Surround it with double quotes if it contains one or more spaces. It
318 cannot contain the newline character, but can contain any of the standard
319 variables, which the command interpreter resolves as it creates the
320 file.
321 </DL>
322 <P><A NAME="SPTWQ6"></A><B>The F Instruction for Creating a File
323 from a Prototype</B>
324 <A NAME="IDX4137"></A>
325 <A NAME="IDX4138"></A>
326 <A NAME="IDX4139"></A>
327 <A NAME="IDX4140"></A>
328 <A NAME="IDX4141"></A>
329 <A NAME="IDX4142"></A>
330 <P>The <B>F</B> instruction in a <B>uss</B> template file creates a
331 file by copying the contents of an existing file (the <I>prototype</I>)
332 into it. Its intended use is to create files in the user home directory
333 created by the <B>V</B> instruction in the template file, or in a
334 subdirectory created by a <B>D</B> instruction.
335 <P>Any number of <B>F</B> instructions can appear in the template
336 file. If the file resides in a directory created by a <B>D</B>
337 instruction, the <B>F</B> instruction must follow the <B>D</B>
338 instruction in the file.
339 <P>The <B>E</B> and <B>F</B> instructions have complementary
340 advantages. A file created using the <B>F</B> instruction has the
341 same content for all users, whereas a file created by an <B>E</B>
342 instruction can be customized for each user if it includes variables.
343 However, a file created by an <B>E</B> instruction can be a single line
344 only, whereas the prototype file copied by an <B>F</B> instruction can be
345 any length.
346 <P>Although it is possible to use the <B>F</B> instruction to create a
347 file on the local disk of the machine where the <B>uss</B> command is
348 issued, it is not recommended. The preferred method for automated
349 creation of files on a local disk is the <B>package</B> program.
350 The main complication is that designating any user other than the issuer as
351 the new file&#39;s owner requires logging onto the machine as the local
352 superuser <B>root</B>. For local disk files, only the local
353 superuser <B>root</B> is allowed to issue the UNIX <B>chown</B>
354 command that the <B>uss</B> command interpreter invokes to change the
355 owner from the default value (the file&#39;s creator, which in this case is
356 the issuer of the <B>uss</B> command). The issuer must then also
357 use the <B>-admin</B> argument to the <B>uss add</B> or <B>uss
358 bulk</B> command to authenticate as a privileged AFS administrator, which is
359 required for creating the Authentication Database and Protection Database
360 entries that the <B>uss</B> command interpreter always creates for a new
361 account.
362 <P>The instruction has the following syntax&#58;
363 <PRE>   <B>F</B>  <VAR>pathname</VAR>  <VAR>mode_bits</VAR>  <VAR>owner</VAR>  <VAR>prototype_file</VAR>
364    
365 </PRE>
366 <P>where
367 <DL>
368 <P><DT><B>F
369 </B><DD>Indicates a file creation instruction. It must be a capital
370 letter.
371 <P><DT><B><VAR>pathname</VAR>
372 </B><DD>Specifies the full pathname of the file to create, including the
373 filename. It can include variables.
374 <P>Specify the read/write path to the file, to avoid the failure that results
375 from attempting to create a new file in a read-only volume. By
376 convention, the read/write path is indicated by placing a period before the
377 cell name at the pathname&#39;s second level (for example,
378 <B>/afs/.abc.com</B>). For further discussion of the
379 concept of read/write and read-only paths through the filespace, see the
380 reference page for the <B>fs mkmount</B> command.
381 <P><DT><B><VAR>mode_bits</VAR>
382 </B><DD>Sets the file&#39;s UNIX mode bits. Acceptable values are the
383 standard three- or four-digit numbers corresponding to combinations of
384 permissions. Examples&#58; <B>755</B> corresponds to
385 <B>rwxr-xr-x</B>, and <B>644</B> to <B>rw-r--r--</B>.
386 <P><DT><B><VAR>owner</VAR>
387 </B><DD>Specifies the username or UNIX user ID (UID) of the user to be designated
388 the file&#39;s owner in the output from the UNIX <B>ls -l</B>
389 command. If the file resides in AFS, place the $UID variable in this
390 field. If the file resides on the local disk, specify the username or
391 UID of the <B>uss</B> command&#39;s issuer; otherwise, the account
392 creation operation halts immediately.
393 <P><DT><B><VAR>prototype_file</VAR>
394 </B><DD>Names the AFS or local disk directory that houses the prototype file to
395 copy. The prototype file&#39;s name must match the final element in
396 the <VAR>pathname</VAR> field.
397 </DL>
398 <P><A NAME="SPTWQ7"></A><B>The G Instruction for Facilitating Even
399 Distribution of Home Directories</B>
400 <A NAME="IDX4143"></A>
401 <A NAME="IDX4144"></A>
402 <A NAME="IDX4145"></A>
403 <A NAME="IDX4146"></A>
404 <A NAME="IDX4147"></A>
405 <A NAME="IDX4148"></A>
406 <P>The <B>G</B> instruction in a <B>uss</B> template file creates a
407 directory as one of the set of directories from which the <B>uss</B>
408 command interpreter selects when choosing a new user home directory&#39;s
409 parent directory. More specifically, when the $AUTO variable appears in
410 the <VAR>mount_point</VAR> field of a <B>V</B> instruction, the command
411 interpreter substitutes for it the directory defined by a <B>G</B>
412 instruction that currently has the fewest entries.
413 <P>The instruction&#39;s intended use is to distribute user accounts evenly
414 among several directories, rather than using directories that reflect
415 divisions such as departmental affiliation. Distributing home
416 directories in this fashion is useful mainly in very large cells where storing
417 all user home directories under a single parent directory potentially slows
418 directory lookup, or where a workplace-based division results in unevenly
419 sized directories such that some users consistently experience slower
420 directory lookup than others. See the chapter on <B>uss</B> in the
421 <I>AFS Administration Guide</I> for more information.
422 <P>Any number of <B>G</B> instructions can appear in the template
423 file. If the <B>V</B> instruction includes the $AUTO variable, it
424 must appear after all of the <B>G</B> instructions in the file.
425 <P>The instruction has the following syntax&#58;
426 <PRE>   <B>G</B>  <VAR>directory</VAR>
427    
428 </PRE>
429 <P>where
430 <DL>
431 <P><DT><B>G
432 </B><DD>Indicates an instruction that creates a directory to be considered as a
433 value for the $AUTO variable. It must be a capital letter.
434 <P><DT><B><VAR>directory</VAR>
435 </B><DD>Specifies the directory&#39;s name as either a complete pathname or only
436 the directory name. The choice determines the appropriate format for
437 the <VAR>mount_point</VAR> field of a <B>V</B> instruction, as discussed in
438 the following example.
439 <P>Specify the read/write path to the directory, to avoid the failure that
440 results from attempting to create a new mount point in a read-only volume when
441 the $AUTO variable is used in a <B>V</B> instruction&#39;s
442 <VAR>mount_point</VAR> field. By convention, the read/write path is
443 indicated by placing a period before the cell name at the pathname&#39;s
444 second level (for example, <B>/afs/.abc.com</B>). For
445 further discussion of the concept of read/write and read-only paths through
446 the filespace, see the reference page for the <B>fs mkmount</B>
447 command.
448 </DL>
449 <P><B>The L and S Instructions for Creating a Link</B>
450 <A NAME="IDX4149"></A>
451 <A NAME="IDX4150"></A>
452 <A NAME="IDX4151"></A>
453 <A NAME="IDX4152"></A>
454 <A NAME="IDX4153"></A>
455 <A NAME="IDX4154"></A>
456 <A NAME="IDX4155"></A>
457 <A NAME="IDX4156"></A>
458 <A NAME="IDX4157"></A>
459 <A NAME="IDX4158"></A>
460 <A NAME="IDX4159"></A>
461 <A NAME="IDX4160"></A>
462 <A NAME="IDX4161"></A>
463 <P>The <B>L</B> instruction in a <B>uss</B> template file creates a
464 hard link between two files, as achieved by the standard UNIX <B>ln</B>
465 command. The <B>S</B> instruction creates a symbolic link between
466 two files, as achieved by the standard UNIX <B>ln -s</B> command. A
467 full explanation of links is beyond the scope of this document, but the basic
468 effect is to create a second name for an existing file, enabling access via
469 either name. Creating a link does not create a second copy of the
470 file.
471 <P>AFS allows hard links only if the linked files reside in the same
472 directory, because it becomes difficult to determine which access control list
473 (ACL) applies to the file if the two copies reside in directories with
474 different ACLs. AFS allows symbolic links between two files that reside
475 in different directories, or even different volumes. The File Server
476 uses the ACL associated with the actual file rather than the link.
477 <P>Any number of <B>L</B> and <B>S</B> instructions can appear in the
478 template file. If the existing file or link is to reside in a directory
479 created by a <B>D</B> instruction, or if the existing file was created by
480 an <B>E</B> or <B>F</B> instruction, the <B>L</B> or <B>S</B>
481 instruction must follow the <B>D</B>, <B>E</B>, or <B>F</B>
482 instruction.
483 <P>The instructions share the following syntax&#58;
484 <PRE>   <B>L</B>  <VAR>existing_file</VAR>  <VAR>link</VAR>
485    <B>S</B>  <VAR>existing_file</VAR>  <VAR>link</VAR>
486    
487 </PRE>
488 <P>where
489 <DL>
490 <P><DT><B>L
491 </B><DD>Indicates a hard link creation instruction. It must be a capital
492 letter.
493 <P><DT><B>S
494 </B><DD>Indicates a symbolic link creation instruction. It must be a
495 capital letter.
496 <P><DT><B><VAR>existing_file</VAR>
497 </B><DD>Specifies the complete pathname of the existing file.
498 <P><DT><B><VAR>link</VAR>
499 </B><DD>Specifies the complete pathname of the second name for the file.
500 <P>Specify the read/write path to the link, to avoid the failure that results
501 from attempting to create a new link in a read-only volume. By
502 convention, the read/write path is indicated by placing a period before the
503 cell name at the pathname&#39;s second level (for example,
504 <B>/afs/.abc.com</B>). For further discussion of the
505 concept of read/write and read-only paths through the filespace, see the
506 reference page for the <B>fs mkmount</B> command.
507 </DL>
508 <P><A NAME="SPTWQ8"></A><B>The V Instruction for Creating and
509 Mounting a Volume</B>
510 <A NAME="IDX4162"></A>
511 <A NAME="IDX4163"></A>
512 <A NAME="IDX4164"></A>
513 <A NAME="IDX4165"></A>
514 <A NAME="IDX4166"></A>
515 <A NAME="IDX4167"></A>
516 <A NAME="IDX4168"></A>
517 <A NAME="IDX4169"></A>
518 <A NAME="IDX4170"></A>
519 <A NAME="IDX4171"></A>
520 <A NAME="IDX4172"></A>
521 <A NAME="IDX4173"></A>
522 <A NAME="IDX4174"></A>
523 <A NAME="IDX4175"></A>
524 <A NAME="IDX4176"></A>
525 <A NAME="IDX4177"></A>
526 <A NAME="IDX4178"></A>
527 <A NAME="IDX4179"></A>
528 <A NAME="IDX4180"></A>
529 <P>The <B>V</B> instruction in a <B>uss</B> template file creates a
530 volume on a specified file server machine and partition and creates an entry
531 for it in the Volume Location Database (VLDB). It mounts the volume at
532 a location in the AFS file space that becomes the user&#39;s home directory,
533 then designates the directory&#39;s owner and sets its access control list
534 (ACL).
535 <P>Only one <B>V</B> instruction can appear in the template file, and one
536 must appear if the template file contains any instructions at all (is not
537 empty). All other instructions are optional, except that the template
538 must include <B>G</B> instructions if the $AUTO variable appears in
539 it. (The <B>V</B> instruction is not necessarily the first line in
540 the template. If the template includes the $AUTO variable, then the
541 <B>G</B> instructions which provide values for the variable must precede
542 it in the file.)
543 <P>The instruction has the following syntax&#58;
544 <PRE>   <B>V</B>  <VAR>volume_name</VAR>  <VAR>server</VAR>  <VAR>partition</VAR>  <VAR>quota</VAR>  <VAR>mount_point</VAR> <VAR>owner</VAR>  <VAR>ACL</VAR>
545    
546 </PRE>
547 <P>where
548 <DL>
549 <P><DT><B>V
550 </B><DD>Indicates a volume creation instruction. It must be a capital
551 letter.
552 <P><DT><B><VAR>volume_name</VAR>
553 </B><DD>Specifies the volume&#39;s name. To follow the convention for AFS
554 user volume names, specify the value <B>user.$USER</B>.
555 Provide a value for the $USER variable via the <B>uss add</B>
556 command&#39;s <B>-user</B> argument or the <VAR>username</VAR> field in the
557 bulk input file <B>add</B> instruction.
558 <P><DT><B><VAR>server</VAR>
559 </B><DD>Names the file server machine on which to create the new user&#39;s
560 volume. It is best to provide the fully-qualified hostname (for
561 example, <B>fs1.abc.com</B>), but an abbreviated form is
562 acceptable provided that the cell&#39;s naming service is available to
563 resolve it at the time the volume is created. To read in the value from
564 the <B>uss add</B> command&#39;s <B>-server</B> argument, specify the
565 value <B>$SERVER</B>.
566 <P><DT><B><VAR>partition</VAR>
567 </B><DD>Specifies the partition on which to create the user&#39;s volume; it
568 must be on the file server machine named in the <VAR>server</VAR> field.
569 Identify the partition by its complete name (for example, <B>/vicepa</B>)
570 or use or use one of the following abbreviations. 
571 <PRE>   <B>/vicepa</B>     =     <B>vicepa</B>      =      <B>a</B>      =      <B>0</B>
572    <B>/vicepb</B>     =     <B>vicepb</B>      =      <B>b</B>      =      <B>1</B>
573    
574 </PRE>
575 <P>
576 <P>After <B>/vicepz</B> (for which the index is 25) comes 
577 <PRE>   <B>/vicepaa</B>    =     <B>vicepaa</B>     =      <B>aa</B>     =      <B>26</B>
578    <B>/vicepab</B>    =     <B>vicepab</B>     =      <B>ab</B>     =      <B>27</B>
579    
580 </PRE>
581 <P>and so on through 
582 <PRE>   <B>/vicepiv</B>    =     <B>vicepiv</B>     =      <B>iv</B>     =      <B>255</B>
583     
584 </PRE>
585 <P>To read in the value from the <B>uss add</B> command&#39;s
586 <B>-partition</B> argument, specify the value <B>$PART</B>.
587 <P><DT><B><VAR>quota</VAR>
588 </B><DD>Sets the maximum number of kilobyte blocks the volume can occupy on the
589 file server machine&#39;s disk. Specify an integer constant if all
590 volumes have the same quota (<B>1024</B> equals a megabyte), or use one of
591 the number variables ($1 through $9) to assign different values to different
592 volumes.
593 <P><DT><B><VAR>mount_point</VAR>
594 </B><DD>Creates a mount point for the volume, which serves as the volume&#39;s
595 root directory. Include the $USER variable as part of the pathname to
596 follow the convention that user home directory names include the
597 username.
598 <P>Specify the read/write path to the mount point, to avoid the failure that
599 results from attempting to create a new mount point in a read-only
600 volume. By convention, the read/write path is indicated by placing a
601 period before the cell name at the pathname&#39;s second level (for example,
602 <B>/afs/.abc.com</B>). If the $AUTO variable appears
603 in this field, the directories named by each <B>G</B> instruction possibly
604 already indicate the read/write path. For further discussion of the
605 concept of read/write and read-only paths through the filespace, see the
606 reference page for the <B>fs mkmount</B> command..
607 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">If used, the $MTPT variable in this field takes its value from the <B>uss
608 add</B> command&#39;s <B>-mount</B> argument or from the
609 <VAR>mount_point</VAR> field of an <B>add</B> instruction in the bulk input
610 file. However, subsequent uses of the $MTPT variable (usually in
611 following <B>D</B>, <B>E</B>, or <B>F</B> instructions) take as
612 their value the complete contents of this field.
613 </TD></TR></TABLE>
614 <P><DT><B><VAR>owner</VAR>
615 </B><DD>Specifies the username or UNIX user ID (UID) of the user to be designated
616 the mount point&#39;s owner in the output from the UNIX <B>ls -ld</B>
617 command. To follow the convention for home directory ownership, place
618 the value <B>$UID</B> in this field.
619 <P><DT><B><VAR>ACL</VAR>
620 </B><DD>Sets the ACL on the new directory. Provide one or more paired
621 values, each pair consisting of an AFS username or group name and the desired
622 permissions, in that order. Separate the two parts of the pair, and
623 each pair, with a space. The <B>fs setacl</B> reference page
624 describes the available permissions.
625 <P>Grant all permissions to the new user at least. The appropriate
626 value is <B>$USER all</B>.
627 <P>AFS automatically grants the <B>system&#58;administrators</B> group
628 all permissions as well. It is not possible to grant any permissions to
629 the issuer of the <B>uss</B> command. As the last step in account
630 creation, the <B>uss</B> command interpreter automatically deletes that
631 user from any ACLs set during the creation process.
632 </DL>
633 <P><A NAME="SPTWQ9"></A><B>The X Instruction for Running a
634 Command</B>
635 <A NAME="IDX4181"></A>
636 <A NAME="IDX4182"></A>
637 <A NAME="IDX4183"></A>
638 <P>The <B>X</B> instruction in a <B>uss</B> template file runs the
639 indicated command, which can be a standard UNIX or AFS command. It can
640 include any variables from the template file, which the <B>uss</B> command
641 interpreter resolves before passing the command on to the appropriate other
642 command interpreter. It must be a single line only, however (cannot
643 contain carriage returns or newline characters).
644 <P>Any number of <B>X</B> instructions can appear in the template
645 file. If an instruction manipulates an element created by another
646 instruction, it must follow that instruction in the file.
647 <P>The instruction has the following syntax&#58;
648 <PRE>   <B>X "</B><VAR>command</VAR><B>"</B>
649    
650 </PRE>
651 <P>where
652 <DL>
653 <P><DT><B>X
654 </B><DD>Indicates a command execution instruction. It must be a capital
655 letter.
656 <P><DT><B><VAR>command</VAR>
657 </B><DD>Specifies the command to run. Surround it with double quotes as
658 shown if it contains one or more spaces. It can contain any variables
659 from the template file, but not newline characters.
660 </DL>
661 <P><STRONG>Examples</STRONG>
662 <P>The following example <B>A</B> instruction sets a password lifetime of
663 254 days, prohibits password reuse, limits the number of consecutive failed
664 authentication attempts to nine and sets the corresponding locktime to
665 25&#58;30 minutes (which is a multiple of 8.5 minutes). The
666 username is read in from the <B>-user</B> argument to the <B>uss
667 add</B> command or from the <I>username</I> field in each <B>add</B>
668 instruction in a bulk input file.
669 <PRE>   A $USER 254 noreuse 9 25&#58;30
670    
671 </PRE>
672 <P>The following example <B>D</B> instruction creates a directory called
673 <I>public</I> in a new user&#39;s home directory, designates the user as
674 the directory&#39;s owner, and grants him or her all ACL permissions.
675 <PRE>   D $MTPT/public 0755 $UID $USER all 
676    
677 </PRE>
678 <P>The following example <B>E</B> instruction creates a file in the
679 current working directory called
680 <VAR>username</VAR>.<B>etcp</B>. The contents are an entry
681 suitable for incorporating into the cell&#39;s global
682 <B>/etc/password</B> file.
683 <PRE>   E  $USER.etcp  0644 root "$USER&#58;X&#58;$UID&#58;10&#58;$NAME&#58;$MTPT&#58;/bin/csh"
684    
685 </PRE>
686 <P>The following example <B>F</B> instruction, appropriate for the ABC
687 Corporation cell, copies a prototype <B>.login</B> file into the
688 user&#39;s home directory.
689 <PRE>   F $MTPT/.login 0644 $UID /afs/abc.com/common/uss/skel/.login 
690    
691 </PRE>
692 <P>In the following example, the State University cell&#39;s administrators
693 have decided to distribute user home directories evenly into three
694 directories. They define three <B>G</B> instructions&#58;
695 <PRE>   G usr1
696    G usr2
697    G usr3
698    
699 </PRE>
700 <P>and then put the following value in the <I>mount_point</I> field of the
701 <B>V</B> instruction&#58;
702 <PRE>   /afs/stateu.edu/$AUTO/$USER
703    
704 </PRE>
705 <P>Alternatively, if they include the entire directory pathname in the
706 <B>G</B> instruction&#58;
707 <PRE>   G /afs/stateu.edu/usr1
708    G /afs/stateu.edu/usr2
709    G /afs/stateu.edu/usr3
710    
711 </PRE>
712 <P>then the <I>mount_point</I> field of the <B>V</B> instruction
713 specifies only the following&#58;
714 <PRE>   $AUTO/$USER
715    
716 </PRE>
717 <P>The following example <B>L</B> instruction creates a hard link between
718 the files <B>mail</B> and <B>mbox</B> in the user&#39;s home
719 directory.
720 <PRE>   L $MTPT/mbox $MTPT/mail
721    
722 </PRE>
723 <P>The following example <B>S</B> instruction, appropriate for the ABC
724 Corporation cell, links the file <B>Mail/outgoing</B> in the user&#39;s
725 home directory to the file
726 <B>/afs/abc.com/common/mail/outgoing</B>.
727 <PRE>   S /afs/abc.com/common/mail/outgoing $MTPT/Mail/outgoing
728    
729 </PRE>
730 <P>The following example <B>V</B> instruction creates a volume called
731 <B>user.</B><VAR>username</VAR> on the <B>/vicepa</B> partition
732 of the specified file server machine, assigning it a quota of 3000 kilobyte
733 blocks. The mount point is under <B>/afs/abc.com/usr</B> and
734 matches the username (the value of the $USER variable). The user owns
735 the home directory and has all access rights to it. The instruction
736 appears on two lines only for legibility; it must appear on a single line
737 in the template file.
738 <PRE>   V user.$USER $SERVER.abc.com /vicepa 3000   \
739            /afs/abc.com/usr/$USER $UID $USER all 
740    
741 </PRE>
742 <P>The following example <B>X</B> instruction mounts the backup version of
743 the user&#39;s volume at the <B>OldFiles</B> subdirectory.
744 <PRE>   X "fs mkm /afs/abc.com/usr/$USER/OldFiles   user.$USER.backup"
745    
746 </PRE>
747 <P><STRONG>Related Information</STRONG>
748 <P><A HREF="auarf054.htm#HDRUSSBULKINPUT">uss Bulk Input File</A>
749 <P><A HREF="auarf153.htm#HDRFS_MKMOUNT">fs mkmount</A>
750 <P><A HREF="auarf243.htm#HDRUSS_ADD">uss add</A>
751 <P><A HREF="auarf245.htm#HDRUSS_BULK">uss bulk</A>
752 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf054.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf056.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
753 <!-- Begin Footer Records  ========================================== -->
754 <P><HR><B> 
755 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
756 </B> 
757 <!-- End Footer Records  ============================================ -->
758 <A NAME="Bot_Of_Page"></A>
759 </BODY></HTML>