dux-documentation-update-20010829
[openafs.git] / doc / html / QuickStartUnix / auqbg007.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Quick Beginnings</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3574/auqbg000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 2 Oct 2000 at 12:25:35                -->
7 <META HTTP-EQUIV="updated" CONTENT="Mon, 02 Oct 2000 12:25:35">
8 <META HTTP-EQUIV="review" CONTENT="Tue, 02 Oct 2001 12:25:35">
9 <META HTTP-EQUIV="expires" CONTENT="Wed, 02 Oct 2002 12:25:35">
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>Quick Beginnings</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auqbg002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auqbg006.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="auqbg008.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auqbg009.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <A NAME="IDX2926"></A>
19 <A NAME="IDX2927"></A>
20 <HR><H1><A NAME="HDRWQ133" HREF="auqbg002.htm#ToC_115">Installing Additional Client Machines</A></H1>
21 <P>This chapter describes how to install AFS client machines
22 after you have installed the first AFS machine. Some parts of the
23 installation differ depending on whether or not the new client is of the same
24 AFS system type (uses the same AFS binaries) as a previously installed client
25 machine.
26 <A NAME="IDX2928"></A>
27 <HR><H2><A NAME="Header_116" HREF="auqbg002.htm#ToC_116">Summary of Procedures</A></H2>
28 <OL TYPE=1>
29 <P><LI>Incorporate AFS into the machine's kernel
30 <P><LI>Define the machine's cell membership
31 <P><LI>Define cache location and size
32 <P><LI>Create the <B>/usr/vice/etc/CellServDB</B> file, which determines
33 which foreign cells the client can access in addition to the local cell
34 <P><LI>Create the <B>/afs</B> directory and start the Cache Manager
35 <P><LI>Create and mount volumes for housing AFS client binaries (necessary only
36 for clients of a new system type)
37 <P><LI>Create a link from the local <B>/usr/afsws</B> directory to the AFS
38 directory housing the AFS client binaries
39 <P><LI>Modify the machine's authentication system to enable AFS users to
40 obtain tokens at login
41 </OL>
42 <A NAME="IDX2929"></A>
43 <A NAME="IDX2930"></A>
44 <A NAME="IDX2931"></A>
45 <A NAME="IDX2932"></A>
46 <A NAME="IDX2933"></A>
47 <A NAME="IDX2934"></A>
48 <A NAME="IDX2935"></A>
49 <HR><H2><A NAME="HDRWQ134" HREF="auqbg002.htm#ToC_117">Creating AFS Directories on the Local Disk</A></H2>
50 <P>Create the <B>/usr/vice/etc</B> directory on the local
51 disk, to house client binaries and configuration files. Subsequent
52 instructions copy files from the AFS CD-ROM into them. Create the
53 <B>/cdrom</B> directory as a mount point for the CD-ROM, if it does not
54 already exist.
55 <PRE>      
56    # <B>mkdir /usr/vice</B>
57       
58    # <B>mkdir /usr/vice/etc</B>
59    
60    # <B>mkdir /cdrom</B>
61    
62 </PRE>
63 <HR><H2><A NAME="HDRWQ135" HREF="auqbg002.htm#ToC_118">Performing Platform-Specific Procedures</A></H2>
64 <P>Every AFS client machine's kernel must incorporate AFS
65 modifications. Some system types use a dynamic kernel loader program,
66 whereas on other system types you build AFS modifications into a static
67 kernel. Some system types support both methods.
68 <P>Also modify the machine's authentication system so that users obtain
69 an AFS token as they log into the local file system. Using AFS is
70 simpler and more convenient for your users if you make the modifications on
71 all client machines. Otherwise, users must perform a two-step login
72 procedure (login to the local file system and then issue the <B>klog</B>
73 command). For further discussion of AFS authentication, see the chapter
74 in the <I>IBM AFS Administration Guide</I> about cell configuration and
75 administration issues.
76 <P>For convenience, the following sections group the two procedures by system
77 type. Proceed to the appropriate section.
78 <UL>
79 <P><LI><A HREF="#HDRWQ136">Getting Started on AIX Systems</A>
80 <P><LI><A HREF="#HDRWQ137">Getting Started on Digital UNIX Systems</A>
81 <P><LI><A HREF="#HDRWQ138">Getting Started on  HP-UX Systems</A>
82 <P><LI><A HREF="#HDRWQ139">Getting Started on IRIX Systems</A>
83 <P><LI><A HREF="#HDRWQ143">Getting Started on Linux Systems</A>
84 <P><LI><A HREF="#HDRWQ144">Getting Started on Solaris Systems</A>
85 </UL>
86 <A NAME="IDX2936"></A>
87 <A NAME="IDX2937"></A>
88 <A NAME="IDX2938"></A>
89 <A NAME="IDX2939"></A>
90 <A NAME="IDX2940"></A>
91 <A NAME="IDX2941"></A>
92 <A NAME="IDX2942"></A>
93 <A NAME="IDX2943"></A>
94 <A NAME="IDX2944"></A>
95 <HR><H2><A NAME="HDRWQ136" HREF="auqbg002.htm#ToC_119">Getting Started on AIX Systems</A></H2>
96 <P>In this section you load AFS into the AIX kernel.
97 Then incorporate AFS modifications into the machine's secondary
98 authentication system, if you wish to enable AFS login.
99 <P><H3><A NAME="Header_120" HREF="auqbg002.htm#ToC_120">Loading AFS into the AIX Kernel</A></H3>
100 <P>The AIX kernel extension facility is the dynamic kernel loader provided
101 by IBM Corporation. AIX does not support incorporation of AFS
102 modifications during a kernel build.
103 <P>For AFS to function correctly, the kernel extension facility must run each
104 time the machine reboots, so the AFS initialization script (included in the
105 AFS distribution) invokes it automatically. In this section you copy
106 the script to the conventional location and edit it to select the appropriate
107 options depending on whether NFS is also to run.
108 <P>After editing the script, you run it to incorporate AFS into the
109 kernel. In a later section you verify that the script correctly
110 initializes the Cache Manager, then configure the AIX <B>inittab</B> file
111 so that the script runs automatically at reboot.
112 <OL TYPE=1>
113 <P><LI>Mount the AFS CD-ROM for AIX on the local <B>/cdrom</B>
114 directory. For instructions on mounting CD-ROMs (either locally or
115 remotely via NFS), see your AIX documentation. Then change directory as
116 indicated. 
117 <PRE>   
118    # <B>cd  /cdrom/rs_aix42/root.client/usr/vice/etc</B>
119    
120 </PRE>
121 <P><LI>Copy the AFS kernel library files to the local
122 <B>/usr/vice/etc/dkload</B> directory, and the AFS initialization script
123 to the <B>/etc</B> directory. 
124 <PRE>   
125    # <B>cp -rp  dkload  /usr/vice/etc</B>
126    
127    # <B>cp -p  rc.afs  /etc/rc.afs</B>
128     
129 </PRE>
130 <P><LI>Edit the <B>/etc/rc.afs</B> script, setting the <TT>NFS</TT>
131 variable as indicated.
132 <P>If the machine is not to function as an NFS/AFS Translator, set the
133 <TT>NFS</TT> variable as follows.
134 <PRE>      
135    NFS=$NFS_NONE
136 </PRE> 
137 <P>If the machine is to function as an NFS/AFS Translator and is running AIX
138 4.2.1 or higher, set the <TT>NFS</TT> variable as
139 follows. Note that NFS must already be loaded into the kernel, which
140 happens automatically on systems running AIX 4.1.1 and later, as
141 long as the file <B>/etc/exports</B> exists.
142 <PRE>   
143    NFS=$NFS_IAUTH
144    
145 </PRE>
146 <P><LI>Invoke the <B>/etc/rc.afs</B> script to load AFS modifications
147 into the kernel. You can ignore any error messages about the inability
148 to start the BOS Server or the Cache Manager or AFS client.
149 <PRE>   
150    # <B>/etc/rc.afs</B>
151    
152 </PRE>
153 </OL>
154 <P><H3><A NAME="Header_121" HREF="auqbg002.htm#ToC_121">Enabling AFS Login on AIX Systems</A></H3>
155 <P>Now incorporate AFS into the AIX secondary authentication
156 system.
157 <OL TYPE=1>
158 <P><LI>Issue the <B>ls</B> command to verify that the
159 <B>afs_dynamic_auth</B> and <B>afs_dynamic_kerbauth</B> programs are
160 installed in the local <B>/usr/vice/etc</B> directory. 
161 <PRE>   
162    # <B>ls /usr/vice/etc</B>   
163 </PRE> 
164 <P>If the files do not exist, mount the AFS CD-ROM for AIX (if it is not
165 already), change directory as indicated, and copy them.
166 <PRE>  
167    # <B>cd /cdrom/rs_aix42/root.client/usr/vice/etc</B>
168    
169    # <B>cp  -p  afs_dynamic*  /usr/vice/etc</B>
170    
171 </PRE>
172 <P><LI>Edit the local <B> /etc/security/user</B> file, making changes to the
173 indicated stanzas:
174 <UL>
175 <P><LI>In the default stanza, set the <TT>registry</TT> attribute to
176 <B>DCE</B> (not to <B>AFS</B>), as follows:
177 <PRE>   
178    registry = DCE
179    
180 </PRE>
181 <P><LI>In the default stanza, set the <TT>SYSTEM</TT> attribute as
182 indicated.
183 <P>If the machine is an AFS client only, set the following value:
184 <PRE>   
185    SYSTEM = "AFS OR (AFS[UNAVAIL] AND compat[SUCCESS])"   
186 </PRE> 
187 <P>If the machine is both an AFS and a DCE client, set the following value (it
188 must appear on a single line in the file):
189 <PRE>   
190    SYSTEM = "DCE OR DCE[UNAVAIL] OR AFS OR (AFS[UNAVAIL]  \
191        AND compat[SUCCESS])"
192    
193 </PRE>
194 <P><LI>In the <TT>root</TT> stanza, set the <TT>registry</TT> attribute as
195 follows. It enables the local superuser <B>root</B> to log into the
196 local file system only, based on the password listed in the local password
197 file.
198 <PRE>   
199    root:
200          registry = files
201    
202 </PRE>
203 </UL>
204 <P><LI>Edit the local <B>/etc/security/login.cfg</B> file, creating or
205 editing the indicated stanzas:
206 <UL>
207 <P><LI>In the <TT>DCE</TT> stanza, set the <TT>program</TT> attribute as
208 follows.
209 <P>If you use the AFS Authentication Server (<B>kaserver</B>
210 process):
211 <PRE>   
212    DCE:
213         program = /usr/vice/etc/afs_dynamic_auth   
214 </PRE> 
215 <P>If you use a Kerberos implementation of AFS authentication:
216 <PRE>   
217    DCE:
218         program = /usr/vice/etc/afs_dynamic_kerbauth
219    
220 </PRE>
221 <P><LI>In the <TT>AFS</TT> stanza, set the <TT>program</TT> attribute as
222 follows.
223 <P>If you use the AFS Authentication Server (<B>kaserver</B>
224 process):
225 <PRE>   
226    AFS:
227         program = /usr/vice/etc/afs_dynamic_auth   
228 </PRE> 
229 <P>If you use a Kerberos implementation of AFS authentication:
230 <PRE>   
231    AFS:
232         program = /usr/vice/etc/afs_dynamic_kerbauth
233    
234 </PRE>
235 </UL>
236 <P><LI>Proceed to <A HREF="#HDRWQ145">Loading and Creating Client Files</A>.
237 </OL>
238 <A NAME="IDX2945"></A>
239 <A NAME="IDX2946"></A>
240 <A NAME="IDX2947"></A>
241 <A NAME="IDX2948"></A>
242 <A NAME="IDX2949"></A>
243 <A NAME="IDX2950"></A>
244 <A NAME="IDX2951"></A>
245 <A NAME="IDX2952"></A>
246 <A NAME="IDX2953"></A>
247 <HR><H2><A NAME="HDRWQ137" HREF="auqbg002.htm#ToC_122">Getting Started on Digital UNIX Systems</A></H2>
248 <P>In this section you build AFS into the Digital UNIX
249 kernel. Then incorporate AFS modifications into the machine's
250 Security Integration Architecture (SIA) matrix, if you wish to enable AFS
251 login.
252 <P><H3><A NAME="Header_123" HREF="auqbg002.htm#ToC_123">Building AFS into the Digital UNIX Kernel</A></H3>
253 <P>On Digital UNIX systems, you must build AFS modifications into a new
254 static kernel; Digital UNIX does not support dynamic loading. If
255 the machine's hardware and software configuration exactly matches another
256 Digital UNIX machine on which AFS is already built into the kernel, you can
257 choose to copy the kernel from that machine to this one. In general,
258 however, it is better to build AFS modifications into the kernel on each
259 machine according to the following instructions.
260 <OL TYPE=1>
261 <P><LI>Create a copy called <B>AFS</B> of the basic kernel configuration file
262 included in the Digital UNIX distribution as
263 <B>/usr/sys/conf/</B><VAR>machine_name</VAR>, where <VAR>machine_name</VAR> is
264 the machine's hostname in all uppercase letters. 
265 <PRE>   
266    # <B>cd /usr/sys/conf</B>
267    
268    # <B>cp</B> <VAR>machine_name</VAR> <B>AFS</B>
269    
270 </PRE>
271 <P><LI>Add AFS to the list of options in the configuration file you created in
272 the previous step, so that the result looks like the following: 
273 <PRE>          .                   .
274           .                   .
275        options               UFS
276        options               NFS
277        options               AFS
278           .                   .
279           .                   .
280    
281 </PRE>
282 <P><LI>Add an entry for AFS to two places in the file
283 <B>/usr/sys/conf/files</B>. 
284 <UL>
285 <P><LI>Add a line for AFS to the list of <TT>OPTIONS</TT>, so that the result
286 looks like the following:
287 <PRE>             .                .      .
288              .                .      .
289       OPTIONS/nfs          optional nfs 
290       OPTIONS/afs          optional afs 
291       OPTIONS/nfs_server   optional nfs_server
292              .                .      .
293              .                .      .
294    
295 </PRE>
296 <P><LI>Add an entry for AFS to the list of <TT>MODULES</TT>, so that the result
297 looks like the following:
298 <PRE>             .                  .        .          .
299              .                  .        .          .
300       #
301       MODULE/nfs_server     optional nfs_server Binary
302       nfs/nfs_server.c      module nfs_server optimize -g3
303       nfs/nfs3_server.c     module nfs_server optimize -g3
304       #
305       MODULE/afs            optional afs Binary
306       afs/libafs.c          module afs
307       #
308    
309 </PRE>
310 </UL>
311 <P><LI>Add an entry for AFS to two places in the file
312 <B>/usr/sys/vfs/vfs_conf.c</B>. 
313 <UL>
314 <P><LI>Add AFS to the list of defined file systems, so that the result looks like
315 the following:
316 <PRE>        .       .              
317         .       .              
318      #include &lt;afs.h>
319      #if defined(AFS) &amp;&amp; AFS
320             extern struct vfsops afs_vfsops;
321      #endif  
322         .       .              
323         .       .              
324    
325 </PRE>
326 <P><LI>Put a declaration for AFS in the <B>vfssw[]</B> table's
327 MOUNT_ADDON slot, so that the result looks like the following: 
328 <PRE>        .                          .              .
329         .                          .              .
330       &amp;fdfs_vfsops,         "fdfs",   /* 12 = MOUNT_FDFS */
331    #if  defined(AFS)
332       &amp;afs_vfsops,          "afs",
333    #else
334       (struct vfsops *)0,   "",       /* 13 = MOUNT_ADDON */
335    #endif
336    #if NFS &amp;&amp; INFS_DYNAMIC   
337        &amp;nfs3_vfsops,        "nfsv3",  /* 14 = MOUNT_NFS3 */         
338    
339 </PRE>
340 </UL>
341 <P><LI>Mount the AFS CD-ROM for Digital UNIX on the local <B>/cdrom</B>
342 directory. For instructions on mounting CD-ROMs (either locally or
343 remotely via NFS), see your Digital UNIX documentation. Then change
344 directory as indicated.
345 <PRE>   
346    # <B>cd /cdrom/alpha_dux40/root.client</B>
347    
348 </PRE>
349 <P><LI>Copy the AFS initialization script to the local directory for
350 initialization files (by convention, <B>/sbin/init.d</B> on Digital
351 UNIX machines). Note the removal of the <B>.rc</B> extension
352 as you copy the script.
353 <PRE>   
354    # <B>cp usr/vice/etc/afs.rc  /sbin/init.d/afs</B>
355    
356 </PRE>
357 <P><LI>Copy the AFS kernel module to the local <B>/usr/sys/BINARY</B>
358 directory. 
359 <P>If the machine's kernel supports NFS server functionality:
360 <PRE>  
361    # <B>cp bin/libafs.o /usr/sys/BINARY/afs.mod</B>   
362 </PRE> 
363 <P>If the machine's kernel does not support NFS server
364 functionality:
365 <PRE>  
366    # <B>cp bin/libafs.nonfs.o /usr/sys/BINARY/afs.mod</B>
367    
368 </PRE>
369 <P><LI>Configure and build the kernel. Respond to any prompts by pressing
370 &lt;<B>Return</B>>. The resulting kernel resides in the file
371 <B>/sys/AFS/vmunix</B>. 
372 <PRE>   
373    # <B>doconfig -c AFS</B>
374    
375 </PRE>
376 <P><LI>Rename the existing kernel file and copy the new, AFS-modified file to the
377 standard location. 
378 <PRE>   
379    # <B>mv /vmunix /vmunix_noafs</B>
380    
381    # <B>cp /sys/AFS/vmunix /vmunix</B>
382    
383 </PRE>
384 <P><LI>Reboot the machine to start using the new kernel, and login again as the
385 superuser <B>root</B>. 
386 <PRE>   
387    # <B>cd /</B>
388    
389    # <B>shutdown -r now</B>
390    
391    login: <B>root</B>
392    Password: <VAR>root_password</VAR>
393    
394 </PRE>
395 </OL>
396 <P><H3><A NAME="Header_124" HREF="auqbg002.htm#ToC_124">Enabling AFS Login on Digital UNIX Systems</A></H3>
397 <P>On Digital UNIX systems, the AFS initialization script automatically
398 incorporates the AFS authentication library file into the Security Integration
399 Architecture (SIA) matrix on the machine, so that users with AFS accounts
400 obtain a token at login. In this section you copy the library file to
401 the appropriate location.
402 <P>For more information on SIA, see the Digital UNIX reference page for
403 <B>matrix.conf</B>, or consult the section on security in your
404 Digital UNIX documentation.
405 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">If the machine runs both the DCE and AFS client software, AFS must start
406 after DCE. Consult the AFS initialization script for suggested symbolic
407 links to create for correct ordering. Also, the system startup script
408 order must initialize SIA before any long-running process that uses
409 authentication.
410 </TD></TR></TABLE>
411 <P>Perform the following steps to enable AFS login.
412 <OL TYPE=1>
413 <P><LI>Mount the AFS CD-ROM for Digital UNIX on the local <B>/cdrom</B>
414 directory, if it is not already. Change directory as indicated. 
415 <PRE>   
416    # <B>cd /cdrom/alpha_dux40/lib/afs</B>
417    
418 </PRE>
419 <P><LI>Copy the appropriate AFS authentication library file to the local
420 <B>/usr/shlib</B> directory. 
421 <P>If you use the AFS Authentication Server (<B>kaserver</B> process) in
422 the cell:
423 <PRE>   
424    # <B>cp  libafssiad.so  /usr/shlib</B>   
425 </PRE> 
426 <P>If you use a Kerberos implementation of AFS authentication, rename the
427 library file as you copy it:
428 <PRE>   
429    # <B>cp  libafssiad.krb.so  /usr/shlib/libafssiad.so</B>
430    
431 </PRE>
432 <P><LI>Proceed to <A HREF="#HDRWQ145">Loading and Creating Client Files</A>.
433 </OL>
434 <A NAME="IDX2954"></A>
435 <A NAME="IDX2955"></A>
436 <A NAME="IDX2956"></A>
437 <A NAME="IDX2957"></A>
438 <A NAME="IDX2958"></A>
439 <A NAME="IDX2959"></A>
440 <A NAME="IDX2960"></A>
441 <A NAME="IDX2961"></A>
442 <A NAME="IDX2962"></A>
443 <HR><H2><A NAME="HDRWQ138" HREF="auqbg002.htm#ToC_125">Getting Started on  HP-UX Systems</A></H2>
444 <P>In this section you build AFS into the HP-UX kernel.
445 Then incorporate AFS modifications into the machine's Pluggable
446 Authentication Module (PAM) system, if you wish to enable AFS login.
447 <P><H3><A NAME="Header_126" HREF="auqbg002.htm#ToC_126">Building AFS into the HP-UX Kernel</A></H3>
448 <P>On HP-UX systems, you must build AFS modifications into a new static
449 kernel; HP-UX does not support dynamic loading. If the
450 machine's hardware and software configuration exactly matches another
451 HP-UX machine on which AFS is already built into the kernel, you can choose to
452 copy the kernel from that machine to this one. In general, however, it
453 is better to build AFS modifications into the kernel on each machine according
454 to the following instructions.
455 <OL TYPE=1>
456 <P><LI>Move the existing kernel-related files to a safe location. 
457 <PRE>   
458    # <B>cp /stand/vmunix /stand/vmunix.noafs</B>
459    
460    # <B>cp /stand/system /stand/system.noafs</B>
461    
462 </PRE>
463 <P><LI>Mount the AFS CD-ROM for HP-UX on the local <B>/cdrom</B>
464 directory. For instructions on mounting CD-ROMs (either locally or
465 remotely via NFS), see your HP-UX documentation. Then change directory
466 as indicated. 
467 <PRE>   
468    # <B>cd /cdrom/hp_ux110/root.client</B>
469    
470 </PRE>
471 <P><LI>Copy the AFS initialization file to the local directory for initialization
472 files (by convention, <B>/sbin/init.d</B> on HP-UX
473 machines). Note the removal of the <B>.rc</B> extension as
474 you copy the file.
475 <PRE>   
476    # <B>cp usr/vice/etc/afs.rc  /sbin/init.d/afs</B>
477    
478 </PRE>
479 <P><LI>Copy the file <B>afs.driver</B> to the local
480 <B>/usr/conf/master.d</B> directory, changing its name to
481 <B>afs</B> as you do. 
482 <PRE>     
483    # <B>cp  usr/vice/etc/afs.driver  /usr/conf/master.d/afs</B>
484    
485 </PRE>
486 <P><LI>Copy the AFS kernel module to the local <B>/usr/conf/lib</B>
487 directory. 
488 <P>If the machine's kernel supports NFS server functionality:
489 <PRE>   
490    # <B>cp bin/libafs.a /usr/conf/lib</B>   
491 </PRE>
492 <P>If the machine's kernel does not support NFS server functionality,
493 change the file's name as you copy it:
494 <PRE>   
495    # <B>cp bin/libafs.nonfs.a /usr/conf/lib/libafs.a</B>
496    
497 </PRE>
498 <P><LI>Incorporate the AFS driver into the kernel, either using the
499 <B>SAM</B> program or a series of individual commands. 
500 <UL>
501 <P><LI>To use the <B>SAM</B> program: 
502 <OL TYPE=a>
503 <P><LI>Invoke the <B>SAM</B> program, specifying the hostname of the local
504 machine as <VAR>local_hostname</VAR>. The <B>SAM</B> graphical user
505 interface pops up. 
506 <PRE>   
507    # <B>sam -display</B> <VAR>local_hostname</VAR><B>:0</B> 
508    
509 </PRE>
510 <P><LI>Choose the <B>Kernel Configuration</B> icon, then the
511 <B>Drivers</B> icon. From the list of drivers, select
512 <B>afs</B>.
513 <P><LI>Open the pull-down <B>Actions</B> menu and choose the <B>Add Driver
514 to Kernel</B> option.
515 <P><LI>Open the <B>Actions</B> menu again and choose the <B>Create a New
516 Kernel</B> option.
517 <P><LI>Confirm your choices by choosing <B>Yes</B> and <B>OK</B> when
518 prompted by subsequent pop-up windows. The <B>SAM</B> program
519 builds the kernel and reboots the system.
520 <P><LI>Login again as the superuser <B>root</B>.
521 <PRE>   
522    login: <B>root</B>
523    Password: <VAR>root_password</VAR>
524    
525 </PRE>
526 </OL>
527 <P><LI>To use individual commands: 
528 <OL TYPE=a>
529 <P><LI>Edit the file <B>/stand/system</B>, adding an entry for <B>afs</B>
530 to the <TT>Subsystems</TT> section.
531 <P><LI>Change to the <B>/stand/build</B> directory and issue the
532 <B>mk_kernel</B> command to build the kernel. 
533 <PRE>   
534    # <B>cd /stand/build</B>
535       
536    # <B>mk_kernel</B>
537    
538 </PRE>
539 <P><LI>Move the new kernel to the standard location (<B>/stand/vmunix</B>),
540 reboot the machine to start using it, and login again as the superuser
541 <B>root</B>.
542 <PRE>   
543    # <B>mv /stand/build/vmunix_test /stand/vmunix</B>
544       
545    # <B>cd /</B>
546       
547    # <B>shutdown -r now</B>             
548    
549    login: <B>root</B>
550    Password: <VAR>root_password</VAR>
551    
552 </PRE>
553 </OL>
554 </UL>
555 </OL>
556 <P><H3><A NAME="Header_127" HREF="auqbg002.htm#ToC_127">Enabling AFS Login on HP-UX Systems</A></H3>
557 <P>At this point you incorporate AFS into the operating system's
558 Pluggable Authentication Module (PAM) scheme. PAM integrates all
559 authentication mechanisms on the machine, including login, to provide the
560 security infrastructure for authenticated access to and from the
561 machine.
562 <P>Explaining PAM is beyond the scope of this document. It is assumed
563 that you understand the syntax and meanings of settings in the PAM
564 configuration file (for example, how the <TT>other</TT> entry works, the
565 effect of marking an entry as <TT>required</TT>, <TT>optional</TT>, or
566 <TT>sufficient</TT>, and so on).
567 <P>The following instructions explain how to alter the entries in the PAM
568 configuration file for each service for which you wish to use AFS
569 authentication. Other configurations possibly also work, but the
570 instructions specify the recommended and tested configuration.
571 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">The instructions specify that you mark each entry as
572 <TT>optional</TT>. However, marking some modules as optional can mean
573 that they grant access to the corresponding service even when the user does
574 not meet all of the module's requirements. In some operating
575 system revisions, for example, if you mark as optional the module that
576 controls login via a dial-up connection, it allows users to login without
577 providing a password. See the <I>IBM AFS Release Notes</I> for a
578 discussion of any limitations that apply to this operating system. 
579 <P>Also, with some operating system versions you must install patches for PAM
580 to interact correctly with certain authentication programs. For
581 details, see the <I>IBM AFS Release Notes</I>.
582 </TD></TR></TABLE>
583 <P>The recommended AFS-related entries in the PAM configuration file make use
584 of one or more of the following three attributes.
585 <DL>
586 <P><DT><B><TT>try_first_pass</TT>
587 </B><DD>This is a standard PAM attribute that can be included on entries after the
588 first one for a service; it directs the module to use the password that
589 was provided to the first module. For the AFS module, it means that AFS
590 authentication succeeds if the password provided to the module listed first is
591 the user's correct AFS password. For further discussion of this
592 attribute and its alternatives, see the operating system's PAM
593 documentation.
594 <P><DT><B><TT>ignore_root</TT>
595 </B><DD>This attribute, specific to the AFS PAM module, directs it to ignore not
596 only the local superuser <B> root</B>, but also any user with UID 0
597 (zero).
598 <P><DT><B><TT>setenv_password_expires</TT>
599 </B><DD>This attribute, specific to the AFS PAM module, sets the environment
600 variable PASSWORD_EXPIRES to the expiration date of the user's AFS
601 password, which is recorded in the Authentication Database.
602 </DL>
603 <P>Perform the following steps to enable AFS login.
604 <OL TYPE=1>
605 <P><LI>Mount the AFS CD-ROM for HP-UX on the <B>/cdrom</B> directory, if it
606 is not already. Then change directory as indicated.
607 <PRE>  
608    # <B>cd /usr/lib/security</B>
609    
610 </PRE>
611 <P><LI>Copy the AFS authentication library file to the
612 <B>/usr/lib/security</B> directory. Then create a symbolic link to
613 it whose name does not mention the version. Omitting the version
614 eliminates the need to edit the PAM configuration file if you later update the
615 library file. 
616 <P>If you use the AFS Authentication Server (<B>kaserver</B> process) in
617 the cell: 
618 <PRE>   
619    # <B>cp /cdrom/hp_ux110/lib/pam_afs.so.1  .</B>
620   
621    # <B>ln -s  pam_afs.so.1  pam_afs.so</B>   
622 </PRE> 
623 <P>If you use a Kerberos implementation of AFS authentication: 
624 <PRE>  
625    #<B> cp /cdrom/hp_ux110/lib/pam_afs.krb.so.1   .</B>
626   
627    # <B>ln -s pam_afs.krb.so.1 pam_afs.so</B>
628    
629 </PRE>
630 <P><LI>Edit the <TT>Authentication management</TT> section of the HP-UX PAM
631 configuration file, <B>/etc/pam.conf</B> by convention. The
632 entries in this section have the value <TT>auth</TT> in their second
633 field. 
634 <P>First edit the standard entries, which refer to the HP-UX PAM module
635 (usually, the file <B>/usr/lib/security/libpam_unix.1</B>) in their
636 fourth field. For each service for which you want to use AFS
637 authentication, edit the third field of its entry to read
638 <TT>optional</TT>. The <B>pam.conf</B> file in the HP-UX
639 distribution usually includes standard entries for the <B>login</B> and
640 <B>ftp</B> services, for instance. 
641 <P>If there are services for which you want to use AFS authentication, but for
642 which the <B>pam.conf</B> file does not already include a standard
643 entry, you must create that entry and place the value <TT>optional</TT> in
644 its third field. For instance, the HP-UX <B>pam.conf</B>
645 file does not usually include standard entries for the <B>remsh</B> or
646 <B>telnet</B> services. 
647 <P>Then create an AFS-related entry for each service, placing it immediately
648 below the standard entry. The following example shows what the
649 <TT>Authentication Management</TT> section looks like after you have you
650 edited or created entries for the services mentioned previously. Note
651 that the example AFS entries appear on two lines only for legibility. 
652 <PRE>   
653    login   auth  optional  /usr/lib/security/libpam_unix.1
654    login   auth  optional  /usr/lib/security/pam_afs.so      \
655          try_first_pass  ignore_root  setenv_password_expires
656    ftp     auth  optional  /usr/lib/security/libpam_unix.1
657    ftp     auth  optional  /usr/lib/security/pam_afs.so      \
658          try_first_pass  ignore_root
659    remsh   auth  optional  /usr/lib/security/libpam_unix.1
660    remsh   auth  optional  /usr/lib/security/pam_afs.so      \
661          try_first_pass  ignore_root            
662    telnet  auth  optional  /usr/lib/security/libpam_unix.1
663    telnet  auth  optional  /usr/lib/security/pam_afs.so      \
664          try_first_pass  ignore_root  setenv_password_expires
665    
666 </PRE>
667 <P><LI>If you use the Common Desktop Environment (CDE) on the machine and want
668 users to obtain an AFS token as they log in, also add or edit the following
669 four entries in the <TT>Authentication management</TT> section. Note
670 that the AFS-related entries appear on two lines here only for
671 legibility. 
672 <PRE>  
673    dtlogin   auth  optional  /usr/lib/security/libpam_unix.1
674    dtlogin   auth  optional  /usr/lib/security/pam_afs.so     \
675          try_first_pass  ignore_root
676    dtaction  auth  optional  /usr/lib/security/libpam_unix.1
677    dtaction  auth  optional  /usr/lib/security/pam_afs.so     \
678          try_first_pass  ignore_root
679    
680 </PRE>
681 <P><LI>Proceed to <A HREF="#HDRWQ145">Loading and Creating Client Files</A>.
682 </OL>
683 <A NAME="IDX2963"></A>
684 <A NAME="IDX2964"></A>
685 <A NAME="IDX2965"></A>
686 <HR><H2><A NAME="HDRWQ139" HREF="auqbg002.htm#ToC_128">Getting Started on IRIX Systems</A></H2>
687 <P>In this section you incorporate AFS into the IRIX kernel,
688 choosing one of two methods:
689 <UL>
690 <P><LI>Dynamic loading using the <B>ml</B> program distributed by Silicon
691 Graphics, Incorporated (SGI).
692 <P><LI>Building a new static kernel.
693 </UL>
694 <P>Then see <A HREF="#HDRWQ142">Enabling AFS Login on IRIX Systems</A> to read about integrated AFS login on IRIX systems.
695 <P>In preparation for either dynamic loading or kernel building, perform the
696 following procedures:
697 <OL TYPE=1>
698 <P><LI>Mount the AFS CD-ROM for IRIX on the <B>/cdrom</B> directory.
699 For instructions on mounting CD-ROMs (either locally or remotely via NFS), see
700 your IRIX documentation. Then change directory as indicated.
701 <PRE>   
702    # <B>cd  /cdrom/sgi_65/root.client</B>
703    
704 </PRE>
705 <P><LI>Copy the AFS initialization script to the local directory for
706 initialization files (by convention, <B>/etc/init.d</B> on IRIX
707 machines). Note the removal of the <B>.rc</B> extension as
708 you copy the script.
709 <PRE>   
710    # <B>cp -p   usr/vice/etc/afs.rc  /etc/init.d/afs</B>
711    
712 </PRE>
713 <P><LI>Issue the <B>uname -m</B> command to determine the machine's CPU
714 board type. The <B>IP</B><VAR>xx</VAR> value in the output must match
715 one of the supported CPU board types listed in the <I>IBM AFS Release
716 Notes</I> for the current version of AFS.
717 <PRE>   
718    # <B>uname -m</B>
719     
720 </PRE>
721 <P><LI>Proceed to either <A HREF="#HDRWQ140">Loading AFS into the IRIX Kernel</A> or <A HREF="#HDRWQ141">Building AFS into the IRIX Kernel</A>.
722 </OL>
723 <A NAME="IDX2966"></A>
724 <A NAME="IDX2967"></A>
725 <A NAME="IDX2968"></A>
726 <A NAME="IDX2969"></A>
727 <A NAME="IDX2970"></A>
728 <A NAME="IDX2971"></A>
729 <A NAME="IDX2972"></A>
730 <P><H3><A NAME="HDRWQ140" HREF="auqbg002.htm#ToC_129">Loading AFS into the IRIX Kernel</A></H3>
731 <P>The <B>ml</B> program is the dynamic kernel loader
732 provided by SGI for IRIX systems. If you use it rather than building
733 AFS modifications into a static kernel, then for AFS to function correctly the
734 <B>ml</B> program must run each time the machine reboots.
735 Therefore, the AFS initialization script (included on the AFS CD-ROM) invokes
736 it automatically when the <B>afsml</B> configuration variable is
737 activated. In this section you activate the variable and run the
738 script.
739 <P>In a later section you verify that the script correctly initializes the
740 Cache Manager, then create the links that incorporate AFS into the IRIX
741 startup and shutdown sequence.
742 <OL TYPE=1>
743 <P><LI>Create the local <B>/usr/vice/etc/sgiload</B> directory to house the
744 AFS kernel library file.
745 <PRE>   
746    # <B>mkdir /usr/vice/etc/sgiload</B>
747    
748 </PRE>
749 <P><LI>Copy the appropriate AFS kernel library file to the
750 <B>/usr/vice/etc/sgiload</B> directory. The
751 <B>IP</B><VAR>xx</VAR> portion of the library file name must match the value
752 previously returned by the <B>uname -m</B> command. Also choose the
753 file appropriate to whether the machine's kernel supports NFS server
754 functionality (NFS must be supported for the machine to act as an NFS/AFS
755 Translator). Single- and multiprocessor machines use the same library
756 file. 
757 <P>(You can choose to copy all of the kernel library files into the <B>
758 /usr/vice/etc/sgiload</B> directory, but they require a significant amount
759 of space.) 
760 <P>If the machine's kernel supports NFS server functionality:
761 <PRE>   
762    # <B>cp -p  usr/vice/etc/sgiload/libafs.IP</B><VAR>xx</VAR><B>.o  /usr/vice/etc/sgiload</B>   
763 </PRE> 
764 <P>If the machine's kernel does not support NFS server
765 functionality:
766 <PRE>   
767    # <B>cp -p  usr/vice/etc/sgiload/libafs.IP</B><VAR>xx</VAR><B>.nonfs.o</B>   \
768                    <B>/usr/vice/etc/sgiload</B>
769    
770 </PRE>
771 <P><LI>Issue the <B>chkconfig</B> command to activate the <B>afsml</B>
772 configuration variable. 
773 <PRE>   
774    # <B>/etc/chkconfig -f afsml on</B>   
775 </PRE> 
776 <P>If the machine is to function as an NFS/AFS Translator and the kernel
777 supports NFS server functionality, activate the <B>afsxnfs</B>
778 variable.
779 <PRE>   
780    # <B>/etc/chkconfig -f afsxnfs on</B>
781    
782 </PRE>
783 <P><LI>Run the <B>/etc/init.d/afs</B> script to load AFS extensions
784 into the kernel. The script invokes the <B>ml</B> command,
785 automatically determining which kernel library file to use based on this
786 machine's CPU type and the activation state of the <B>afsxnfs</B>
787 variable. 
788 <P>You can ignore any error messages about the inability to start the BOS
789 Server or the Cache Manager or AFS client.
790 <PRE>   
791    # <B>/etc/init.d/afs start</B>
792    
793 </PRE>
794 <P><LI>Proceed to <A HREF="#HDRWQ142">Enabling AFS Login on IRIX Systems</A>.
795 </OL>
796 <A NAME="IDX2973"></A>
797 <P><H3><A NAME="HDRWQ141" HREF="auqbg002.htm#ToC_130">Building AFS into the IRIX Kernel</A></H3>
798 <P>If you prefer to build a kernel, and the machine's
799 hardware and software configuration exactly matches another IRIX machine on
800 which AFS is already built into the kernel, you can choose to copy the kernel
801 from that machine to this one. In general, however, it is better to
802 build AFS modifications into the kernel on each machine according to the
803 following instructions.
804 <OL TYPE=1>
805 <P><LI>Copy the kernel initialization file <B>afs.sm</B> to the local
806 <B>/var/sysgen/system</B> directory, and the kernel master file
807 <B>afs</B> to the local <B>/var/sysgen/master.d</B>
808 directory.
809 <PRE>   
810    # <B>cp -p  bin/afs.sm  /var/sysgen/system</B>
811    
812    # <B>cp -p  bin/afs  /var/sysgen/master.d</B>
813    
814 </PRE>
815 <P><LI>Copy the appropriate AFS kernel library file to the local file
816 <B>/var/sysgen/boot/afs.a</B>; the <B>IP</B><VAR>xx</VAR>
817 portion of the library file name must match the value previously returned by
818 the <B>uname -m</B> command. Also choose the file appropriate to
819 whether the machine's kernel supports NFS server functionality (NFS must
820 be supported for the machine to act as an NFS/AFS Translator). Single-
821 and multiprocessor machines use the same library file. 
822 <P>If the machine's kernel supports NFS server functionality:
823 <PRE>   
824    # <B>cp -p   bin/libafs.IP</B><VAR>xx</VAR><B>.a   /var/sysgen/boot/afs.a</B>   
825 </PRE> 
826 <P>If the machine's kernel does not support NFS server
827 functionality:
828 <PRE>   
829    # <B>cp -p  bin/libafs.IP</B><VAR>xx</VAR><B>.nonfs.a  /var/sysgen/boot/afs.a</B>
830    
831 </PRE>
832 <P><LI>Issue the <B>chkconfig</B> command to deactivate the <B>afsml</B>
833 configuration variable. 
834 <PRE>   
835    # <B>/etc/chkconfig -f afsml off</B>   
836 </PRE> 
837 <P>If the machine is to function as an NFS/AFS Translator and the kernel
838 supports NFS server functionality, activate the <B>afsxnfs</B>
839 variable. 
840 <PRE>    
841    # <B>/etc/chkconfig -f afsxnfs on</B>
842    
843 </PRE>
844 <P><LI>Copy the existing kernel file, <B>/unix</B>, to a safe
845 location. Compile the new kernel, which is created in the file
846 <B>/unix.install</B>. It overwrites the existing
847 <B>/unix</B> file when the machine reboots in the next step. 
848 <PRE>   
849    # <B>cp /unix /unix_noafs</B>
850    
851    # <B>autoconfig</B>
852    
853 </PRE>
854 <P><LI>Reboot the machine to start using the new kernel, and login again as the
855 superuser <B>root</B>. 
856 <PRE>   
857    # <B>cd /</B>
858          
859    # <B>shutdown -i6 -g0 -y</B>
860    
861    login: <B>root</B>
862    Password: <VAR>root_password</VAR>
863    
864 </PRE>
865 <P><LI>Proceed to <A HREF="#HDRWQ142">Enabling AFS Login on IRIX Systems</A>.
866 </OL>
867 <A NAME="IDX2974"></A>
868 <A NAME="IDX2975"></A>
869 <A NAME="IDX2976"></A>
870 <P><H3><A NAME="HDRWQ142" HREF="auqbg002.htm#ToC_131">Enabling AFS Login on IRIX Systems</A></H3>
871 <P>The standard IRIX command-line <B>login</B> program and
872 the graphical <B>xdm</B> login program both automatically grant an AFS
873 token when AFS is incorporated into the machine's kernel. However,
874 some IRIX distributions use another login utility by default, and it does not
875 necessarily incorporate the required AFS modifications. If that is the
876 case, you must disable the default utility if you want AFS users to obtain AFS
877 tokens at login. For further discussion, see the <I>IBM AFS Release
878 Notes</I>.
879 <P>If you configure the machine to use an AFS-modified login utility, then the
880 <B>afsauthlib.so</B> and <B>afskauthlib.so</B> files
881 (included in the AFS distribution) must reside in the <B>/usr/vice/etc</B>
882 directory. Issue the <B>ls</B> command to verify.
883 <PRE>  
884    # <B>ls /usr/vice/etc</B>   
885 </PRE>
886 <P>If the files do not exist, mount the AFS CD-ROM for IRIX (if it is not
887 already), change directory as indicated, and copy them.
888 <PRE>  
889    # <B>cd /cdrom/sgi_65/root.client/usr/vice/etc</B>
890    
891    # <B>cp  -p  *authlib*  /usr/vice/etc</B>   
892 </PRE>
893 <P>After taking any necessary action, proceed to <A HREF="#HDRWQ145">Loading and Creating Client Files</A>.
894 <A NAME="IDX2977"></A>
895 <A NAME="IDX2978"></A>
896 <A NAME="IDX2979"></A>
897 <A NAME="IDX2980"></A>
898 <A NAME="IDX2981"></A>
899 <A NAME="IDX2982"></A>
900 <A NAME="IDX2983"></A>
901 <A NAME="IDX2984"></A>
902 <A NAME="IDX2985"></A>
903 <HR><H2><A NAME="HDRWQ143" HREF="auqbg002.htm#ToC_132">Getting Started on Linux Systems</A></H2>
904 <P>In this section you load AFS into the Linux kernel.
905 Then incorporate AFS modifications into the machine's Pluggable
906 Authentication Module (PAM) system, if you wish to enable AFS login.
907 <P><H3><A NAME="Header_133" HREF="auqbg002.htm#ToC_133">Loading AFS into the Linux Kernel</A></H3>
908 <P>The <B>insmod</B> program is the dynamic kernel loader for
909 Linux. Linux does not support incorporation of AFS modifications during
910 a kernel build.
911 <P>For AFS to function correctly, the <B>insmod</B> program must run each
912 time the machine reboots, so the AFS initialization script (included on the
913 AFS CD-ROM) invokes it automatically. The script also includes commands
914 that select the appropriate AFS library file automatically. In this
915 section you run the script.
916 <P>In a later section you also verify that the script correctly initializes
917 the Cache Manager, then activate a configuration variable, which results in
918 the script being incorporated into the Linux startup and shutdown
919 sequence.
920 <OL TYPE=1>
921 <P><LI>Mount the AFS CD-ROM for Linux on the local <B>/cdrom</B>
922 directory. For instructions on mounting CD-ROMs (either locally or
923 remotely via NFS), see your Linux documentation. Then change directory
924 as indicated. 
925 <PRE>   
926    # <B>cd  /cdrom/i386_linux22/root.client/usr/vice/etc</B>
927    
928 </PRE>
929 <P><LI>Copy the AFS kernel library files to the local
930 <B>/usr/vice/etc/modload</B> directory. The filenames for the
931 libraries have the format
932 <B>libafs-</B><VAR>version</VAR><B>.o</B>, where <VAR>version</VAR>
933 indicates the kernel build level. The string <B>.mp</B> in
934 the <VAR>version</VAR> indicates that the file is appropriate for machines
935 running a multiprocessor kernel. 
936 <PRE>   
937    # <B>cp -rp  modload  /usr/vice/etc</B>
938    
939 </PRE>
940 <P><LI>Copy the AFS initialization script to the local directory for
941 initialization files (by convention, <B>/etc/rc.d/init.d</B>
942 on Linux machines). Note the removal of the <B>.rc</B>
943 extension as you copy the script.
944 <PRE>   
945    # <B>cp -p   afs.rc  /etc/rc.d/init.d/afs</B> 
946     
947 </PRE>
948 <P><LI>Run the AFS initialization script to load AFS extensions into the
949 kernel. You can ignore any error messages about the inability to start
950 the BOS Server or the Cache Manager or AFS client.
951 <PRE>   
952    # <B>/etc/rc.d/init.d/afs  start</B>
953    
954 </PRE>
955 </OL>
956 <P><H3><A NAME="Header_134" HREF="auqbg002.htm#ToC_134">Enabling AFS Login on Linux Systems</A></H3>
957 <P>At this point you incorporate AFS into the operating system's
958 Pluggable Authentication Module (PAM) scheme. PAM integrates all
959 authentication mechanisms on the machine, including login, to provide the
960 security infrastructure for authenticated access to and from the
961 machine.
962 <P>Explaining PAM is beyond the scope of this document. It is assumed
963 that you understand the syntax and meanings of settings in the PAM
964 configuration file (for example, how the <TT>other</TT> entry works, the
965 effect of marking an entry as <TT>required</TT>, <TT>optional</TT>, or
966 <TT>sufficient</TT>, and so on).
967 <P>The following instructions explain how to alter the entries in the PAM
968 configuration file for each service for which you wish to use AFS
969 authentication. Other configurations possibly also work, but the
970 instructions specify the recommended and tested configuration.
971 <P>The recommended AFS-related entries in the PAM configuration file make use
972 of one or more of the following three attributes.
973 <DL>
974 <P><DT><B><TT>try_first_pass</TT>
975 </B><DD>This is a standard PAM attribute that can be included on entries after the
976 first one for a service; it directs the module to use the password that
977 was provided to the first module. For the AFS module, it means that AFS
978 authentication succeeds if the password provided to the module listed first is
979 the user's correct AFS password. For further discussion of this
980 attribute and its alternatives, see the operating system's PAM
981 documentation.
982 <P><DT><B><TT>ignore_root</TT>
983 </B><DD>This attribute, specific to the AFS PAM module, directs it to ignore not
984 only the local superuser <B> root</B>, but also any user with UID 0
985 (zero).
986 <P><DT><B><TT>setenv_password_expires</TT>
987 </B><DD>This attribute, specific to the AFS PAM module, sets the environment
988 variable PASSWORD_EXPIRES to the expiration date of the user's AFS
989 password, which is recorded in the Authentication Database.
990 </DL>
991 <P>Perform the following steps to enable AFS login.
992 <OL TYPE=1>
993 <P><LI>Mount the AFS CD-ROM for Linux on the <B>/cdrom</B> directory, if it
994 is not already. Then change to the directory for PAM modules, which
995 depends on which Linux distribution you are using. 
996 <P>If you are using a Linux distribution from Red Hat Software:
997 <PRE>   
998    # <B>cd /lib/security</B>   
999 </PRE> 
1000 <P>If you are using another Linux distribution:
1001 <PRE>   
1002    # <B>cd /usr/lib/security</B>
1003    
1004 </PRE>
1005 <P><LI>Copy the appropriate AFS authentication library file to the directory to
1006 which you changed in the previous step. Create a symbolic link whose
1007 name does not mention the version. Omitting the version eliminates the
1008 need to edit the PAM configuration file if you later update the library
1009 file. 
1010 <P>If you use the AFS Authentication Server (<B>kaserver</B>
1011 process):
1012 <PRE>   
1013    # <B>cp /cdrom/i386_linux22/lib/pam_afs.so.1  .</B>
1014    
1015    # <B>ln -s pam_afs.so.1 pam_afs.so</B>   
1016 </PRE> 
1017 <P>If you use a Kerberos implementation of AFS authentication:
1018 <PRE>   
1019    # <B>cp /cdrom/i386_linux22/lib/pam_afs.krb.so.1   .</B>
1020    
1021    # <B>ln -s pam_afs.krb.so.1 pam_afs.so</B>
1022    
1023 </PRE>
1024 <P><LI>For each service with which you want to use AFS authentication, insert an
1025 entry for the AFS PAM module into the <TT>auth</TT> section of the
1026 service's PAM configuration file. (Linux uses a separate
1027 configuration file for each service, unlike some other operating systems which
1028 list all services in a single file.) Mark the entry as
1029 <TT>sufficient</TT> in the second field. 
1030 <P>Place the AFS entry below any entries that impose conditions under which
1031 you want the service to fail for a user who does not meet the entry's
1032 requirements. Mark these entries <TT>required</TT>. Place the
1033 AFS entry above any entries that need to execute only if AFS authentication
1034 fails. 
1035 <P>Insert the following AFS entry if using the Red Hat distribution:
1036 <PRE>   
1037    auth  sufficient  /lib/security/pam_afs.so   try_first_pass  ignore_root   
1038 </PRE> 
1039 <P>Insert the following AFS entry if using another distribution:
1040 <PRE>   
1041    auth  sufficient  /usr/lib/security/pam_afs.so  try_first_pass  ignore_root   
1042 </PRE> 
1043 <P>The following example illustrates the recommended configuration of the
1044 configuration file for the <B>login</B> service
1045 (<B>/etc/pam.d/login</B>) on a machine using the Red Hat
1046 distribution.
1047 <PRE>   
1048    #%PAM-1.0
1049    auth      required   /lib/security/pam_securetty.so
1050    auth      required   /lib/security/pam_nologin.so
1051    auth      sufficient /lib/security/pam_afs.so try_first_pass ignore_root
1052    auth      required   /lib/security/pam_pwdb.so shadow nullok
1053    account   required   /lib/security/pam_pwdb.so
1054    password  required   /lib/security/pam_cracklib.so
1055    password  required   /lib/security/pam_pwdb.so shadow nullok use_authtok
1056    session   required   /lib/security/pam_pwdb.so
1057    
1058 </PRE>
1059 <P><LI>Proceed to <A HREF="#HDRWQ145">Loading and Creating Client Files</A>.
1060 </OL>
1061 <A NAME="IDX2986"></A>
1062 <A NAME="IDX2987"></A>
1063 <A NAME="IDX2988"></A>
1064 <A NAME="IDX2989"></A>
1065 <A NAME="IDX2990"></A>
1066 <A NAME="IDX2991"></A>
1067 <A NAME="IDX2992"></A>
1068 <A NAME="IDX2993"></A>
1069 <A NAME="IDX2994"></A>
1070 <A NAME="IDX2995"></A>
1071 <A NAME="IDX2996"></A>
1072 <A NAME="IDX2997"></A>
1073 <HR><H2><A NAME="HDRWQ144" HREF="auqbg002.htm#ToC_135">Getting Started on Solaris Systems</A></H2>
1074 <P>In this section you load AFS into the Solaris kernel.
1075 Then incorporate AFS modifications into the machine's Pluggable
1076 Authentication Module (PAM) system, if you wish to enable AFS login.
1077 <P><H3><A NAME="Header_136" HREF="auqbg002.htm#ToC_136">Loading AFS into the Solaris Kernel</A></H3>
1078 <P>The <B>modload</B> program is the dynamic kernel loader provided by
1079 Sun Microsystems for Solaris systems. Solaris does not support
1080 incorporation of AFS modifications during a kernel build.
1081 <P>For AFS to function correctly, the <B>modload</B> program must run each
1082 time the machine reboots, so the AFS initialization script (included on the
1083 AFS CD-ROM) invokes it automatically. In this section you copy the
1084 appropriate AFS library file to the location where the <B>modload</B>
1085 program accesses it and then run the script.
1086 <P>In a later section you verify that the script correctly initializes the
1087 Cache Manager, then create the links that incorporate AFS into the Solaris
1088 startup and shutdown sequence.
1089 <OL TYPE=1>
1090 <P><LI>Mount the AFS CD-ROM for Solaris on the <B>/cdrom</B>
1091 directory. For instructions on mounting CD-ROMs (either locally or
1092 remotely via NFS), see your Solaris documentation. Then change
1093 directory as indicated. 
1094 <PRE>   
1095    # <B>cd  /cdrom/sun4x_56/root.client/usr/vice/etc</B>
1096    
1097 </PRE>
1098 <P><LI>Copy the AFS initialization script to the local directory for
1099 initialization files (by convention, <B>/etc/init.d</B> on Solaris
1100 machines). Note the removal of the <B>.rc</B> extension as
1101 you copy the script. 
1102 <PRE>   
1103    # <B>cp -p  afs.rc  /etc/init.d/afs</B>
1104    
1105 </PRE>
1106 <P><LI>Copy the appropriate AFS kernel library file to the local file
1107 <B>/kernel/fs/afs</B>. 
1108 <P>If the machine is running Solaris 2.6 or the 32-bit version of
1109 Solaris 7, its kernel supports NFS server functionality, and the
1110 <B>nfsd</B> process is running:
1111 <PRE>   
1112    # <B>cp -p modload/libafs.o /kernel/fs/afs</B>   
1113 </PRE> 
1114 <P>If the machine is running Solaris 2.6 or the 32-bit version of
1115 Solaris 7, and its kernel does not support NFS server functionality or the
1116 <B>nfsd</B> process is not running:
1117 <PRE>   
1118    # <B>cp -p modload/libafs.nonfs.o /kernel/fs/afs</B>   
1119 </PRE> 
1120 <P>If the machine is running the 64-bit version of Solaris 7, its kernel
1121 supports NFS server functionality, and the <B>nfsd</B> process is
1122 running:
1123 <PRE>   
1124    # <B>cp -p modload/libafs64.o /kernel/fs/sparcv9/afs</B>   
1125 </PRE> 
1126 <P>If the machine is running the 64-bit version of Solaris 7, and its
1127 kernel does not support NFS server functionality or the <B>nfsd</B>
1128 process is not running:
1129 <PRE>   
1130    # <B>cp -p modload/libafs64.nonfs.o /kernel/fs/sparcv9/afs</B>
1131    
1132 </PRE>
1133 <P><LI>Run the AFS initialization script to load AFS modifications into the
1134 kernel. You can ignore any error messages about the inability to start
1135 the BOS Server or the Cache Manager or AFS client.
1136 <PRE>   
1137    # <B>/etc/init.d/afs start</B>   
1138 </PRE> 
1139 <P>When an entry called <TT>afs</TT> does not already exist in the local
1140 <B>/etc/name_to_sysnum</B> file, the script automatically creates it and
1141 reboots the machine to start using the new version of the file. If this
1142 happens, log in again as the superuser <B>root</B> after the reboot and
1143 run the initialization script again. This time the required entry
1144 exists in the <B>/etc/name_to_sysnum</B> file, and the <B>modload</B>
1145 program runs. 
1146 <PRE>   
1147    login: <B>root</B>
1148    Password: <VAR>root_password</VAR>
1149    
1150    # <B>/etc/init.d/afs start</B>
1151    
1152 </PRE>
1153 </OL>
1154 <P><H3><A NAME="Header_137" HREF="auqbg002.htm#ToC_137">Enabling AFS Login on Solaris Systems</A></H3>
1155 <P>At this point you incorporate AFS into the operating system's
1156 Pluggable Authentication Module (PAM) scheme. PAM integrates all
1157 authentication mechanisms on the machine, including login, to provide the
1158 security infrastructure for authenticated access to and from the
1159 machine.
1160 <P>Explaining PAM is beyond the scope of this document. It is assumed
1161 that you understand the syntax and meanings of settings in the PAM
1162 configuration file (for example, how the <TT>other</TT> entry works, the
1163 effect of marking an entry as <TT>required</TT>, <TT>optional</TT>, or
1164 <TT>sufficient</TT>, and so on).
1165 <P>The following instructions explain how to alter the entries in the PAM
1166 configuration file for each service for which you wish to use AFS
1167 authentication. Other configurations possibly also work, but the
1168 instructions specify the recommended and tested configuration.
1169 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">The instructions specify that you mark each entry as
1170 <TT>optional</TT>. However, marking some modules as optional can mean
1171 that they grant access to the corresponding service even when the user does
1172 not meet all of the module's requirements. In some operating
1173 system revisions, for example, if you mark as optional the module that
1174 controls login via a dial-up connection, it allows users to login without
1175 providing a password. See the <I>IBM AFS Release Notes</I> for a
1176 discussion of any limitations that apply to this operating system. 
1177 <P>Also, with some operating system versions you must install patches for PAM
1178 to interact correctly with certain authentication programs. For
1179 details, see the <I>IBM AFS Release Notes</I>.
1180 </TD></TR></TABLE>
1181 <P>The recommended AFS-related entries in the PAM configuration file make use
1182 of one or more of the following three attributes.
1183 <DL>
1184 <P><DT><B><TT>try_first_pass</TT>
1185 </B><DD>This is a standard PAM attribute that can be included on entries after the
1186 first one for a service; it directs the module to use the password that
1187 was provided to the first module. For the AFS module, it means that AFS
1188 authentication succeeds if the password provided to the module listed first is
1189 the user's correct AFS password. For further discussion of this
1190 attribute and its alternatives, see the operating system's PAM
1191 documentation.
1192 <P><DT><B><TT>ignore_root</TT>
1193 </B><DD>This attribute, specific to the AFS PAM module, directs it to ignore not
1194 only the local superuser <B> root</B>, but also any user with UID 0
1195 (zero).
1196 <P><DT><B><TT>setenv_password_expires</TT>
1197 </B><DD>This attribute, specific to the AFS PAM module, sets the environment
1198 variable PASSWORD_EXPIRES to the expiration date of the user's AFS
1199 password, which is recorded in the Authentication Database.
1200 </DL>
1201 <P>Perform the following steps to enable AFS login.
1202 <OL TYPE=1>
1203 <P><LI>Mount the AFS CD-ROM for Solaris on the <B>/cdrom</B> directory, if it
1204 is not already. Then change directory as indicated. 
1205 <PRE>  
1206    # <B>cd /usr/lib/security</B>
1207    
1208 </PRE>
1209 <P><LI>Copy the AFS authentication library file to the
1210 <B>/usr/lib/security</B> directory. Then create a symbolic link to
1211 it whose name does not mention the version. Omitting the version
1212 eliminates the need to edit the PAM configuration file if you later update the
1213 library file. 
1214 <P>If you use the AFS Authentication Server (<B>kaserver</B>
1215 process): 
1216 <PRE>  
1217    #<B> cp /cdrom/sun4x_56/lib/pam_afs.so.1 .</B>
1218   
1219    # <B>ln -s pam_afs.so.1 pam_afs.so</B>   
1220 </PRE> 
1221 <P>If you use a Kerberos implementation of AFS authentication:
1222 <PRE>     
1223    # <B>cp /cdrom/sun4x_56/lib/pam_afs.krb.so.1 .</B>
1224   
1225    # <B>ln -s pam_afs.krb.so.1 pam_afs.so</B>
1226    
1227 </PRE>
1228 <P><LI>Edit the <TT>Authentication management</TT> section of the Solaris PAM
1229 configuration file, <B>/etc/pam.conf</B> by convention. The
1230 entries in this section have the value <TT>auth</TT> in their second
1231 field. 
1232 <P>First edit the standard entries, which refer to the Solaris PAM module
1233 (usually, the file <B>/usr/lib/security/pam_unix.so.1</B>)
1234 in their fourth field. For each service for which you want to use AFS
1235 authentication, edit the third field of its entry to read
1236 <TT>optional</TT>. The <B>pam.conf</B> file in the Solaris
1237 distribution usually includes standard entries for the <B>login</B>,
1238 <B>rlogin</B>, and <B>rsh</B> services, for instance. 
1239 <P>If there are services for which you want to use AFS authentication, but for
1240 which the <B>pam.conf</B> file does not already include a standard
1241 entry, you must create that entry and place the value <TT>optional</TT> in
1242 its third field. For instance, the Solaris <B>pam.conf</B>
1243 file does not usually include standard entries for the <B>ftp</B> or
1244 <B>telnet</B> services. 
1245 <P>Then create an AFS-related entry for each service, placing it immediately
1246 below the standard entry. The following example shows what the
1247 <TT>Authentication Management</TT> section looks like after you have you
1248 edited or created entries for the services mentioned previously. Note
1249 that the example AFS entries appear on two lines only for legibility.
1250 <PRE>  
1251    login   auth  optional  /usr/lib/security/pam_unix.so.1
1252    login   auth  optional  /usr/lib/security/pam_afs.so       \
1253          try_first_pass  ignore_root  setenv_password_expires
1254    rlogin  auth  optional  /usr/lib/security/pam_unix.so.1
1255    rlogin  auth  optional  /usr/lib/security/pam_afs.so       \
1256          try_first_pass  ignore_root  setenv_password_expires
1257    rsh     auth  optional  /usr/lib/security/pam_unix.so.1
1258    rsh     auth  optional  /usr/lib/security/pam_afs.so       \
1259          try_first_pass  ignore_root            
1260    ftp     auth  optional  /usr/lib/security/pam_unix.so.1
1261    ftp     auth  optional  /usr/lib/security/pam_afs.so       \
1262          try_first_pass  ignore_root
1263    telnet  auth  optional  /usr/lib/security/pam_unix.so.1
1264    telnet  auth  optional  /usr/lib/security/pam_afs.so       \
1265          try_first_pass  ignore_root  setenv_password_expires
1266    
1267 </PRE>
1268 <P><LI>If you use the Common Desktop Environment (CDE) on the machine and want
1269 users to obtain an AFS token as they log in, also add or edit the following
1270 four entries in the <TT>Authentication management</TT> section. Note
1271 that the AFS-related entries appear on two lines here only for
1272 legibility. 
1273 <PRE>   
1274    dtlogin   auth  optional  /usr/lib/security/pam_unix.so.1
1275    dtlogin   auth  optional  /usr/lib/security/pam_afs.so     \
1276          try_first_pass  ignore_root
1277    dtsession  auth  optional /usr/lib/security/pam_unix.so.1
1278    dtsession  auth  optional /usr/lib/security/pam_afs.so     \
1279          try_first_pass  ignore_root
1280    
1281 </PRE>
1282 <P><LI>Some Solaris distributions include a script that locates and removes
1283 unneeded files from various file systems. Its conventional location is
1284 <B>/usr/lib/fs/nfs/nfsfind</B>. The script generally uses an
1285 argument to the <B>find</B> command to define which file systems to
1286 search. In this step you modify the command to exclude the
1287 <B>/afs</B> directory. Otherwise, the command traverses the AFS
1288 filespace of every cell that is accessible from the machine, which can take
1289 many hours. The following alterations are possibilities, but you must
1290 verify that they are appropriate for your cell. 
1291 <P>The first possible alteration is to add the <B>-local</B> flag to the
1292 existing command, so that it looks like the following:
1293 <PRE>  
1294    find $dir -local -name .nfs\* -mtime +7 -mount -exec rm -f {} \;   
1295 </PRE> 
1296 <P>Another alternative is to exclude any directories whose names begin with
1297 the lowercase letter <B>a</B> or a non-alphabetic character.
1298 <PRE>  
1299    find /[A-Zb-z]*  <VAR>remainder of existing command</VAR>   
1300 </PRE> 
1301 <P>Do not use the following command, which still searches under the
1302 <B>/afs</B> directory, looking for a subdirectory of type
1303 <B>4.2</B>. 
1304 <PRE>  
1305    find / -fstype 4.2     /* <VAR>do not use</VAR> */
1306    
1307 </PRE>
1308 <P><LI>Proceed to <A HREF="#HDRWQ145">Loading and Creating Client Files</A>.
1309 </OL>
1310 <A NAME="IDX2998"></A>
1311 <A NAME="IDX2999"></A>
1312 <A NAME="IDX3000"></A>
1313 <A NAME="IDX3001"></A>
1314 <A NAME="IDX3002"></A>
1315 <A NAME="IDX3003"></A>
1316 <A NAME="IDX3004"></A>
1317 <A NAME="IDX3005"></A>
1318 <A NAME="IDX3006"></A>
1319 <A NAME="IDX3007"></A>
1320 <A NAME="IDX3008"></A>
1321 <A NAME="IDX3009"></A>
1322 <HR><H2><A NAME="HDRWQ145" HREF="auqbg002.htm#ToC_138">Loading and Creating Client Files</A></H2>
1323 <P>Now copy files from the AFS CD-ROM to the
1324 <B>/usr/vice/etc</B> directory. On some platforms that use a
1325 dynamic loader program to incorporate AFS modifications into the kernel, you
1326 have already copied over some the files. Copying them again does no
1327 harm.
1328 <P>Every AFS client machine has a copy of the
1329 <B>/usr/vice/etc/ThisCell</B> file on its local disk to define the
1330 machine's cell membership for the AFS client programs that run on
1331 it. Among other functions, this file determines the following:
1332 <UL>
1333 <P><LI>The cell in which users authenticate when they log onto the machine,
1334 assuming it is using an AFS-modified login utility
1335 <P><LI>The cell in which users authenticate by default when they issue the
1336 <B>klog</B> command
1337 <P><LI>The cell membership of the AFS server processes that the AFS command
1338 interpreters on this machine contact by default
1339 </UL>
1340 <P>Similarly, the <B>/usr/vice/etc/CellServDB</B> file on a client
1341 machine's local disk lists the database server machines in each cell that
1342 the local Cache Manager can contact. If there is no entry in the file
1343 for a cell, or the list of database server machines is wrong, then users
1344 working on this machine cannot access the cell. The chapter in the
1345 <I>IBM AFS Administration Guide</I> about administering client machines
1346 explains how to maintain the file after creating it. A version of the
1347 client <B>CellServDB</B> file was created during the installation of your
1348 cell's first machine (in <A HREF="auqbg005.htm#HDRWQ66">Creating the Client CellServDB File</A>). It is probably also appropriate for use on this
1349 machine.
1350 <P>Remember that the Cache Manager consults the
1351 <B>/usr/vice/etc/CellServDB</B> file only at reboot, when it copies the
1352 information into the kernel. For the Cache Manager to perform properly,
1353 the <B>CellServDB</B> file must be accurate at all times. Refer to
1354 the chapter in the <I>IBM AFS Administration Guide</I> about administering
1355 client machines for instructions on updating this file, with or without
1356 rebooting.
1357 <OL TYPE=1>
1358 <P><LI>On the local <B>/cdrom</B> directory, mount the AFS CD-ROM for this
1359 machine's system type, if it is not already. For instructions on
1360 mounting CD-ROMs (either locally or remotely via NFS), consult the operating
1361 system documentation.
1362 <P><LI>Copy files to the local <B>/usr/vice/etc</B> directory.
1363 <P>This step places a copy of the AFS initialization script (and related
1364 files, if applicable) into the <B>/usr/vice/etc</B> directory. In
1365 the preceding instructions for incorporating AFS into the kernel, you copied
1366 the script directly to the operating system's conventional location for
1367 initialization files. When you incorporate AFS into the machine's
1368 startup sequence in a later step, you can choose to link the two files.
1369 <P>On some system types that use a dynamic kernel loader program, you
1370 previously copied AFS library files into a subdirectory of the
1371 <B>/usr/vice/etc</B> directory. On other system types, you copied
1372 the appropriate AFS library file directly to the directory where the operating
1373 system accesses it. The following commands do not copy or recopy the
1374 AFS library files into the <B>/usr/vice/etc</B> directory, because on some
1375 system types the library files consume a large amount of space. If you
1376 want to copy them, add the <B>-r</B> flag to the first <B>cp</B>
1377 command and skip the second <B>cp</B> command.
1378 <PRE>   
1379    # <B>cd /cdrom/</B><VAR>sysname</VAR><B>/root.client/usr/vice/etc</B>
1380    
1381    # <B>cp -p  *  /usr/vice/etc</B>
1382   
1383    # <B>cp -rp  C  /usr/vice/etc</B>
1384    
1385 </PRE>
1386 <P><LI>Create the <B>/usr/vice/etc/ThisCell</B> file. 
1387 <PRE>   
1388    # <B>echo "</B><VAR>cellname</VAR><B>" > /usr/vice/etc/ThisCell</B>
1389     
1390 </PRE>
1391 <P><LI>Create the <B>/usr/vice/etc/CellServDB</B> file. Use a network
1392 file transfer program such as <B>ftp</B> or NFS to copy it from one of the
1393 following sources, which are listed in decreasing order of preference:
1394 <UL>
1395 <P><LI>Your cell's central <B>CellServDB</B> source file (the
1396 conventional location is
1397 <B>/afs/</B><VAR>cellname</VAR><B>/common/etc/CellServDB</B>)
1398 <P><LI>The global <B>CellServDB</B> file maintained by the AFS Product
1399 Support group
1400 <P><LI>An existing client machine in your cell
1401 <P><LI>The <B>CellServDB.sample</B> file included in the
1402 <VAR>sysname</VAR><B>/root.client/usr/vice/etc</B> directory of each
1403 AFS CD-ROM; add an entry for the local cell by following the instructions
1404 in <A HREF="auqbg005.htm#HDRWQ66">Creating the Client CellServDB File</A>
1405 </UL>
1406 </OL>
1407 <A NAME="IDX3010"></A>
1408 <A NAME="IDX3011"></A>
1409 <A NAME="IDX3012"></A>
1410 <A NAME="IDX3013"></A>
1411 <A NAME="IDX3014"></A>
1412 <A NAME="IDX3015"></A>
1413 <A NAME="IDX3016"></A>
1414 <A NAME="IDX3017"></A>
1415 <A NAME="IDX3018"></A>
1416 <A NAME="IDX3019"></A>
1417 <A NAME="IDX3020"></A>
1418 <A NAME="IDX3021"></A>
1419 <A NAME="IDX3022"></A>
1420 <A NAME="IDX3023"></A>
1421 <A NAME="IDX3024"></A>
1422 <A NAME="IDX3025"></A>
1423 <HR><H2><A NAME="HDRWQ146" HREF="auqbg002.htm#ToC_139">Configuring the Cache</A></H2>
1424 <P>The Cache Manager uses a cache on the local disk or in
1425 machine memory to store local copies of files fetched from file server
1426 machines. As the <B>afsd</B> program initializes the Cache Manager,
1427 it sets basic cache configuration parameters according to definitions in the
1428 local <B>/usr/vice/etc/cacheinfo</B> file. The file has three
1429 fields:
1430 <OL TYPE=1>
1431 <P><LI>The first field names the local directory on which to mount the AFS
1432 filespace. The conventional location is the <B>/afs</B>
1433 directory.
1434 <P><LI>The second field defines the local disk directory to use for the disk
1435 cache. The conventional location is the <B>/usr/vice/cache</B>
1436 directory, but you can specify an alternate directory if another partition has
1437 more space available. There must always be a value in this field, but
1438 the Cache Manager ignores it if the machine uses a memory cache.
1439 <P><LI>The third field specifies the number of kilobyte (1024 byte) blocks to
1440 allocate for the cache.
1441 </OL>
1442 <P>The values you define must meet the following requirements.
1443 <UL>
1444 <P><LI>On a machine using a disk cache, the Cache Manager expects always to be
1445 able to use the amount of space specified in the third field. Failure
1446 to meet this requirement can cause serious problems, some of which can be
1447 repaired only by rebooting. You must prevent non-AFS processes from
1448 filling up the cache partition. The simplest way is to devote a
1449 partition to the cache exclusively.
1450 <P><LI>The amount of space available in memory or on the partition housing the
1451 disk cache directory imposes an absolute limit on cache size.
1452 <P><LI>The maximum supported cache size can vary in each AFS release; see
1453 the <I>IBM AFS Release Notes</I> for the current version.
1454 <P><LI>For a disk cache, you cannot specify a value in the third field that
1455 exceeds 95% of the space available on the partition mounted at the directory
1456 named in the second field. If you violate this restriction, the
1457 <B>afsd</B> program exits without starting the Cache Manager and prints an
1458 appropriate message on the standard output stream. A value of 90% is
1459 more appropriate on most machines. Some operating systems (such as AIX)
1460 do not automatically reserve some space to prevent the partition from filling
1461 completely; for them, a smaller value (say, 80% to 85% of the space
1462 available) is more appropriate.
1463 <P><LI>For a memory cache, you must leave enough memory for other processes and
1464 applications to run. If you try to allocate more memory than is
1465 actually available, the <B>afsd</B> program exits without initializing the
1466 Cache Manager and produces the following message on the standard output
1467 stream. 
1468 <PRE>   
1469    afsd: memCache allocation failure at <VAR>number</VAR> KB
1470 </PRE> 
1471 <P>The <VAR>number</VAR> value is how many kilobytes were allocated just before
1472 the failure, and so indicates the approximate amount of memory
1473 available.
1474 </UL>
1475 <P>Within these hard limits, the factors that determine appropriate cache size
1476 include the number of users working on the machine, the size of the files with
1477 which they work, and (for a memory cache) the number of processes that run on
1478 the machine. The higher the demand from these factors, the larger the
1479 cache needs to be to maintain good performance.
1480 <P>Disk caches smaller than 10 MB do not generally perform well.
1481 Machines serving multiple users usually perform better with a cache of at
1482 least 60 to 70 MB. The point at which enlarging the cache further does
1483 not really improve performance depends on the factors mentioned previously and
1484 is difficult to predict.
1485 <P>Memory caches smaller than 1 MB are nonfunctional, and the performance of
1486 caches smaller than 5 MB is usually unsatisfactory. Suitable upper
1487 limits are similar to those for disk caches but are probably determined more
1488 by the demands on memory from other sources on the machine (number of users
1489 and processes). Machines running only a few processes possibly can use
1490 a smaller memory cache.
1491 <P><H3><A NAME="HDRWQ147" HREF="auqbg002.htm#ToC_140">Configuring a Disk Cache</A></H3>
1492 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">Not all file system types that an operating system supports
1493 are necessarily supported for use as the cache partition. For possible
1494 restrictions, see the <I>IBM AFS Release Notes</I>.
1495 </TD></TR></TABLE>
1496 <P>To configure the disk cache, perform the following procedures:
1497 <OL TYPE=1>
1498 <P><LI>Create the local directory to use for caching. The following
1499 instruction shows the conventional location,
1500 <B>/usr/vice/cache</B>. If you are devoting a partition exclusively
1501 to caching, as recommended, you must also configure it, make a file system on
1502 it, and mount it at the directory created in this step.
1503 <PRE>   
1504    # <B>mkdir /usr/vice/cache</B>
1505    
1506 </PRE>
1507 <P><LI>Create the <B>cacheinfo</B> file to define the configuration
1508 parameters discussed previously. The following instruction shows the
1509 standard mount location, <B>/afs</B>, and the standard cache location,
1510 <B>/usr/vice/cache</B>. 
1511 <PRE>   
1512    # <B>echo "/afs:/usr/vice/cache:</B><VAR>#blocks</VAR><B>" > /usr/vice/etc/cacheinfo</B>
1513 </PRE> 
1514 <P>The following example defines the disk cache size as 50,000 KB: 
1515 <PRE>   
1516    # <B>echo "/afs:/usr/vice/cache:50000" > /usr/vice/etc/cacheinfo</B>
1517 </PRE>
1518 </OL>
1519 <P><H3><A NAME="HDRWQ148" HREF="auqbg002.htm#ToC_141">Configuring a Memory Cache</A></H3>
1520 <P>To configure a memory cache, create the <B>cacheinfo</B>
1521 file to define the configuration parameters discussed previously. The
1522 following instruction shows the standard mount location, <B>/afs</B>, and
1523 the standard cache location, <B>/usr/vice/cache</B> (though the exact
1524 value of the latter is irrelevant for a memory cache).
1525 <PRE>   
1526    # <B>echo "/afs:/usr/vice/cache:</B><VAR>#blocks</VAR><B>" > /usr/vice/etc/cacheinfo</B>
1527 </PRE>
1528 <P>The following example allocates 25,000 KB of memory for the cache.
1529 <PRE>   
1530    # <B>echo "/afs:/usr/vice/cache:25000" > /usr/vice/etc/cacheinfo</B>
1531 </PRE>
1532 <A NAME="IDX3026"></A>
1533 <A NAME="IDX3027"></A>
1534 <A NAME="IDX3028"></A>
1535 <A NAME="IDX3029"></A>
1536 <A NAME="IDX3030"></A>
1537 <A NAME="IDX3031"></A>
1538 <A NAME="IDX3032"></A>
1539 <A NAME="IDX3033"></A>
1540 <A NAME="IDX3034"></A>
1541 <A NAME="IDX3035"></A>
1542 <A NAME="IDX3036"></A>
1543 <A NAME="IDX3037"></A>
1544 <A NAME="IDX3038"></A>
1545 <A NAME="IDX3039"></A>
1546 <A NAME="IDX3040"></A>
1547 <A NAME="IDX3041"></A>
1548 <A NAME="IDX3042"></A>
1549 <A NAME="IDX3043"></A>
1550 <A NAME="IDX3044"></A>
1551 <A NAME="IDX3045"></A>
1552 <A NAME="IDX3046"></A>
1553 <A NAME="IDX3047"></A>
1554 <A NAME="IDX3048"></A>
1555 <A NAME="IDX3049"></A>
1556 <A NAME="IDX3050"></A>
1557 <A NAME="IDX3051"></A>
1558 <A NAME="IDX3052"></A>
1559 <A NAME="IDX3053"></A>
1560 <HR><H2><A NAME="HDRWQ149" HREF="auqbg002.htm#ToC_142">Configuring the Cache Manager</A></H2>
1561 <P>By convention, the Cache Manager mounts the AFS filespace on
1562 the local <B>/afs</B> directory. In this section you create that
1563 directory.
1564 <P>The <B>afsd</B> program sets several cache configuration parameters as
1565 it initializes the Cache Manager, and starts daemons that improve
1566 performance. You can use the <B>afsd</B> command's arguments
1567 to override the parameters' default values and to change the number of
1568 some of the daemons. Depending on the machine's cache size, its
1569 amount of RAM, and how many people work on it, you can sometimes improve Cache
1570 Manager performance by overriding the default values. For a discussion
1571 of all of the <B>afsd</B> command's arguments, see its reference page
1572 in the <I>IBM AFS Administration Reference</I>.
1573 <P>The <B>afsd</B> command line in the AFS initialization script on each
1574 system type includes an <TT>OPTIONS</TT> variable. You can use it to
1575 set nondefault values for the command's arguments, in one of the
1576 following ways:
1577 <UL>
1578 <P><LI>You can create an <B>afsd</B> <I>options file</I> that sets values
1579 for arguments to the <B>afsd</B> command. If the file exists, its
1580 contents are automatically substituted for the <TT>OPTIONS</TT> variable in
1581 the AFS initialization script. The AFS distribution for some system
1582 types includes an options file; on other system types, you must create
1583 it. 
1584 <P>You use two variables in the AFS initialization script to specify the path
1585 to the options file: <TT>CONFIG</TT> and <TT>AFSDOPT</TT>. On
1586 system types that define a conventional directory for configuration files, the
1587 <TT>CONFIG</TT> variable indicates it by default; otherwise, the
1588 variable indicates an appropriate location. 
1589 <P>List the desired <B>afsd</B> options on a single line in the options
1590 file, separating each option with one or more spaces. The following
1591 example sets the <B>-stat</B> argument to 2500, the <B>-daemons</B>
1592 argument to 4, and the <B>-volumes</B> argument to 100.
1593 <PRE>   
1594    -stat 2500 -daemons 4 -volumes 100   
1595    
1596 </PRE>
1597 <P><LI>On a machine that uses a disk cache, you can set the <TT>OPTIONS</TT>
1598 variable in the AFS initialization script to one of <TT>$SMALL</TT>,
1599 <TT>$MEDIUM</TT>, or <TT>$LARGE</TT>. The AFS initialization script
1600 uses one of these settings if the <B>afsd</B> options file named by the
1601 <TT>AFSDOPT</TT> variable does not exist. In the script as
1602 distributed, the <TT>OPTIONS</TT> variable is set to the value
1603 <TT>$MEDIUM</TT>.
1604 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">Do not set the <TT>OPTIONS</TT> variable to <TT>$SMALL</TT>,
1605 <TT>$MEDIUM</TT>, or <TT>$LARGE</TT> on a machine that uses a memory
1606 cache. The arguments it sets are appropriate only on a machine that
1607 uses a disk cache.
1608 </TD></TR></TABLE>
1609 <P>The script (or on some system types the <B>afsd</B> options file named
1610 by the <TT>AFSDOPT</TT> variable) defines a value for each of
1611 <TT>SMALL</TT>, <TT>MEDIUM</TT>, and <TT>LARGE</TT> that sets
1612 <B>afsd</B> command arguments appropriately for client machines of
1613 different sizes:
1614 <UL>
1615 <P><LI><TT>SMALL</TT> is suitable for a small machine that serves one or two
1616 users and has approximately 8 MB of RAM and a 20-MB cache
1617 <P><LI><TT>MEDIUM</TT> is suitable for a medium-sized machine that serves two
1618 to six users and has 16 MB of RAM and a 40-MB cache
1619 <P><LI><TT>LARGE</TT> is suitable for a large machine that serves five to ten
1620 users and has 32 MB of RAM and a 100-MB cache
1621 </UL>
1622 <P><LI>You can choose not to create an <B>afsd</B> options file and to set
1623 the <TT>OPTIONS</TT> variable in the initialization script to a null value
1624 rather than to the default <TT>$MEDIUM</TT> value. You can then
1625 either set arguments directly on the <B>afsd</B> command line in the
1626 script, or set no arguments (and so accept default values for all Cache
1627 Manager parameters).
1628 </UL>
1629 <OL TYPE=1>
1630 <P><LI>Create the local directory on which to mount the AFS filespace, by
1631 convention <B>/afs</B>. If the directory already exists, verify
1632 that it is empty. 
1633 <PRE>   
1634    # <B>mkdir /afs</B>
1635    
1636 </PRE>
1637 <P><LI>On AIX systems, add the following line to the <B>/etc/vfs</B>
1638 file. It enables AIX to unmount AFS correctly during shutdown.
1639 <PRE>   
1640    afs     4     none     none
1641    
1642 </PRE>
1643 <P><LI>On Linux systems, copy the <B>afsd</B> options file from the
1644 <B>/usr/vice/etc</B> directory to the <B>/etc/sysconfig</B> directory,
1645 removing the <B>.conf</B> extension as you do so.
1646 <PRE>   
1647    # <B>cp /usr/vice/etc/afs.conf /etc/sysconfig/afs</B>
1648    
1649 </PRE>
1650 <P><LI>Edit the machine's AFS initialization script or <B>afsd</B>
1651 options file to set appropriate values for <B>afsd</B> command
1652 parameters. The appropriate file for each system type is as
1653 follows:
1654 <UL>
1655 <P><LI>On AIX systems, <B>/etc/rc.afs</B>
1656 <P><LI>On Digital UNIX systems, <B>/sbin/init.d/afs</B>
1657 <P><LI>On HP-UX systems, <B>/sbin/init.d/afs</B>
1658 <P><LI>On IRIX systems, <B>/etc/init.d/afs</B>
1659 <P><LI>On Linux systems, <B>/etc/sysconfig/afs</B> (the <B>afsd</B>
1660 options file)
1661 <P><LI>On Solaris systems, <B>/etc/init.d/afs</B>
1662 </UL> 
1663 <P>Use one of the methods described in the introduction to this section to add
1664 the following flags to the <B>afsd</B> command line. Also set any
1665 performance-related arguments you wish.
1666 <UL>
1667 <P><LI>Add the <B>-memcache</B> flag if the machine is to use a memory
1668 cache.
1669 <P><LI>Add the <B>-verbose</B> flag to display a trace of the Cache
1670 Manager's initialization on the standard output stream.
1671 </UL>
1672 </OL>
1673 <A NAME="IDX3054"></A>
1674 <A NAME="IDX3055"></A>
1675 <A NAME="IDX3056"></A>
1676 <A NAME="IDX3057"></A>
1677 <A NAME="IDX3058"></A>
1678 <HR><H2><A NAME="HDRWQ150" HREF="auqbg002.htm#ToC_143">Starting the Cache Manager and Installing the AFS Initialization Script</A></H2>
1679 <P>In this section you run the AFS initialization script to
1680 start the Cache Manager. If the script works correctly, perform the
1681 steps that incorporate it into the machine's startup and shutdown
1682 sequence. If there are problems during the initialization, attempt to
1683 resolve them. The AFS Product Support group can provide assistance if
1684 necessary.
1685 <P>On machines that use a disk cache, it can take a while for the
1686 <B>afsd</B> program to run the first time on a machine, because it must
1687 create all of the <B>V</B><VAR>n</VAR> files in the cache directory.
1688 Subsequent Cache Manager initializations do not take nearly as long, because
1689 the <B>V</B><VAR>n</VAR> files already exist.
1690 <P>On system types that use a dynamic loader program, you must reboot the
1691 machine before running the initialization script, so that it can freshly load
1692 AFS modifications into the kernel.
1693 <P>Proceed to the instructions for your system type:
1694 <UL>
1695 <P><LI><A HREF="#HDRWQ151">Running the Script on AIX Systems</A>
1696 <P><LI><A HREF="#HDRWQ152">Running the Script on Digital UNIX Systems</A>
1697 <P><LI><A HREF="#HDRWQ153">Running the Script on HP-UX Systems</A>
1698 <P><LI><A HREF="#HDRWQ154">Running the Script on IRIX Systems</A>
1699 <P><LI><A HREF="#HDRWQ155">Running the Script on Linux Systems</A>
1700 <P><LI><A HREF="#HDRWQ156">Running the Script on Solaris Systems</A>
1701 </UL>
1702 <A NAME="IDX3059"></A>
1703 <A NAME="IDX3060"></A>
1704 <A NAME="IDX3061"></A>
1705 <A NAME="IDX3062"></A>
1706 <P><H3><A NAME="HDRWQ151" HREF="auqbg002.htm#ToC_144">Running the Script on AIX Systems</A></H3>
1707 <OL TYPE=1>
1708 <P><LI>Reboot the machine and log in again as the local superuser
1709 <B>root</B>. 
1710 <PRE>   
1711    # <B>cd /</B>
1712    
1713    # <B>shutdown -r now</B>
1714    
1715    login: <B>root</B>
1716    Password: <VAR>root_password</VAR>
1717    
1718 </PRE>
1719 <P><LI>Run the AFS initialization script. 
1720 <PRE>   
1721    # <B>/etc/rc.afs</B>
1722    
1723 </PRE>
1724 <P><LI>Edit the AIX initialization file, <B>/etc/inittab</B>, adding the
1725 following line to invoke the AFS initialization script. Place it just
1726 after the line that starts NFS daemons.
1727 <PRE>   
1728    rcafs:2:wait:/etc/rc.afs > /dev/console 2>&amp;1 # Start AFS services
1729    
1730 </PRE>
1731 <P><LI><B>(Optional)</B> There are now copies of the AFS initialization file
1732 in both the <B>/usr/vice/etc</B> and <B>/etc</B> directories.
1733 If you want to avoid potential confusion by guaranteeing that they are always
1734 the same, create a link between them. You can always retrieve the
1735 original script from the AFS CD-ROM if necessary.
1736 <PRE>   
1737    # <B>cd  /usr/vice/etc</B>
1738    
1739    # <B>rm  rc.afs</B>
1740   
1741    # <B>ln -s  /etc/rc.afs</B>
1742    
1743 </PRE>
1744 <P><LI>If a volume for housing AFS binaries for this machine's system type
1745 does not already exist, proceed to <A HREF="#HDRWQ157">Setting Up Volumes and Loading Binaries into AFS</A>. Otherwise, the installation is complete.
1746 </OL>
1747 <A NAME="IDX3063"></A>
1748 <A NAME="IDX3064"></A>
1749 <A NAME="IDX3065"></A>
1750 <A NAME="IDX3066"></A>
1751 <P><H3><A NAME="HDRWQ152" HREF="auqbg002.htm#ToC_145">Running the Script on Digital UNIX Systems</A></H3>
1752 <OL TYPE=1>
1753 <P><LI>Run the AFS initialization script. 
1754 <PRE>   
1755    # <B>/sbin/init.d/afs  start</B>
1756    
1757 </PRE>
1758 <P><LI>Change to the <B>/sbin/init.d</B> directory and issue the
1759 <B>ln -s</B> command to create symbolic links that incorporate the AFS
1760 initialization script into the Digital UNIX startup and shutdown
1761 sequence.
1762 <PRE>   
1763    # <B>cd  /sbin/init.d</B>
1764    
1765    # <B>ln -s  ../init.d/afs  /sbin/rc3.d/S67afs</B>
1766    
1767    # <B>ln -s  ../init.d/afs  /sbin/rc0.d/K66afs</B>
1768    
1769 </PRE>
1770 <P><LI><B>(Optional)</B> There are now copies of the AFS initialization file
1771 in both the <B>/usr/vice/etc</B> and <B>/sbin/init.d</B>
1772 directories. If you want to avoid potential confusion by guaranteeing
1773 that they are always the same, create a link between them. You can
1774 always retrieve the original script from the AFS CD-ROM if necessary.
1775 <PRE>   
1776    # <B>cd /usr/vice/etc</B>
1777    
1778    # <B>rm afs.rc</B>
1779   
1780    # <B>ln -s  /sbin/init.d/afs  afs.rc</B>
1781    
1782 </PRE>
1783 <P><LI>If a volume for housing AFS binaries for this machine's system type
1784 does not already exist, proceed to <A HREF="#HDRWQ157">Setting Up Volumes and Loading Binaries into AFS</A>. Otherwise, the installation is complete.
1785 </OL>
1786 <A NAME="IDX3067"></A>
1787 <A NAME="IDX3068"></A>
1788 <A NAME="IDX3069"></A>
1789 <P><H3><A NAME="HDRWQ153" HREF="auqbg002.htm#ToC_146">Running the Script on HP-UX Systems</A></H3>
1790 <OL TYPE=1>
1791 <P><LI>Run the AFS initialization script. 
1792 <PRE>   
1793    # <B>/sbin/init.d/afs  start</B>
1794    
1795 </PRE>
1796 <P><LI>Change to the <B>/sbin/init.d</B> directory and issue the
1797 <B>ln -s</B> command to create symbolic links that incorporate the AFS
1798 initialization script into the HP-UX startup and shutdown sequence.
1799 <PRE>   
1800    # <B>cd /sbin/init.d</B>
1801    
1802    # <B>ln -s ../init.d/afs /sbin/rc2.d/S460afs</B>
1803   
1804    # <B>ln -s ../init.d/afs /sbin/rc2.d/K800afs</B>
1805    
1806 </PRE>
1807 <P><LI><B>(Optional)</B> There are now copies of the AFS initialization file
1808 in both the <B>/usr/vice/etc</B> and <B>/sbin/init.d</B>
1809 directories. If you want to avoid potential confusion by guaranteeing
1810 that they are always the same, create a link between them. You can
1811 always retrieve the original script from the AFS CD-ROM if necessary.
1812 <PRE>   
1813    # <B>cd /usr/vice/etc</B>
1814    
1815    # <B>rm afs.rc</B>
1816   
1817    # <B>ln -s  /sbin/init.d/afs  afs.rc</B>
1818    
1819 </PRE>
1820 <P><LI>If a volume for housing AFS binaries for this machine's system type
1821 does not already exist, proceed to <A HREF="#HDRWQ157">Setting Up Volumes and Loading Binaries into AFS</A>. Otherwise, the installation is complete.
1822 </OL>
1823 <A NAME="IDX3070"></A>
1824 <A NAME="IDX3071"></A>
1825 <A NAME="IDX3072"></A>
1826 <A NAME="IDX3073"></A>
1827 <A NAME="IDX3074"></A>
1828 <A NAME="IDX3075"></A>
1829 <A NAME="IDX3076"></A>
1830 <P><H3><A NAME="HDRWQ154" HREF="auqbg002.htm#ToC_147">Running the Script on IRIX Systems</A></H3>
1831 <OL TYPE=1>
1832 <P><LI>If you have configured the machine to use the <B>ml</B> dynamic loader
1833 program, reboot the machine and log in again as the local superuser
1834 <B>root</B>. 
1835 <PRE>   
1836    # <B>cd /</B>
1837          
1838    # <B>shutdown -i6 -g0 -y</B>
1839    
1840    login: <B>root</B>
1841    Password: <VAR>root_password</VAR>
1842    
1843 </PRE>
1844 <P><LI>Issue the <B>chkconfig</B> command to activate the
1845 <B>afsclient</B> configuration variable.
1846 <PRE>  
1847    # <B>/etc/chkconfig -f afsclient on</B> 
1848    
1849 </PRE>
1850 <P><LI>Run the AFS initialization script. 
1851 <PRE>   
1852    # <B>/etc/init.d/afs  start</B>
1853    
1854 </PRE>
1855 <P><LI>Change to the <B>/etc/init.d</B> directory and issue the
1856 <B>ln -s</B> command to create symbolic links that incorporate the AFS
1857 initialization script into the IRIX startup and shutdown sequence.
1858 <PRE>   
1859    # <B>cd /etc/init.d</B>
1860    
1861    # <B>ln -s ../init.d/afs /etc/rc2.d/S35afs</B>
1862   
1863    # <B>ln -s ../init.d/afs /etc/rc0.d/K35afs</B>
1864    
1865 </PRE>
1866 <P><LI><B>(Optional)</B> There are now copies of the AFS initialization file
1867 in both the <B>/usr/vice/etc</B> and <B>/etc/init.d</B>
1868 directories. If you want to avoid potential confusion by guaranteeing
1869 that they are always the same, create a link between them. You can
1870 always retrieve the original script from the AFS CD-ROM if necessary.
1871 <PRE>   
1872    # <B>cd /usr/vice/etc</B>
1873    
1874    # <B>rm afs.rc</B>
1875   
1876    # <B>ln -s  /etc/init.d/afs  afs.rc</B>
1877    
1878 </PRE>
1879 <P><LI>If a volume for housing AFS binaries for this machine's system type
1880 does not already exist, proceed to <A HREF="#HDRWQ157">Setting Up Volumes and Loading Binaries into AFS</A>. Otherwise, the installation is complete.
1881 </OL>
1882 <A NAME="IDX3077"></A>
1883 <A NAME="IDX3078"></A>
1884 <A NAME="IDX3079"></A>
1885 <A NAME="IDX3080"></A>
1886 <P><H3><A NAME="HDRWQ155" HREF="auqbg002.htm#ToC_148">Running the Script on Linux Systems</A></H3>
1887 <OL TYPE=1>
1888 <P><LI>Reboot the machine and log in again as the local superuser
1889 <B>root</B>. 
1890 <PRE>  
1891    # <B>cd /</B>
1892          
1893    # <B>shutdown -r now</B>
1894    
1895    login: <B>root</B>
1896    Password: <VAR>root_password</VAR>
1897    
1898 </PRE>
1899 <P><LI>Run the AFS initialization script. 
1900 <PRE>   
1901    # <B>/etc/rc.d/init.d/afs  start</B>
1902    
1903 </PRE>
1904 <P><LI>Issue the <B>chkconfig</B> command to activate the <B>afs</B>
1905 configuration variable. Based on the instruction in the AFS
1906 initialization file that begins with the string <TT>#chkconfig</TT>, the
1907 command automatically creates the symbolic links that incorporate the script
1908 into the Linux startup and shutdown sequence. 
1909 <PRE>   
1910    # <B>/sbin/chkconfig  --add afs</B>
1911    
1912 </PRE>
1913 <P><LI><B>(Optional)</B> There are now copies of the AFS initialization file
1914 in both the <B>/usr/vice/etc</B> and
1915 <B>/etc/rc.d/init.d</B> directories, and copies of the
1916 <B>afsd</B> options file in both the <B>/usr/vice/etc</B> and
1917 <B>/etc/sysconfig</B> directories. If you want to avoid potential
1918 confusion by guaranteeing that the two copies of each file are always the
1919 same, create a link between them. You can always retrieve the original
1920 script or options file from the AFS CD-ROM if necessary.
1921 <PRE>   
1922    # <B>cd /usr/vice/etc</B>
1923    
1924    # <B>rm afs.rc afs.conf</B>
1925     
1926    # <B>ln -s  /etc/rc.d/init.d/afs  afs.rc</B>
1927    
1928    # <B>ln -s  /etc/sysconfig/afs  afs.conf</B>
1929    
1930 </PRE>
1931 <P><LI>If a volume for housing AFS binaries for this machine's system type
1932 does not already exist, proceed to <A HREF="#HDRWQ157">Setting Up Volumes and Loading Binaries into AFS</A>. Otherwise, the installation is complete.
1933 </OL>
1934 <A NAME="IDX3081"></A>
1935 <A NAME="IDX3082"></A>
1936 <A NAME="IDX3083"></A>
1937 <P><H3><A NAME="HDRWQ156" HREF="auqbg002.htm#ToC_149">Running the Script on Solaris Systems</A></H3>
1938 <OL TYPE=1>
1939 <P><LI>Reboot the machine and log in again as the local superuser
1940 <B>root</B>. 
1941 <PRE>   
1942    # <B>cd /</B>
1943       
1944    # <B>shutdown -i6 -g0 -y</B>
1945    
1946    login: <B>root</B>
1947    Password: <VAR>root_password</VAR>
1948    
1949 </PRE>
1950 <P><LI>Run the AFS initialization script. 
1951 <PRE>   
1952    # <B>/etc/init.d/afs  start</B>
1953    
1954 </PRE>
1955 <P><LI>Change to the <B>/etc/init.d</B> directory and issue the
1956 <B>ln -s</B> command to create symbolic links that incorporate the AFS
1957 initialization script into the Solaris startup and shutdown sequence.
1958 <PRE>   
1959    # <B>cd /etc/init.d</B>
1960   
1961    # <B>ln -s ../init.d/afs /etc/rc3.d/S99afs</B>
1962   
1963    # <B>ln -s ../init.d/afs /etc/rc0.d/K66afs</B>
1964    
1965 </PRE>
1966 <P><LI><B>(Optional)</B> There are now copies of the AFS initialization file
1967 in both the <B>/usr/vice/etc</B> and <B>/etc/init.d</B>
1968 directories. If you want to avoid potential confusion by guaranteeing
1969 that they are always the same, create a link between them. You can
1970 always retrieve the original script from the AFS CD-ROM if necessary.
1971 <PRE>   
1972    # <B>cd /usr/vice/etc</B>
1973    
1974    # <B>rm afs.rc</B>
1975   
1976    # <B>ln -s  /etc/init.d/afs  afs.rc</B>
1977    
1978 </PRE>
1979 <P><LI>If a volume for housing AFS binaries for this machine's system type
1980 does not already exist, proceed to <A HREF="#HDRWQ157">Setting Up Volumes and Loading Binaries into AFS</A>. Otherwise, the installation is complete.
1981 </OL>
1982 <A NAME="IDX3084"></A>
1983 <A NAME="IDX3085"></A>
1984 <A NAME="IDX3086"></A>
1985 <A NAME="IDX3087"></A>
1986 <A NAME="IDX3088"></A>
1987 <A NAME="IDX3089"></A>
1988 <HR><H2><A NAME="HDRWQ157" HREF="auqbg002.htm#ToC_150">Setting Up Volumes and Loading Binaries into AFS</A></H2>
1989 <P>In this section, you link <B>/usr/afsws</B> on the local
1990 disk to the directory in AFS that houses AFS binaries for this system
1991 type. The conventional name for the AFS directory is
1992 <B>/afs/</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws</B>.
1993 <P>If this machine is an existing system type, the AFS directory presumably
1994 already exists. You can simply create a link from the local
1995 <B>/usr/afsws</B> directory to it. Follow the instructions in <A HREF="#HDRWQ158">Linking /usr/afsws on an Existing System Type</A>.
1996 <P>If this machine is a new system type (there are no AFS machines of this
1997 type in your cell), you must first create and mount volumes to store its AFS
1998 binaries, and then create the link from <B>/usr/afsws</B> to the new
1999 directory. See <A HREF="#HDRWQ159">Creating Binary Volumes for a New System Type</A>.
2000 <P>You can also store UNIX system binaries (the files normally stored in local
2001 disk directories such as <B>/bin</B>, <B>/etc</B>, and
2002 <B>/lib</B>) in volumes mounted under
2003 <B>/afs/</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR>. See <A HREF="auqbg005.htm#HDRWQ88">Storing System Binaries in AFS</A> .
2004 <P><H3><A NAME="HDRWQ158" HREF="auqbg002.htm#ToC_151">Linking /usr/afsws on an Existing System Type</A></H3>
2005 <P>If this client machine is an existing system type, there is
2006 already a volume mounted in the AFS filespace that houses AFS client binaries
2007 for it.
2008 <OL TYPE=1>
2009 <P><LI>Create <B>/usr/afsws</B> on the local disk as a symbolic link to the
2010 directory <B>/afs/</B><VAR>cellname</VAR><B>/@sys/usr/afsws</B>.
2011 You can specify the actual system name instead of <B>@sys</B> if you wish,
2012 but the advantage of using <B>@sys</B> is that it remains valid if you
2013 upgrade this machine to a different system type. 
2014 <PRE>   
2015    # <B>ln -s /afs/</B><VAR>cellname</VAR><B>/@sys/usr/afsws  /usr/afsws</B>
2016    
2017 </PRE>
2018 <P><LI><B>(Optional)</B> If you believe it is helpful to your users to access
2019 the AFS documents in a certain format via a local disk directory, create
2020 <B>/usr/afsdoc</B> on the local disk as a symbolic link to the
2021 documentation directory in AFS
2022 (<B>/afs/</B><VAR>cellname</VAR><B>/afsdoc/</B><VAR>format_name</VAR>).
2023 <P>
2024 <PRE>   
2025    # <B>ln -s /afs/</B><VAR>cellname</VAR><B>/afsdoc/</B><VAR>format_name</VAR> <B>/usr/afsdoc</B>
2026 </PRE> 
2027 <P>An alternative is to create a link in each user's home directory to
2028 the <B>/afs/</B><VAR>cellname</VAR><B>/afsdoc/</B><VAR>format_name</VAR>
2029 directory.
2030 </OL>
2031 <P><H3><A NAME="HDRWQ159" HREF="auqbg002.htm#ToC_152">Creating Binary Volumes for a New System Type</A></H3>
2032 <P>If this client machine is a new system type, you must create
2033 and mount volumes for its binaries before you can link the local
2034 <B>/usr/afsws</B> directory to an AFS directory.
2035 <P>To create and mount the volumes, you use the <B>klog</B> command to
2036 authenticate as an administrator and then issue commands from the
2037 <B>vos</B> and <B>fs</B> command suites. However, the command
2038 binaries are not yet available on this machine (by convention, they are
2039 accessible via the <B>/usr/afsws</B> link that you are about to
2040 create). You have two choices:
2041 <UL>
2042 <P><LI>Perform all steps except the last one (Step <A HREF="#LIWQ162">10</A>) on an existing AFS machine. On a file server
2043 machine, the <B>klog</B>, <B>fs</B> and <B>vos</B> binaries reside
2044 in the <B>/usr/afs/bin</B> directory. On client machines, the
2045 <B>klog</B> and <B>fs</B> binaries reside in the
2046 <B>/usr/afsws/bin</B> directory and the <B>vos</B> binary in the
2047 <B>/usr/afsws/etc</B> directory. Depending on how your PATH
2048 environment variable is set, you possibly need to precede the command names
2049 with a pathname.
2050 <P>If you work on another AFS machine, be sure to substitute the new system
2051 type name for the <VAR>sysname</VAR> argument in the following commands, not the
2052 system type of the machine on which you are issuing the commands.
2053 <P><LI>Copy the necessary command binaries to a temporary location on the local
2054 disk, which enables you to perform the steps on the local machine. The
2055 following procedure installs them in the <B>/tmp</B> directory and removes
2056 them at the end. Depending on how your PATH environment variable is
2057 set, you possibly need to precede the command names with a pathname.
2058 </UL>
2059 <P>Perform the following steps to create a volume for housing AFS
2060 binaries.
2061 <OL TYPE=1>
2062 <P><LI>Working either on the local machine or another AFS machine, mount the AFS
2063 CD-ROM for the new system type on the <B>/cdrom</B> directory, if it is
2064 not already. For instructions on mounting CD-ROMs (either locally or
2065 remotely via NFS), consult the operating system documentation.
2066 <P><LI>If working on the local machine, copy the necessary binaries to a
2067 temporary location on the local disk. Substitute a different directory
2068 name for <B>/tmp</B> if you wish.
2069 <PRE>   
2070    # <B>cd  /cdrom/</B><VAR>new_sysname</VAR><B>/root.server/usr/afs/bin</B>
2071    
2072    # <B>cp -p  klog  /tmp</B>
2073  
2074    # <B>cp -p  fs  /tmp</B>
2075  
2076    # <B>cp -p  vos  /tmp</B>
2077      
2078 </PRE>
2079 <P><LI>Authenticate as the user <B>admin</B>. 
2080 <PRE>   
2081    # <B>klog admin</B>
2082    Password: <VAR>admin_password</VAR>
2083     
2084 </PRE>
2085 <P><LI><A NAME="LIWQ160"></A>Issue the <B>vos create</B> command to create volumes for
2086 storing the AFS client binaries for this system type. The following
2087 example instruction creates volumes called <VAR>sysname</VAR>,
2088 <VAR>sysname</VAR>.<B>usr</B>, and
2089 <VAR>sysname</VAR>.<B>usr.afsws</B>. Refer to the
2090 <I>IBM AFS Release Notes</I> to learn the proper value of <VAR>sysname</VAR>
2091 for this system type. 
2092 <PRE>    
2093    # <B>vos create</B> &lt;<VAR>machine&nbsp;name</VAR>> &lt;<VAR>partition&nbsp;name</VAR>> <VAR>sysname</VAR>
2094      
2095    # <B>vos create</B> &lt;<VAR>machine&nbsp;name</VAR>> &lt;<VAR>partition&nbsp;name</VAR>> <VAR>sysname</VAR><B>.usr</B>
2096      
2097    # <B>vos create</B> &lt;<VAR>machine&nbsp;name</VAR>> &lt;<VAR>partition&nbsp;name</VAR>> <VAR>sysname</VAR><B>.usr.afsws</B>
2098     
2099 </PRE>
2100 <P><LI>Issue the <B>fs mkmount</B> command to mount the newly created
2101 volumes. Because the <B>root.cell</B> volume is replicated,
2102 you must precede the <I>cellname</I> part of the pathname with a period to
2103 specify the read/write mount point, as shown. Then issue the <B>vos
2104 release</B> command to release a new replica of the
2105 <B>root.cell</B> volume, and the <B>fs checkvolumes</B> command
2106 to force the local Cache Manager to access them. 
2107 <PRE>   
2108    # <B>fs mkmount -dir /afs/.</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR> <B>-vol</B> <VAR>sysname</VAR>
2109    
2110    # <B>fs mkmount -dir /afs/.</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr</B>  <B>-vol</B> <VAR>sysname</VAR><B>.usr</B>
2111    
2112    # <B>fs mkmount -dir /afs/.</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws</B> <B>-vol</B> <VAR>sysname</VAR><B>.usr.afsws</B>
2113    
2114    # <B>vos release root.cell</B>
2115    
2116    # <B>fs checkvolumes</B>
2117    
2118 </PRE>
2119 <P><LI>Issue the <B>fs setacl</B> command to grant the <B>l</B>
2120 (<B>lookup</B>) and <B>r</B> (<B>read</B>) permissions to the
2121 <B>system:anyuser</B> group on each new directory's ACL.
2122 <PRE>   
2123    # <B>cd /afs/.</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR>
2124    
2125    # <B>fs setacl  -dir  .  usr  usr/afsws  -acl  system:anyuser rl</B> 
2126    
2127 </PRE>
2128 <P><LI>Issue the <B>fs setquota</B> command to set an unlimited quota on the
2129 volume mounted at the
2130 <B>/afs/</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws</B>
2131 directory. This enables you to copy all of the appropriate files from
2132 the CD-ROM into the volume without exceeding the volume's quota. 
2133 <P>If you wish, you can set the volume's quota to a finite value after
2134 you complete the copying operation. At that point, use the <B>vos
2135 examine</B> command to determine how much space the volume is
2136 occupying. Then issue the <B>fs setquota</B> command to set a quota
2137 that is slightly larger. 
2138 <PRE>   
2139    # <B>fs setquota /afs/.</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws  0</B>
2140    
2141 </PRE>
2142 <P><LI><A NAME="LIWQ161"></A>Copy the contents of the indicated directories from the CD-ROM
2143 into the
2144 <B>/afs/</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws</B>
2145 directory.
2146 <PRE>   
2147    # <B>cd /afs/.</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws</B>
2148    
2149    # <B>cp -rp /cdrom/</B><VAR>sysname</VAR><B>/bin  .</B>
2150    
2151    # <B>cp -rp /cdrom/</B><VAR>sysname</VAR><B>/etc  .</B>
2152    
2153    # <B>cp -rp /cdrom/</B><VAR>sysname</VAR><B>/include  .</B>
2154    
2155    # <B>cp -rp /cdrom/</B><VAR>sysname</VAR><B>/lib  .</B>
2156    
2157 </PRE>
2158 <P><LI>Issue the <B>fs setacl</B> command to set the ACL on each directory
2159 appropriately. To comply with the terms of your AFS License agreement,
2160 you must prevent unauthorized users from accessing AFS software. To
2161 enable access for locally authenticated users only, set the ACL on the
2162 <B>etc</B>, <B>include</B>, and <B>lib</B> subdirectories to grant
2163 the <B>l</B> and <B>r</B> permissions to the
2164 <B>system:authuser</B> group rather than the
2165 <B>system:anyuser</B> group. The
2166 <B>system:anyuser</B> group must retain the <B>l</B> and
2167 <B>r</B> permissions on the <B>bin</B> subdirectory to enable
2168 unauthenticated users to access the <B>klog</B> binary. To ensure
2169 that unauthorized users are not accessing AFS software, check periodically
2170 that the ACLs on these directories are set properly.
2171 <PRE>     
2172    # <B>cd /afs/.</B><VAR>cellname</VAR><B>/</B><VAR>sysname</VAR><B>/usr/afsws</B>
2173    
2174    # <B>fs setacl  -dir etc include lib  -acl  system:authuser rl</B>  \
2175               <B>system:anyuser none</B>
2176    
2177 </PRE>
2178 <P><LI><A NAME="LIWQ162"></A>Perform this step on the new client machine even if you have
2179 performed the previous steps on another machine. Create
2180 <B>/usr/afsws</B> on the local disk as a symbolic link to the directory
2181 <B>/afs/</B><VAR>cellname</VAR><B>/@sys/usr/afsws</B>. You can
2182 specify the actual system name instead of <B>@sys</B> if you wish, but the
2183 advantage of using <B>@sys</B> is that it remains valid if you upgrade
2184 this machine to a different system type. 
2185 <PRE>   
2186    # <B>ln -s /afs/</B><VAR>cellname</VAR><B>/@sys/usr/afsws  /usr/afsws</B>
2187    
2188 </PRE>
2189 <P><LI><B>(Optional)</B> To enable users to issue commands from the AFS
2190 suites (such as <B>fs</B>) without having to specify a pathname to their
2191 binaries, include the <B>/usr/afsws/bin</B> and <B>/usr/afsws/etc</B>
2192 directories in the PATH environment variable you define in each user's
2193 shell initialization file (such as <B>.cshrc</B>).
2194 <P><LI><B>(Optional)</B> If you believe it is helpful to your users to access
2195 the AFS documents in a certain format via a local disk directory, create
2196 <B>/usr/afsdoc</B> on the local disk as a symbolic link to the
2197 documentation directory in AFS
2198 (<B>/afs/</B><VAR>cellname</VAR><B>/afsdoc/</B><VAR>format_name</VAR>).
2199 <P>
2200 <PRE>   
2201    # <B>ln -s /afs/</B><VAR>cellname</VAR><B>/afsdoc/</B><VAR>format_name</VAR> <B>/usr/afsdoc</B>
2202 </PRE> 
2203 <P>An alternative is to create a link in each user's home directory to
2204 the <B>/afs/</B><VAR>cellname</VAR><B>/afsdoc/</B><VAR>format_name</VAR>
2205 directory.
2206 <P><LI><B>(Optional)</B> If working on the local machine, remove the AFS
2207 binaries from the temporary location. They are now accessible in the
2208 <B>/usr/afsws</B> directory.
2209 <PRE>   
2210    # <B>cd  /tmp</B>
2211    
2212    # <B>rm  klog  fs  vos</B>
2213      
2214 </PRE>
2215 </OL>
2216 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auqbg002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auqbg006.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="auqbg008.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auqbg009.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
2217 <!-- Begin Footer Records  ========================================== -->
2218 <P><HR><B> 
2219 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
2220 </B> 
2221 <!-- End Footer Records  ============================================ -->
2222 <A NAME="Bot_Of_Page"></A>
2223 </BODY></HTML>