(no commit message)
[openafs-wiki.git] / archive / InstallingtheFirstAFSMachine.mdwn
1
2 [[!toc level=3]]
3
4 #  Installing the First AFS Machine
5
6 This chapter describes how to install the first AFS machine in your cell, configuring it as both a file server machine and a client machine. After completing all procedures in this chapter, you can remove the client functionality if you wish, as described in Removing Client Functionality.
7
8 To install additional file server machines after completing this chapter, see Installing Additional Server Machines.
9
10 To install additional client machines after completing this chapter, see Installing Additional Client Machines. Requirements and Configuration Decisions
11
12 The instructions in this chapter assume that you meet the following requirements.
13
14 - You are logged onto the machine's console as the local superuser root
15
16 - A standard version of one of the operating systems supported by the current version of AFS is running on the machine
17
18 - You can access the data on the AFS CD-ROMs, either through a local CD drive or via an NFS mount of a CD drive attached to a machine that is accessible by network
19
20 You must make the following configuration decisions while installing the first AFS machine. To speed the installation itself, it is best to make the decisions before beginning. See the chapter in the IBM AFS Administration Guide about issues in cell administration and configuration for detailed guidelines.
21
22 - Select the first AFS machine
23
24 - Select the cell name
25
26 - Decide which partitions or logical volumes to configure as AFS server partitions, and choose the directory names on which to mount them
27
28 - Decide whether to use the standard AFS authentication and authorization software or Kerberos as obtained from another source. On several system types, the decision determines how you incorporate AFS into the machine's authentication system. If you wish to use Kerberos, contact the AFS Product Support group now to learn about how you must modify the installation procedure.
29
30 - Decide how big to make the client cache
31
32 - Decide how to configure the top levels of your cell's AFS filespace
33
34 This chapter is divided into three large sections corresponding to the three parts of installing the first AFS machine. Perform all of the steps in the order they appear. Each functional section begins with a summary of the procedures to perform. The sections are as follows:
35
36 - Installing server functionality (begins in Overview: Installing Server Functionality)
37
38 - Installing client functionality (begins in Overview: Installing Client Functionality)
39
40 - Configuring your cell's filespace, establishing further security mechanisms, and enabling access to foreign cells (begins in Overview: Completing the Installation of the First AFS Machine)
41
42 #  Overview: Installing Server Functionality
43
44 In the first phase of installing your cell's first AFS machine, you install file server and database server functionality by performing the following procedures:
45
46 1. Choose which machine to install as the first AFS machine
47
48 1. Create AFS-related directories on the local disk
49
50 1. Incorporate AFS modifications into the machine's kernel
51
52 1. Configure partitions or logical volumes for storing AFS volumes
53
54 1. On some system types, install and configure an AFS-modified version of the fsck program
55
56 1. If the machine is to remain a client machine, incorporate AFS into its authentication system
57
58 1. Start the Basic [[OverSeer]] (BOS) Server
59
60 1. Define the cell name and the machine's cell membership
61
62 1. Start the database server processes: Authentication Server, Backup Server, Protection Server, and Volume Location (VL) Server
63
64 10. Configure initial security mechanisms
65
66 11. Start the fs process, which incorporates three component processes: the File Server, Volume Server, and Salvager
67
68 12. Start the server portion of the Update Server
69
70 13. Start the controller process (called runntp) for the Network Time Protocol Daemon, which synchronizes machine clocks
71
72 #  Choosing the First AFS Machine
73
74 The first AFS machine you install must have sufficient disk space to store AFS volumes. To take best advantage of AFS's capabilities, store client-side binaries as well as user files in volumes. When you later install additional file server machines in your cell, you can distribute these volumes among the different machines as you see fit.
75
76 These instructions configure the first AFS machine as a database server machine, the binary distribution machine for its system type, and the cell's system control machine. For a description of these roles, see the IBM AFS Administration Guide.
77
78 Installation of additional machines is simplest if the first machine has the lowest IP address of any database server machine you currently plan to install. If you later install database server functionality on a machine with a lower IP address, you must first update the /usr/vice/etc/CellServDB file on all of your cell's client machines. For more details, see Installing Database Server Functionality. Creating AFS Directories
79
80 Create the /usr/afs and /usr/vice/etc directories on the local disk, to house server and client files respectively. Subsequent instructions copy files from the AFS CD-ROM into them. Create the /cdrom directory as a mount point for CD-ROMs, if it does not already exist.
81
82        # mkdir /usr/afs
83
84        # mkdir -p /usr/vice/etc
85
86        # mkdir /cdrom
87
88 #  Performing Platform-Specific Procedures
89
90 Several of the initial procedures for installing a file server machine differ for each system type. For convenience, the following sections group them together for each system type:
91
92 - Incorporate AFS modifications into the kernel.
93
94 The kernel on every AFS file server and client machine must incorporate AFS extensions. On machines that use a dynamic kernel module loader, it is conventional to alter the machine's initialization script to load the AFS extensions at each reboot.
95
96 - Configure server partitions or logical volumes to house AFS volumes.
97
98 Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes (for convenience, the documentation hereafter refers to partitions only). Each server partition is mounted at a directory named /vicepxx, where xx is one or two lowercase letters. By convention, the first 26 partitions are mounted on the directories called /vicepa through /vicepz, the 27th one is mounted on the /vicepaa directory, and so on through /vicepaz and /vicepba, continuing up to the index corresponding to the maximum number of server partitions supported in the current version of AFS (which is specified in the IBM AFS Release Notes).
99
100 The /vicepxx directories must reside in the file server machine's root directory, not in one of its subdirectories (for example, /usr/vicepa is not an acceptable directory location).
101
102 You can also add or remove server partitions on an existing file server machine. For instructions, see the chapter in the IBM AFS Administration Guide about maintaining server machines.
103
104 <dl>
105   <dd>
106     <dl>
107       <dt> Note</dt>
108       <dd> Not all file system types supported by an operating system are necessarily supported as AFS server partitions. For possible restrictions, see the IBM AFS Release Notes. </dd>
109     </dl>
110   </dd>
111 </dl>
112
113 - On some system types, install and configure a modified fsck program which recognizes the structures that the File Server uses to organize volume data on AFS server partitions. The fsck program provided with the operating system does not understand the AFS data structures, and so removes them to the lost+found directory.
114
115 - If the machine is to remain an AFS client machine, modify the machine's authentication system so that users obtain an AFS token as they log into the local file system. Using AFS is simpler and more convenient for your users if you make the modifications on all client machines. Otherwise, users must perform a two-step login procedure (login to the local file system and then issue the klog command). For further discussion of AFS authentication, see the chapter in the IBM AFS Administration Guide about cell configuration and administration issues.
116
117 #  Getting Started on AIX Systems
118
119 Begin by running the AFS initialization script to call the AIX kernel extension facility, which dynamically loads AFS modifications into the kernel. Then use the SMIT program to configure partitions for storing AFS volumes, and replace the AIX fsck program helper with a version that correctly handles AFS volumes. If the machine is to remain an AFS client machine, incorporate AFS into the AIX secondary authentication system.
120
121 ##  Loading AFS into the AIX Kernel
122
123 [[Loading AFS into the AIX Kernel|LoadingAFSIntoTheAIXKernel]]
124
125 ##  Replacing the fsck Program Helper on AIX Systems
126
127 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
128
129 [[Replacing the fsck Program Helper on AIX Systems|ReplacingTheFsckProgramHelperOnAIXSystems]]
130
131 ##  Configuring Server Volumes on AIX Systems
132
133 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
134
135 [[Configuring Server Volumes on AIX|ConfiguringServerVolumesOnAIX]]
136
137 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on AIX Systems|EnablingAFSLoginOnAIXSystems]]. Otherwise, proceed to Starting the BOS Server.
138
139 # <a name="Getting Started on Digital UNIX "></a> Getting Started on Digital UNIX Systems
140
141 Begin by either building AFS modifications into a new static kernel or by setting up to dynamically load the AFS kernel module. Then create partitions for storing AFS volumes, and replace the Digital UNIX fsck program with a version that correctly handles AFS volumes. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Security Integration Architecture (SIA) matrix.
142
143 ##  Loading AFS into the Digital UNIX Kernel
144
145 [[Building AFS into the Digital UNIX Kernel|BuildingAFSIntoTheDigitalUNIXKernel]]
146
147 ##  Replacing the fsck Program on Digital UNIX Systems
148
149 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
150
151 [[Replacing the fsck Program on Digital UNIX Systems|ReplacingTheFsckProgramOnDigitalUNIXSystems]]
152
153 ##  Configuring Server Volumes on Digital UNIX Systems
154
155 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
156
157 [[Configuring Server Volumes on Digital UNIX|ConfiguringServerVolumesOnDigitalUNIX]]
158
159 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on Digital UNIX Systems|EnablingAFSLoginOnDigitalUNIXSystems]]. Otherwise, proceed to Starting the BOS Server.
160
161 #  Getting Started on HP-UX Systems
162
163 Begin by building AFS modifications into a new kernel; HP-UX does not support dynamic loading. Then create partitions for storing AFS volumes, and install and configure the AFS-modified fsck program to run on AFS server partitions. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
164
165 ##  Building AFS into the HP-UX Kernel
166
167 [[Building AFS into the HP-UX Kernel|BuildingAFSIntoTheHP-UXKernel]]
168
169 ##  Configuring the AFS-modified fsck Program on HP-UX Systems
170
171 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
172
173 [[Configuring the AFS-modified fsck Program on HP-UX Systems|ConfiguringTheAFS-modifiedFsckProgramOnHP-UXSystems]]
174
175 ##  Configuring Server Volumes on HP-UX Systems
176
177 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
178
179 [[Configuring Server Volumes on HP-UX|ConfiguringServerVolumesOnHP-UX]]
180
181 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on HP-UX Systems|EnablingAFSLoginOnHP-UXSystems]]. Otherwise, proceed to Starting the BOS Server.
182
183 #  Getting Started on IRIX Systems
184
185 Begin by incorporating AFS modifications into the kernel. Either use the ml dynamic loader program, or build a static kernel. Then configure partitions to house AFS volumes. AFS supports use of both EFS and XFS partitions for housing AFS volumes. SGI encourages use of XFS partitions.
186
187 You do not need to replace IRIX fsck program, because the version that SGI distributes handles AFS volumes properly.
188
189 ##  Loading AFS into the IRIX Kernel
190
191 [[Loading AFS into the IRIX Kernel|LoadingAFSIntoTheIRIXKernel]]
192
193 Proceed to Configuring Server Partitions on IRIX Systems.
194
195 ##  Configuring Server Volumes on IRIX Systems
196
197 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
198
199 [[Configuring Server Volumes on IRIX|ConfiguringServerVolumesOnIRIX]]
200
201 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on IRIX Systems|EnablingAFSLoginOnIRIXSystems]]. Otherwise, proceed to Starting the BOS Server.
202
203 #  Getting Started on Linux Systems
204
205 Begin by running the AFS initialization script to call the insmod program, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes. You do not need to replace the Linux fsck program. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
206
207 ##  Loading AFS into the Linux Kernel
208
209 [[Loading AFS into the Linux Kernel|LoadingAFSIntoTheLinuxKernel]]
210
211 ##  Configuring Server Volumes on Linux Systems
212
213 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
214
215 [[Configuring Server Volumes On Linux|ConfiguringServerVolumesOnLinux]]
216
217 If you plan to retain client functionality on this machine after completing the installation, proceed to [[Enabling AFS Login on Linux Systems|EnablingAFSLoginOnLinuxSystems]]. Otherwise, proceed to Starting the BOS Server.
218
219 #  Getting Started on Solaris Systems
220
221 Begin by running the AFS initialization script to call the modload program distributed by Sun Microsystems, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes, and install and configure the AFS-modified fsck program to run on AFS server partitions. If the machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
222
223 ##  Loading AFS into the Solaris Kernel
224
225 [[Loading AFS into the Solaris Kernel|LoadingAFSIntoTheSolarisKernel]]
226
227 ##  Configuring the AFS-modified fsck Program on Solaris Systems
228
229 Never run the standard fsck program on AFS server partitions. It discards AFS volumes.
230
231 [[Configuring the AFS-modified fsck Program on Solaris Systems|ConfiguringTheAFS-modifiedFsckProgramOnSolarisSystems]]
232
233 ##  Configuring Server Partitions on Solaris Systems
234
235 If this system is going to be used as a file server to share some of its disk space, create a directory called /vicepxx for each AFS server partition you are configuring (there must be at least one). If it is not going to be a file server you can skip this step.
236
237 [[Configuring Server Volumes On Solaris|ConfiguringServerVolumesOnSolaris]]
238
239 If you plan to retain client functionality on this machine after completing the installation, proceed to Enabling AFS Login on Solaris Systems. Otherwise, proceed to Starting the BOS Server.
240
241 ##  Enabling AFS Login on Solaris Systems
242
243 Note: If you plan to remove client functionality from this machine after completing the installation, skip this section and proceed to Starting the BOS Server.
244
245 [[Enabling AFS Login on Solaris Systems|EnablingAFSLoginOnSolarisSystems]]
246
247 Proceed to Starting the BOS Server (or if referring to these instructions while installing an additional file server machine, return to Starting Server Programs).
248
249 #  Starting the BOS Server
250
251 You are now ready to start the AFS server processes on this machine. Begin by copying the AFS server binaries from the CD-ROM to the conventional local disk location, the /usr/afs/bin directory. The following instructions also create files in other subdirectories of the /usr/afs directory.
252
253 Then issue the bosserver command to initialize the Basic [[OverSeer]] (BOS) Server, which monitors and controls other AFS server processes on its server machine. Include the -noauth flag to disable authorization checking. Because you have not yet configured your cell's AFS authentication and authorization mechanisms, the BOS Server cannot perform authorization checking as it does during normal operation. In no-authorization mode, it does not verify the identity or privilege of the issuer of a bos command, and so performs any operation for anyone.
254
255 Disabling authorization checking gravely compromises cell security. You must complete all subsequent steps in one uninterrupted pass and must not leave the machine unattended until you restart the BOS Server with authorization checking enabled, in Verifying the AFS Initialization Script.
256
257 As it initializes for the first time, the BOS Server creates the following directories and files, setting the owner to the local superuser root and the mode bits to limit the ability to write (and in some cases, read) them. For a description of the contents and function of these directories and files, see the chapter in the IBM AFS Administration Guide about administering server machines. For further discussion of the mode bit settings, see Protecting Sensitive AFS Directories.
258
259 - /usr/afs/db
260
261 - /usr/afs/etc/CellServDB
262
263 - /usr/afs/etc/ThisCell
264
265 - /usr/afs/local
266
267 - /usr/afs/logs
268
269 The BOS Server also creates symbolic links called /usr/vice/etc/ThisCell and /usr/vice/etc/CellServDB to the corresponding files in the /usr/afs/etc directory. The AFS command interpreters consult the [[CellServDB]] and [[ThisCell]] files in the /usr/vice/etc directory because they generally run on client machines. On machines that are AFS servers only (as this machine currently is), the files reside only in the /usr/afs/etc directory; the links enable the command interpreters to retrieve the information they need. Later instructions for installing the client functionality replace the links with actual files.
270
271 1. On the local /cdrom directory, mount the AFS CD-ROM for this machine's system type, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
272
273 1. Copy files from the CD-ROM to the local /usr/afs directory.
274
275        # cd /cdrom/sysname/root.server/usr/afs
276
277        # cp -rp  *  /usr/afs
278
279 1. Issue the bosserver command. Include the -noauth flag to disable authorization checking.
280
281        # /usr/afs/bin/bosserver -noauth &
282
283 1. Verify that the BOS Server created /usr/vice/etc/ThisCell and /usr/vice/etc/CellServDB as symbolic links to the corresponding files in the /usr/afs/etc directory.
284
285        # ls -l  /usr/vice/etc
286
287 If either or both of /usr/vice/etc/ThisCell and /usr/vice/etc/CellServDB do not exist, or are not links, issue the following commands.
288
289        # cd /usr/vice/etc
290
291        # ln -s /usr/afs/etc/ThisCell
292
293        # ln -s /usr/afs/etc/CellServDB
294
295 #  Defining Cell Name and Membership for Server Processes
296
297 Now assign your cell's name. The chapter in the IBM AFS Administration Guide about cell configuration and administration issues discusses the important considerations, explains why changing the name is difficult, and outlines the restrictions on name format. Two of the most important restrictions are that the name cannot include uppercase letters or more than 64 characters.
298
299 Use the bos setcellname command to assign the cell name. It creates two files:
300
301 - /usr/afs/etc/ThisCell, which defines this machine's cell membership
302
303 - /usr/afs/etc/CellServDB, which lists the cell's database server machines; the machine named on the command line is placed on the list automatically
304
305 Note: In the following and every instruction in this guide, for the machine name argument substitute the fully-qualified hostname (such as fs1.abc.com) of the machine you are installing. For the cell name argument substitute your cell's complete name (such as abc.com).
306
307 1. Issue the bos setcellname command to set the cell name.
308
309        # cd /usr/afs/bin
310
311        # ./bos setcellname <machine name> <cell name> -noauth
312
313 Because you are not authenticated and authorization checking is disabled, the bos command interpreter possibly produces error messages about being unable to obtain tickets and running unauthenticated. You can safely ignore the messages.
314
315 1. Issue the bos listhosts command to verify that the machine you are installing is now registered as the cell's first database server machine.
316
317        # ./bos listhosts <machine name> -noauth
318        Cell name is cell_name
319            Host 1 is machine_name
320
321 #  Starting the Database Server Processes
322
323 Next use the bos create command to create entries for the four database server processes in the /usr/afs/local/BosConfig file and start them running. The four processes run on database server machines only:
324
325 - The Authentication Server (the kaserver process) maintains the Authentication Database
326
327 - The Backup Server (the buserver process) maintains the Backup Database
328
329 - The Protection Server (the ptserver process) maintains the Protection Database
330
331 - The Volume Location (VL) Server (the vlserver process) maintains the Volume Location Database (VLDB)
332
333 Note: AFS's authentication and authorization software is based on algorithms and other procedures known as Kerberos, as originally developed by Project Athena at the Massachusetts Institute of Technology. Some cells choose to replace the AFS Authentication Server and other security-related protocols with Kerberos as obtained directly from Project Athena or other sources. If you wish to do this, contact the AFS Product Support group now to learn about necessary modifications to the installation.
334
335 The remaining instructions in this chapter include the -cell argument on all applicable commands. Provide the cell name you assigned in Defining Cell Name and Membership for Server Processes. If a command appears on multiple lines, it is only for legibility.
336
337 1. Issue the bos create command to start the Authentication Server. The current working directory is still /usr/afs/bin.
338
339        # ./bos create <machine name> kaserver simple /usr/afs/bin/kaserver  \
340                       -cell <cell name>  -noauth
341
342 You can safely ignore the messages that tell you to add Kerberos to the /etc/services file; AFS uses a default value that makes the addition unnecessary. You can also ignore messages about the failure of authentication.
343
344 1. Issue the bos create command to start the Backup Server.
345
346        # ./bos create <machine name> buserver simple /usr/afs/bin/buserver  \
347                       -cell <cell name>  -noauth
348
349 1. Issue the bos create command to start the Protection Server.
350
351        # ./bos create <machine name> ptserver simple /usr/afs/bin/ptserver  \
352                       -cell <cell name>  -noauth
353
354 1. Issue the bos create command to start the VL Server.
355
356        # ./bos create <machine name> vlserver simple /usr/afs/bin/vlserver  \
357                       -cell <cell name>  -noauth
358
359 #  Initializing Cell Security
360
361 Now initialize the cell's security mechanisms. Begin by creating the following two initial entries in the Authentication Database:
362
363 - A generic administrative account, called admin by convention. If you choose to assign a different name, substitute it throughout the remainder of this document.
364
365 After you complete the installation of the first machine, you can continue to have all administrators use the admin account, or you can create a separate administrative account for each of them. The latter scheme implies somewhat more overhead, but provides a more informative audit trail for administrative operations.
366
367 - The entry for AFS server processes, called afs. No user logs in under this identity, but the Authentication Server's Ticket Granting Service (TGS) module uses the associated key to encrypt the server tickets that it grants to AFS clients for presentation to server processes during mutual authentication. (The chapter in the IBM AFS Administration Guide about cell configuration and administration describes the role of server encryption keys in mutual authentication.)
368
369 In Step 7, you also place the initial AFS server encryption key into the /usr/afs/etc/KeyFile file. The AFS server processes refer to this file to learn the server encryption key when they need to decrypt server tickets.
370
371 You also issue several commands that enable the new admin user to issue privileged commands in all of the AFS suites.
372
373 The following instructions do not configure all of the security mechanisms related to the AFS Backup System. See the chapter in the IBM AFS Administration Guide about configuring the Backup System.
374
375 1. Enter kas interactive mode. Because the machine is in no-authorization checking mode, include the -noauth flag to suppress the Authentication Server's usual prompt for a password.
376
377        # kas  -cell <cell name> -noauth
378        ka>
379
380 1. Issue the kas create command to create Authentication Database entries called admin and afs.
381
382 Do not provide passwords on the command line. Instead provide them as afs\_passwd and admin\_passwd in response to the kas command interpreter's prompts as shown, so that they do not appear on the standard output stream.
383
384 You need to enter the afs\_passwd string only in this step and in Step 7, so provide a value that is as long and complex as possible, preferably including numerals, punctuation characters, and both uppercase and lowercase letters. Also make the admin\_passwd as long and complex as possible, but keep in mind that administrators need to enter it often. Both passwords must be at least six characters long.
385
386        ka> create afs
387        initial_password:  afs_passwd
388        Verifying, please re-enter initial_password: afs_passwd
389
390        ka> create admin
391        initial_password: admin_passwd
392        Verifying, please re-enter initial_password: admin_passwd
393
394 1. Issue the kas examine command to display the afs entry. The output includes a checksum generated by encrypting a constant with the server encryption key derived from the afs\_passwd string. In Step 8 you issue the bos listkeys command to verify that the checksum in its output matches the checksum in this output.
395
396        ka> examine afs
397        User data for afs
398         key (0) cksum is checksum . . .
399
400 1. Issue the kas setfields command to turn on the ADMIN flag in the admin entry. This enables the admin user to issue privileged kas commands. Then issue the kas examine command to verify that the ADMIN flag appears in parentheses on the first line of the output, as shown in the example.
401
402        ka> setfields admin -flags admin
403
404        ka> examine admin
405        User data for admin (ADMIN) . . .
406
407 1. Issue the kas quit command to leave kas interactive mode.
408
409        ka> quit
410
411 1. Issue the bos adduser command to add the admin user to the /usr/afs/etc/UserList file. This enables the admin user to issue privileged bos and vos commands.
412
413        # ./bos adduser <machine name> admin -cell <cell name> -noauth
414
415 1. Issue the bos addkey command to define the AFS server encryption key in the /usr/afs/etc/KeyFile file.
416
417 Do not provide the password on the command line. Instead provide it as afs\_passwd in response to the bos command interpreter's prompts, as shown. Provide the same string as in Step 2.
418
419        # ./bos addkey <machine name> -kvno 0 -cell <cell name>  -noauth
420        Input key: afs_passwd
421        Retype input key: afs_passwd
422
423 1. Issue the bos listkeys command to verify that the checksum for the new key in the [[KeyFile]] file is the same as the checksum for the key in the Authentication Database's afs entry, which you displayed in Step 3.
424
425        # ./bos listkeys <machine name> -cell <cell name> -noauth
426        key 0 has cksum checksum
427
428 You can safely ignore any error messages indicating that bos failed to get tickets or that authentication failed.
429
430 If the keys are different, issue the following commands, making sure that the afs\_passwd string is the same in each case. The checksum strings reported by the kas examine and bos listkeys commands must match; if they do not, repeat these instructions until they do, using the -kvno argument to increment the key version number each time.
431
432        # ./kas  -cell <cell name> -noauth
433
434        ka> setpassword afs -kvno 1
435        new_password: afs_passwd
436        Verifying, please re-enter initial_password: afs_passwd
437
438        ka> examine afs
439        User data for afs
440         key (1) cksum is checksum . . .
441
442        ka> quit
443
444        # ./bos addkey <machine name> -kvno 1 -cell <cell name> -noauth
445        Input key: afs_passwd
446        Retype input key: afs_passwd
447
448        # ./bos listkeys <machine name> -cell <cell name> -noauth
449        key 1 has cksum checksum
450
451 1. Issue the pts createuser command to create a Protection Database entry for the admin user.
452
453 By default, the Protection Server assigns AFS UID 1 (one) to the admin user, because it is the first user entry you are creating. If the local password file (/etc/passwd or equivalent) already has an entry for admin that assigns it a UNIX UID other than 1, it is best to use the -id argument to the pts createuser command to make the new AFS UID match the existing UNIX UID. Otherwise, it is best to accept the default.
454
455        # ./pts createuser -name admin -cell <cell name> [-id <AFS UID>]  -noauth
456        User admin has id AFS UID
457
458 10. Issue the pts adduser command to make the admin user a member of the
459 system:administrators group, and the pts membership command to verify the new
460 membership. Membership in the group enables the admin user to issue privileged
461 pts commands and some privileged fs commands.
462
463
464        # ./pts adduser admin system:administrators -cell <cell name> -noauth
465        # ./pts membership admin -cell  <cell name> -noauth
466        Groups admin (id: 1) is a member of:
467          system:administrators
468
469
470 11. Issue the bos restart command with the -all flag to restart the database
471 server processes, so that they start using the new server encryption key.
472
473
474        # ./bos restart <machine name> -all -cell <cell name> -noauth
475
476
477 #  Starting the File Server, Volume Server, and Salvager
478
479 Start the fs process, which consists of the File Server, Volume Server, and Salvager (fileserver, volserver and salvager processes).
480
481 1. Issue the bos create command to start the fs process. The command appears here on multiple lines only for legibility.
482
483        # ./bos create  <machine name> fs fs /usr/afs/bin/fileserver   \
484                        /usr/afs/bin/volserver /usr/afs/bin/salvager  \
485                        -cell <cell name>  -noauth
486
487 Sometimes a message about Volume Location Database (VLDB) initialization appears, along with one or more instances of an error message similar to the following:
488
489        FSYNC_clientInit temporary failure (will retry)
490
491 This message appears when the volserver process tries to start before the fileserver process has completed its initialization. Wait a few minutes after the last such message before continuing, to guarantee that both processes have started successfully.
492
493 You can verify that the fs process has started successfully by issuing the bos status command. Its output mentions two proc starts.
494
495        # ./bos status <machine name> fs -long -noauth
496
497 1. Your next action depends on whether you have ever run AFS file server machines in the cell:
498
499 \* If you are installing the first AFS server machine ever in the cell (that is, you are not upgrading the AFS software from a previous version), create the first AFS volume, root.afs.
500
501 For the partition name argument, substitute the name of one of the machine's AFS server partitions (such as /vicepa).
502
503        # ./vos create  <machine name> <partition name> root.afs   \
504                        -cell <cell name>  -noauth
505
506 The Volume Server produces a message confirming that it created the volume on the specified partition. You can ignore error messages indicating that tokens are missing, or that authentication failed.
507
508 \* If there are existing AFS file server machines and volumes in the cell, issue the vos syncvldb and vos syncserv commands to synchronize the VLDB with the actual state of volumes on the local machine. To follow the progress of the synchronization operation, which can take several minutes, use the -verbose flag.
509
510        # ./vos syncvldb <machine name> -cell <cell name> -verbose  -noauth
511
512        # ./vos syncserv <machine name> -cell <cell name> -verbose  -noauth
513
514 You can ignore error messages indicating that tokens are missing, or that authentication failed.
515
516 #  Starting the Server Portion of the Update Server
517
518 Start the server portion of the Update Server (the upserver process), to distribute the contents of directories on this machine to other server machines in the cell. It becomes active when you configure the client portion of the Update Server on additional server machines.
519
520 Distributing the contents of its /usr/afs/etc directory makes this machine the cell's system control machine. The other server machines in the cell run the upclientetc process (an instance of the client portion of the Update Server) to retrieve the configuration files. Use the -crypt argument to the upserver initialization command to specify that the Update Server distributes the contents of the /usr/afs/etc directory only in encrypted form, as shown in the following instruction. Several of the files in the directory, particularly the [[KeyFile]] file, are crucial to cell security and so must never cross the network unencrypted.
521
522 (You can choose not to configure a system control machine, in which case you must update the configuration files in each server machine's /usr/afs/etc directory individually. The bos commands used for this purpose also encrypt data before sending it across the network.)
523
524 Distributing the contents of its /usr/afs/bin directory to other server machines of its system type makes this machine a binary distribution machine. The other server machines of its system type run the upclientbin process (an instance of the client portion of the Update Server) to retrieve the binaries.
525
526 The binaries in the /usr/afs/bin directory are not sensitive, so it is not necessary to encrypt them before transfer across the network. Include the -clear argument to the upserver initialization command to specify that the Update Server distributes the contents of the /usr/afs/bin directory in unencrypted form unless an upclientbin process requests encrypted transfer.
527
528 Note that the server and client portions of the Update Server always mutually authenticate with one another, regardless of whether you use the -clear or -crypt arguments. This protects their communications from eavesdropping to some degree.
529
530 For more information on the upclient and upserver processes, see their reference pages in the IBM AFS Administration Reference. The commands appear on multiple lines here only for legibility.
531
532 1. Issue the bos create command to start the upserver process.
533
534        # ./bos create  <machine name> upserver simple  \
535                  "/usr/afs/bin/upserver  -crypt /usr/afs/etc    \
536                  -clear /usr/afs/bin" -cell <cell name>  -noauth
537
538 #  Starting the Controller for NTPD
539
540 Keeping the clocks on all server and client machines in your cell synchronized is crucial to several functions, and in particular to the correct operation of AFS's distributed database technology, Ubik. The chapter in the IBM AFS Administration Guide about administering server machines explains how time skew can disturb Ubik's performance and cause service outages in your cell.
541
542 The AFS distribution includes a version of the Network Time Protocol Daemon (NTPD) for synchronizing the clocks on server machines. If a time synchronization program is not already running on the machine, then in this section you start the runntp process to configure NTPD for use with AFS. Note: Do not run the runntp process if NTPD or another time synchronization protocol is already running on the machine. Some versions of some operating systems run a time synchronization program by default, as detailed in the IBM AFS Release Notes.
543
544 Attempting to run multiple instances of the NTPD causes an error. Running NTPD together with another time synchronization protocol is unnecessary and can cause instability in the clock setting.
545
546 If you run the runntp process and your cell has reliable network connectivity to machines outside your cell, then it is conventional to configure the first AFS machine to refer to a time source outside the cell. When you later install the runntp program on other server machines in the cell, it configures NTPD to choose a time source at random from among the database server machines listed in the /usr/afs/etc/CellServDB file. Time synchronization therefore works in a chained manner: this database server machine refers to a time source outside the cell, the database server machines refer to the machine among them that has access to the most accurate time (NTPD itself includes code for determining this), and each non-database server machine refers to a local database server machine chosen at random from the /usr/afs/etc/CellServDB file. If you ever decide to remove database server functionality from this machine, it is best to transfer responsibility for consulting an external time source to a remaining database server machine.
547
548 If your cell does not have network connectivity to external machines, or if the connectivity is not reliable, include the -localclock flag to the runntp command as indicated in the following instructions. The flag tells NTPD to rely on the machine's internal clock when all external time sources are inaccessible. The runntp command has other arguments that are possibly useful given your cell configuration; see the IBM AFS Administration Reference.
549
550 Choosing an appropriate external time source is important, but involves more considerations than can be discussed here. If you need help in selecting a source, contact the AFS Product Support group.
551
552 As the runntp process initializes NTPD, trace messages sometimes appear on the standard output stream. You can ignore them, but they can be informative if you understand how NTPD works.
553
554 1. Issue the bos create command to start the runntp process. For the host argument, substitute the fully-qualified hostname or IP address of one or more machines outside the cell that are to serve as time sources. Separate each name with a space.
555
556 \* If your cell usually has reliable network connectivity to an external time source, use the following command:
557
558        # ./bos create  <machine name>   runntp simple   \
559             "/usr/afs/bin/runntp <host>+"  -cell <cell name>  -noauth
560
561 \* If your cell does not have network connectivity to an external time source, use the following command:
562
563        # ./bos create  <machine name> runntp simple  \
564             "/usr/afs/bin/runntp -localclock"  -cell <cell name>  -noauth
565
566 \* If your cell has network connectivity to an external time source, but the network connection is frequently interrupted, use the following command:
567
568        # ./bos create  <machine name> runntp simple  \
569              "/usr/afs/bin/runntp -localclock <host>+"  \
570              -cell <cell name>  -noauth
571
572 #  Overview: Installing Client Functionality
573
574 The machine you are installing is now an AFS file server machine, database server machine, system control machine, and binary distribution machine. Now make it a client machine by completing the following tasks:
575
576 1. Define the machine's cell membership for client processes
577
578 1. Create the client version of the [[CellServDB]] file
579
580 1. Define cache location and size
581
582 1. Create the /afs directory and start the Cache Manager
583
584 ##  Copying Client Files to the Local Disk
585
586 Before installing and configuring the AFS client, copy the necessary files from the AFS CD-ROM to the local /usr/vice/etc directory.
587
588 1. On the local /cdrom directory, mount the AFS CD-ROM for this machine's system type, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
589
590 1. Copy files to the local /usr/vice/etc directory.
591
592 This step places a copy of the AFS initialization script (and related files, if applicable) into the /usr/vice/etc directory. In the preceding instructions for incorporating AFS into the kernel, you copied the script directly to the operating system's conventional location for initialization files. When you incorporate AFS into the machine's startup sequence in a later step, you can choose to link the two files.
593
594 On some system types that use a dynamic kernel loader program, you previously copied AFS library files into a subdirectory of the /usr/vice/etc directory. On other system types, you copied the appropriate AFS library file directly to the directory where the operating system accesses it. The following commands do not copy or recopy the AFS library files into the /usr/vice/etc directory, because on some system types the library files consume a large amount of space. If you want to copy them, add the -r flag to the first cp command and skip the second cp command.
595
596        # cd /cdrom/sun4x_59/dest/root.client/usr/vice/etc
597
598        # cp -p  *  /usr/vice/etc
599
600        # cp -rp  C  /usr/vice/etc
601
602 ##  Defining Cell Membership for Client Processes
603
604 Every AFS client machine has a copy of the /usr/vice/etc/ThisCell file on its local disk to define the machine's cell membership for the AFS client programs that run on it. The [[ThisCell]] file you created in the /usr/afs/etc directory (in Defining Cell Name and Membership for Server Processes) is used only by server processes.
605
606 Among other functions, the [[ThisCell]] file on a client machine determines the following:
607
608 \* The cell in which users authenticate when they log onto the machine, assuming it is using an AFS-modified login utility
609
610 \* The cell in which users authenticate by default when they issue the klog command
611
612 \* The cell membership of the AFS server processes that the AFS command interpreters on this machine contact by default
613
614 1. Change to the /usr/vice/etc directory and remove the symbolic link created in Starting the BOS Server.
615
616        # cd /usr/vice/etc
617
618        # rm ThisCell
619
620 1. Create the [[ThisCell]] file as a copy of the /usr/afs/etc/ThisCell file. Defining the same local cell for both server and client processes leads to the most consistent AFS performance.
621
622        # cp  /usr/afs/etc/ThisCell  ThisCell
623
624 ## <a name="Creating the Client _CellServDB "></a> Creating the Client [[CellServDB]] File
625
626 [[Creating the Client CellServDB File|CreatingTheClientCellServDBFile]]
627
628 ##  Configuring the Cache
629
630 [[Configuring the Cache|ConfiguringTheCache]]
631
632 ##  Configuring the Cache Manager
633
634 [[Configuring the Cache Manager|ConfiguringTheCacheManager]]
635
636 #  Overview: Completing the Installation of the First AFS Machine
637
638 The machine is now configured as an AFS file server and client machine. In this final phase of the installation, you initialize the Cache Manager and then create the upper levels of your AFS filespace, among other procedures. The procedures are:
639
640 1. Verify that the initialization script works correctly, and incorporate it into the operating system's startup and shutdown sequence
641
642 1. Create and mount top-level volumes
643
644 1. Create and mount volumes to store system binaries in AFS
645
646 1. Enable access to foreign cells
647
648 1. Institute additional security measures
649
650 1. Remove client functionality if desired
651
652 ##  Verifying the AFS Initialization Script
653
654 At this point you run the AFS initialization script to verify that it correctly invokes all of the necessary programs and AFS processes, and that they start correctly. The following are the relevant commands:
655
656 \* The command that dynamically loads AFS modifications into the kernel, on some system types (not applicable if the kernel has AFS modifications built in)
657
658 \* The bosserver command, which starts the BOS Server; it in turn starts the server processes for which you created entries in the /usr/afs/local/BosConfig file
659
660 \* The afsd command, which initializes the Cache Manager
661
662 On system types that use a dynamic loader program, you must reboot the machine before running the initialization script, so that it can freshly load AFS modifications into the kernel.
663
664 If there are problems during the initialization, attempt to resolve them. The AFS Product Support group can provide assistance if necessary.
665
666 1. Issue the bos shutdown command to shut down the AFS server processes other than the BOS Server. Include the -wait flag to delay return of the command shell prompt until all processes shut down completely.
667
668        # /usr/afs/bin/bos shutdown <machine name> -wait
669
670 1. Issue the ps command to learn the bosserver process's process ID number (PID), and then the kill command to stop it.
671
672        # ps appropriate_ps_options | grep bosserver
673
674        # kill bosserver_PID
675
676 1. Issue the appropriate commands to run the AFS initialization script for this system type.
677
678 ##  On AIX systems:
679
680 [[Initialization Script on AIX|InitializationScriptOnAIX]]
681
682 Proceed to Step 4.
683
684 ##  On Digital UNIX systems:
685
686 [[Initialization Script on Digital UNIX|InitializationScriptOnDigitalUNIX]]
687
688 Proceed to Step 4.
689
690 ##  On HP-UX systems:
691
692 [[Initialization Script on HP-UX|InitializationScriptOnHP-UX]]
693
694 Proceed to Step 4.
695
696 ##  On IRIX systems:
697
698 [[Initialization Script on IRIX|InitializationScriptOnIRIX]]
699
700 Proceed to Step 4.
701
702 ##  On Linux systems:
703
704 [[Initialization Script on Linux|InitializationScriptOnLinux]]
705
706 Proceed to Step 4.
707
708 ##  On Solaris systems:
709
710 [[Initialization Script on Solaris|InitializationScriptOnSolaris]]
711
712 Step 4. Verify that /usr/afs and its subdirectories on the new file server machine meet the ownership and mode bit requirements outlined in Protecting Sensitive AFS Directories. If necessary, use the chmod command to correct the mode bits.
713
714 Proceed to Configuring the Top Levels of the AFS Filespace.
715
716 #  Configuring the Top Levels of the AFS Filespace
717
718 If you have not previously run AFS in your cell, you now configure the top levels of your cell's AFS filespace. If you have run a previous version of AFS, the filespace is already configured. Proceed to Storing AFS Binaries in AFS.
719
720 You created the root.afs volume in Starting the File Server, Volume Server, and Salvager, and the Cache Manager mounted it automatically on the local /afs directory when you ran the AFS initialization script in Verifying the AFS Initialization Script. You now set the access control list (ACL) on the /afs directory; creating, mounting, and setting the ACL are the three steps required when creating any volume.
721
722 After setting the ACL on the root.afs volume, you create your cell's root.cell volume, mount it as a subdirectory of the /afs directory, and set the ACL. Create both a read/write and a regular mount point for the root.cell volume. The read/write mount point enables you to access the read/write version of replicated volumes when necessary. Creating both mount points essentially creates separate read-only and read-write copies of your filespace, and enables the Cache Manager to traverse the filespace on a read-only path or read/write path as appropriate. For further discussion of these concepts, see the chapter in the IBM AFS Administration Guide about administering volumes.
723
724 Then replicate both the root.afs and root.cell volumes. This is required if you want to replicate any other volumes in your cell, because all volumes mounted above a replicated volume must themselves be replicated in order for the Cache Manager to access the replica.
725
726 When the root.afs volume is replicated, the Cache Manager is programmed to access its read-only version (root.afs.readonly) whenever possible. To make changes to the contents of the root.afs volume (when, for example, you mount another cell's root.cell volume at the second level in your filespace), you must mount the root.afs volume temporarily, make the changes, release the volume and remove the temporary mount point. For instructions, see Enabling Access to Foreign Cells.
727
728 1. Issue the fs setacl command to edit the ACL on the /afs directory. Add an entry that grants the l (lookup) and r (read) permissions to the system:anyuser group, to enable all AFS users who can reach your cell to traverse through the directory. If you prefer to enable access only to locally authenticated users, substitute the system:authuser group.
729
730 Note that there is already an ACL entry that grants all seven access rights to the system:administrators group. It is a default entry that AFS places on every new volume's root directory.
731
732        # /usr/afs/bin/fs setacl /afs system:anyuser rl
733
734 1. Issue the vos create command to create the root.cell volume. Then issue the fs mkmount command to mount it as a subdirectory of the /afs directory, where it serves as the root of your cell's local AFS filespace. Finally, issue the fs setacl command to create an ACL entry for the system:anyuser group (or system:authuser group).
735
736 For the partition name argument, substitute the name of one of the machine's AFS server partitions (such as /vicepa). For the cellname argument, substitute your cell's fully-qualified Internet domain name (such as abc.com).
737
738        # /usr/afs/bin/vos create  <machine name> <partition name> root.cell
739
740        # /usr/afs/bin/fs mkmount /afs/cellname  root.cell
741
742        # /usr/afs/bin/fs setacl /afs/cellname  system:anyuser rl
743
744 1. (Optional) Create a symbolic link to a shortened cell name, to reduce the length of pathnames for users in the local cell. For example, in the abc.com cell, /afs/abc is a link to /afs/abc.com.
745
746        # cd /afs
747
748        # ln -s  full_cellname  short_cellname
749
750 1. Issue the fs mkmount command to create a read/write mount point for the root.cell volume (you created a regular mount point in Step 2).
751
752 By convention, the name of a read/write mount point begins with a period, both to distinguish it from the regular mount point and to make it visible only when the -a flag is used on the ls command.
753
754 Change directory to /usr/afs/bin to make it easier to access the command binaries.
755
756        # cd /usr/afs/bin
757
758        # ./fs mkmount   /afs/.cellname   root.cell -rw
759
760 1. Issue the vos addsite command to define a replication site for both the root.afs and root.cell volumes. In each case, substitute for the partition name argument the partition where the volume's read/write version resides. When you install additional file server machines, it is a good idea to create replication sites on them as well.
761
762        # ./vos addsite <machine name> <partition name> root.afs
763
764        # ./vos addsite <machine name> <partition name> root.cell
765
766 1. Issue the fs examine command to verify that the Cache Manager can access both the root.afs and root.cell volumes, before you attempt to replicate them. The output lists each volume's name, volumeID number, quota, size, and the size of the partition that houses them. If you get an error message instead, do not continue before taking corrective action.
767
768        # ./fs examine /afs
769
770        # ./fs examine /afs/cellname
771
772 1. Issue the vos release command to release a replica of the root.afs and root.cell volumes to the sites you defined in Step 5.
773
774        # ./vos release root.afs
775
776        # ./vos release root.cell
777
778 1. Issue the fs checkvolumes to force the Cache Manager to notice that you have released read-only versions of the volumes, then issue the fs examine command again. This time its output mentions the read-only version of the volumes (root.afs.readonly and root.cell.readonly) instead of the read/write versions, because of the Cache Manager's bias to access the read-only version of the root.afs volume if it exists.
779
780        # ./fs checkvolumes
781
782        # ./fs examine /afs
783
784        # ./fs examine /afs/cellname
785
786 #  Storing AFS Binaries in AFS
787
788 In the conventional configuration, you make AFS client binaries and configuration files available in the subdirectories of the /usr/afsws directory on client machines (afsws is an acronym for AFS workstation). You can conserve local disk space by creating /usr/afsws as a link to an AFS volume that houses the AFS client binaries and configuration files for this system type.
789
790 In this section you create the necessary volumes. The conventional location to which to link /usr/afsws is /afs/cellname/sysname/usr/afsws, where sysname is the appropriate system type name as specified in the IBM AFS Release Notes. The instructions in Installing Additional Client Machines assume that you have followed the instructions in this section.
791
792 If you have previously run AFS in the cell, the volumes possibly already exist. If so, you need to perform Step 8 only.
793
794 The current working directory is still /usr/afs/bin, which houses the fs and vos command suite binaries. In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.
795
796 1. Issue the vos create command to create volumes for storing the AFS client binaries for this system type. The following example instruction creates volumes called sysname, sysname.usr, and sysname.usr.afsws. Refer to the IBM AFS Release Notes to learn the proper value of sysname for this system type.
797
798        # vos create <machine name> <partition name> sysname
799
800        # vos create <machine name> <partition name> sysname.usr
801
802        # vos create <machine name> <partition name> sysname.usr.afsws
803
804 1. Issue the fs mkmount command to mount the newly created volumes. Because the root.cell volume is replicated, you must precede the cellname part of the pathname with a period to specify the read/write mount point, as shown. Then issue the vos release command to release a new replica of the root.cell volume, and the fs checkvolumes command to force the local Cache Manager to access them.
805
806        # fs mkmount -dir /afs/.cellname/sysname -vol sysname
807
808        # fs mkmount -dir /afs/.cellname/sysname/usr  -vol sysname.usr
809
810        # fs mkmount -dir /afs/.cellname/sysname/usr/afsws -vol sysname.usr.afsws
811
812        # vos release root.cell
813
814        # fs checkvolumes
815
816 1. Issue the fs setacl command to grant the l (lookup) and r (read) permissions to the system:anyuser group on each new directory's ACL.
817
818        # cd /afs/.cellname/sysname
819
820        # fs setacl  -dir  .  usr  usr/afsws  -acl  system:anyuser rl
821
822 1. Issue the fs setquota command to set an unlimited quota on the volume mounted at the /afs/cellname/sysname/usr/afsws directory. This enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.
823
824 If you wish, you can set the volume's quota to a finite value after you complete the copying operation. At that point, use the vos examine command to determine how much space the volume is occupying. Then issue the fs setquota command to set a quota that is slightly larger.
825
826        # fs setquota /afs/.cellname/sysname/usr/afsws  0
827
828 1. Mount the AFS CD-ROM for this machine's system type on the local /cdrom directory, if it is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
829
830 1. Copy the contents of the indicated directories from the CD-ROM into the /afs/cellname/sysname/usr/afsws directory.
831
832        # cd /afs/.cellname/sysname/usr/afsws
833
834        # cp -rp /cdrom/sysname/bin  .
835
836        # cp -rp /cdrom/sysname/etc  .
837
838        # cp -rp /cdrom/sysname/include  .
839
840        # cp -rp /cdrom/sysname/lib  .
841
842 1. Issue the fs setacl command to set the ACL on each directory appropriately. To comply with the terms of your AFS License agreement, you must prevent unauthorized users from accessing AFS software. To enable access for locally authenticated users only, set the ACL on the etc, include, and lib subdirectories to grant the l and r permissions to the system:authuser group rather than the system:anyuser group. The system:anyuser group must retain the l and r permissions on the bin subdirectory to enable unauthenticated users to access the klog binary. To ensure that unauthorized users are not accessing AFS software, check periodically that the ACLs on these directories are set properly.
843
844        # cd /afs/.cellname/sysname/usr/afsws
845
846        # fs setacl  -dir etc include lib  -acl  system:authuser rl  \
847                   system:anyuser none
848
849 1. Create /usr/afsws on the local disk as a symbolic link to the directory /afs/cellname/@sys/usr/afsws. You can specify the actual system name instead of @sys if you wish, but the advantage of using @sys is that it remains valid if you upgrade this machine to a different system type.
850
851        # ln -s /afs/cellname/@sys/usr/afsws  /usr/afsws
852
853 1. (Optional) To enable users to issue commands from the AFS suites (such as fs) without having to specify a pathname to their binaries, include the /usr/afsws/bin and /usr/afsws/etc directories in the PATH environment variable you define in each user's shell initialization file (such as .cshrc).
854
855 Storing AFS Documents in AFS
856
857 #  The AFS distribution includes the following documents:
858
859 - IBM AFS Release Notes
860
861 - IBM AFS Quick Beginnings
862
863 - IBM AFS User Guide
864
865 - IBM AFS Administration Reference
866
867 - IBM AFS Administration Guide
868
869 The AFS CD-ROM for each system type has a top-level Documentation directory, with a subdirectory for each document format provided. The different formats are suitable for online viewing, printing, or both.
870
871 This section explains how to create and mount a volume to house the documents, making them available to your users. The recommended mount point for the volume is /afs/cellname/afsdoc. If you wish, you can create a link to the mount point on each client machine's local disk, called /usr/afsdoc. Alternatively, you can create a link to the mount point in each user's home directory. You can also choose to permit users to access only certain documents (most probably, the IBM AFS User Guide) by creating different mount points or setting different ACLs on different document directories.
872
873 The current working directory is still /usr/afs/bin, which houses the fs and vos command suite binaries you use to create and mount volumes. In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.
874
875 1. Issue the vos create command to create a volume for storing the AFS documentation. Include the -maxquota argument to set an unlimited quota on the volume. This enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.
876
877 If you wish, you can set the volume's quota to a finite value after you complete the copying operations. At that point, use the vos examine command to determine how much space the volume is occupying. Then issue the fs setquota command to set a quota that is slightly larger.
878
879        # vos create  <machine name> <partition name>  afsdoc  -maxquota  0
880
881 1. Issue the fs mkmount command to mount the new volume. Because the root.cell volume is replicated, you must precede the cellname with a period to specify the read/write mount point, as shown. Then issue the vos release command to release a new replica of the root.cell volume, and the fs checkvolumes command to force the local Cache Manager to access them.
882
883        # fs mkmount -dir /afs/.cellname/afsdoc -vol afsdoc
884
885        # vos release root.cell
886
887        # fs checkvolumes
888
889 1. Issue the fs setacl command to grant the rl permissions to the system:anyuser group on the new directory's ACL.
890
891        # cd /afs/.cellname/afsdoc
892
893        # fs setacl  .  system:anyuser rl
894
895 1. Mount the AFS CD-ROM for any system type on the local /cdrom directory, if one is not already. For instructions on mounting CD-ROMs (either locally or remotely via NFS), consult the operating system documentation.
896
897 1. Copy the AFS documents in one or more formats from the CD-ROM into subdirectories of the /afs/cellname/afsdoc directory. Repeat the commands for each format.
898
899        # mkdir format_name
900
901        # cd format_name
902
903        # cp -rp /cdrom/Documentation/format  .
904
905 If you choose to store the HTML version of the documents in AFS, note that in addition to a subdirectory for each document there are several files with a .gif extension, which enable readers to move easily between sections of a document. The file called index.htm is an introductory HTML page that contains a hyperlink to each of the documents. For online viewing to work properly, these files must remain in the top-level HTML directory (the one named, for example, /afs/cellname/afsdoc/html).
906
907 1. (Optional) If you believe it is helpful to your users to access the AFS documents in a certain format via a local disk directory, create /usr/afsdoc on the local disk as a symbolic link to the documentation directory in AFS (/afs/cellname/afsdoc/format\_name).
908
909        # ln -s /afs/cellname/afsdoc/format_name /usr/afsdoc
910
911 An alternative is to create a link in each user's home directory to the /afs/cellname/afsdoc/format\_name directory.
912
913 #  Storing System Binaries in AFS
914
915 You can also choose to store other system binaries in AFS volumes, such as the standard UNIX programs conventionally located in local disk directories such as /etc, /bin, and /lib. Storing such binaries in an AFS volume not only frees local disk space, but makes it easier to update binaries on all client machines.
916
917 The following is a suggested scheme for storing system binaries in AFS. It does not include instructions, but you can use the instructions in Storing AFS Binaries in AFS (which are for AFS-specific binaries) as a template.
918
919 Some files must remain on the local disk for use when AFS is inaccessible (during bootup and file server or network outages). The required binaries include the following:
920
921 - A text editor, network commands, and so on
922
923 - Files used during the boot sequence before the afsd program runs, such as initialization and configuration files, and binaries for commands that mount file systems
924
925 - Files used by dynamic kernel loader programs
926
927 In most cases, it is more secure to enable only locally authenticated users to access system binaries, by granting the l (lookup) and r (read) permissions to the system:authuser group on the ACLs of directories that contain the binaries. If users need to access a binary while unauthenticated, however, the ACL on its directory must grant those permissions to the system:anyuser group.
928
929 The following chart summarizes the suggested volume and mount point names for storing system binaries. It uses a separate volume for each directory. You already created a volume called sysname for this machine's system type when you followed the instructions in Storing AFS Binaries in AFS.
930
931 You can name volumes in any way you wish, and mount them at other locations than those suggested here. However, this scheme has several advantages:
932
933 - Volume names clearly identify volume contents
934
935 - Using the sysname prefix on every volume makes it is easy to back up all of the volumes together, because the AFS Backup System enables you to define sets of volumes based on a string included in all of their names
936
937 - It makes it easy to track related volumes, keeping them together on the same file server machine if desired
938
939 - There is a clear relationship between volume name and mount point name
940
941     Volume Name    Mount Point
942     sysname    /afs/cellname/sysname
943     sysname.bin    /afs/cellname/sysname/bin
944     sysname.etc    /afs/cellname/sysname/etc
945     sysname.usr    /afs/cellname/sysname/usr
946     sysname.usr.afsws    /afs/cellname/sysname/usr/afsws
947     sysname.usr.bin    /afs/cellname/sysname/usr/bin
948     sysname.usr.etc    /afs/cellname/sysname/usr/etc
949     sysname.usr.inc    /afs/cellname/sysname/usr/include
950     sysname.usr.lib    /afs/cellname/sysname/usr/lib
951     sysname.usr.loc    /afs/cellname/sysname/usr/local
952     sysname.usr.man    /afs/cellname/sysname/usr/man
953     sysname.usr.sys    /afs/cellname/sysname/usr/sys
954
955 #  Enabling Access to Foreign Cells
956
957 In this section you create a mount point in your AFS filespace for the root.cell volume of each foreign cell that you want to enable your users to access. For users working on a client machine to access the cell, there must in addition be an entry for it in the client machine's local /usr/vice/etc/CellServDB file. (The instructions in Creating the Client [[CellServDB]] File suggest that you use the [[CellServDB]].sample file included in the AFS distribution as the basis for your cell's client [[CellServDB]] file. The sample file lists all of the cells that had agreed to participate in the AFS global namespace at the time your AFS CD-ROM was created. As mentioned in that section, the AFS Product Support group also maintains a copy of the file, updating it as necessary.)
958
959 The chapter in the IBM AFS Administration Guide about cell administration and configuration issues discusses the implications of participating in the global AFS namespace. The chapter about administering client machines explains how to maintain knowledge of foreign cells on client machines, and includes suggestions for maintaining a central version of the file in AFS.
960
961 1. Issue the fs mkmount command to mount each foreign cell's root.cell volume on a directory called /afs/foreign\_cell. Because the root.afs volume is replicated, you must create a temporary mount point for its read/write version in a directory to which you have write access (such as your cell's /afs/.cellname directory). Create the mount points, issue the vos release command to release new replicas to the read-only sites for the root.afs volume, and issue the fs checkvolumes command to force the local Cache Manager to access the new replica. <dl>
962   <dt> Note</dt>
963   <dd> You need to issue the fs mkmount command only once for each foreign cell's root.cell volume. You do not need to repeat the command on each client machine. </dd>
964 </dl>
965
966 Substitute your cell's name for cellname.
967
968        # cd /afs/.cellname
969
970        # /usr/afs/bin/fs  mkmount  temp  root.afs
971
972 Repeat the fs mkmount command for each foreign cell you wish to mount at this time.
973
974        # /usr/afs/bin/fs mkmount temp/foreign_cell root.cell -c foreign_cell
975
976 Issue the following commands only once.
977
978        # /usr/afs/bin/fs rmmount temp
979
980        # /usr/afs/bin/vos release root.afs
981
982        # /usr/afs/bin/fs checkvolumes
983
984 If this machine is going to remain an AFS client after you complete the
985 installation, verify that the local /usr/vice/etc/CellServDB file includes an
986 entry for each foreign cell.
987
988 For each cell that does not already have an entry, complete the following instructions:
989
990 Create an entry in the [[CellServDB]] file. Be sure to comply with the
991 formatting instructions in Creating the Client [[CellServDB]] File.
992
993 Issue the fs newcell command to add an entry for the cell directly to
994 the list that the Cache Manager maintains in kernel memory. Provide each
995 database server machine's fully qualified hostname.
996
997
998        # /usr/afs/bin/fs newcell <foreign_cell> <dbserver1> [<dbserver2>] [<dbserver3>]
999
1000
1001 If you plan to maintain a central version of the [[CellServDB]] file
1002 (the conventional location is /afs/cellname/common/etc/CellServDB), create it
1003 now as a copy of the local /usr/vice/etc/CellServDB file. Verify that it
1004 includes an entry for each foreign cell you want your users to be able to
1005 access.
1006
1007        # mkdir common
1008
1009        # mkdir common/etc
1010
1011        # cp  /usr/vice/etc/CellServDB  common/etc
1012
1013        # /usr/afs/bin/vos release root.cell
1014
1015 Issue the ls command to verify that the new cell's mount point is visible in your filespace. The output lists the directories at the top level of the new cell's AFS filespace.
1016
1017        # ls /afs/foreign_cell
1018
1019 Please register your cell with the AFS Product Support group at this time. If you do not want to participate in the global AFS namespace, they list your cell in a private [[CellServDB]] file that is not available to other AFS cells.
1020
1021 #  Improving Cell Security
1022
1023 This section discusses ways to improve the security of AFS data in your cell. Also see the chapter in the IBM AFS Administration Guide about configuration and administration issues.
1024
1025 #  Controlling root Access
1026
1027 As on any machine, it is important to prevent unauthorized users from logging onto an AFS server or client machine as the local superuser root. Take care to keep the root password secret.
1028
1029 The local root superuser does not have special access to AFS data through the Cache Manager (as members of the system:administrators group do), but it does have the following privileges:
1030
1031 - On client machines, the ability to issue commands from the fs suite that affect AFS performance
1032
1033 - On server machines, the ability to disable authorization checking, or to install rogue process binaries
1034
1035 ##  Controlling System Administrator Access
1036
1037 Following are suggestions for managing AFS administrative privilege:
1038
1039 - Create an administrative account for each administrator named something like username.admin. Administrators authenticate under these identities only when performing administrative tasks, and destroy the administrative tokens immediately after finishing the task (either by issuing the unlog command, or the klog command to adopt their regular identity).
1040
1041 - Set a short ticket lifetime for administrator accounts (for example, 20 minutes) by using the -lifetime argument to the kas setfields command, which is described in the IBM AFS Administration Reference. Do not however, use a short lifetime for users who issue long-running backup commands.
1042
1043 - Limit the number of system administrators in your cell, especially those who belong to the system:administrators group. By default they have all ACL rights on all directories in the local AFS filespace, and therefore must be trusted not to examine private files.
1044
1045 - Limit the use of system administrator accounts on machines in public areas. It is especially important not to leave such machines unattended without first destroying the administrative tokens.
1046
1047 - Limit the use by administrators of standard UNIX commands that make connections to remote machines (such as the telnet utility). Many of these programs send passwords across the network without encrypting them.
1048
1049 ##  Protecting Sensitive AFS Directories
1050
1051 Some subdirectories of the /usr/afs directory contain files crucial to cell security. Unauthorized users must not read or write to these files because of the potential for misuse of the information they contain.
1052
1053 As the BOS Server initializes for the first time on a server machine, it creates several files and directories (as mentioned in Starting the BOS Server). It sets their owner to the local superuser root and sets their mode bits to enable writing by the owner only; in some cases, it also restricts reading.
1054
1055 At each subsequent restart, the BOS Server checks that the owner and mode bits on these files are still set appropriately. If they are not, it write the following message to the /usr/afs/logs/BosLog file:
1056
1057        Bosserver reports inappropriate access on server directories
1058
1059 The BOS Server does not reset the mode bits, which enables you to set alternate values if you wish.
1060
1061 The following charts lists the expected mode bit settings. A question mark indicates that the BOS Server does not check that mode bit.
1062
1063     /usr/afs    drwxr?xr-x
1064     /usr/afs/backup    drwx???---
1065     /usr/afs/bin    drwxr?xr-x
1066     /usr/afs/db    drwx???---
1067     /usr/afs/etc    drwxr?xr-x
1068     /usr/afs/etc/KeyFile    -rw????---
1069     /usr/afs/etc/UserList    -rw?????--
1070     /usr/afs/local    drwx???---
1071     /usr/afs/logs    drwxr?xr-x
1072
1073 #  Removing Client Functionality
1074
1075 Follow the instructions in this section only if you do not wish this machine to remain an AFS client. Removing client functionality means that you cannot use this machine to access AFS files.
1076
1077 1. Remove the files from the /usr/vice/etc directory. The command does not remove the directory for files used by the dynamic kernel loader program, if it exists on this system type. Those files are still needed on a server-only machine.
1078
1079        # cd /usr/vice/etc
1080
1081        # rm  *
1082
1083        # rm -rf  C
1084
1085 1. Create symbolic links to the [[ThisCell]] and [[CellServDB]] files in the /usr/afs/etc directory. This makes it possible to issue commands from the AFS command suites (such as bos and fs) on this machine.
1086
1087        # ln -s /usr/afs/etc/ThisCell ThisCell
1088
1089        # ln -s /usr/afs/etc/CellServDB CellServDB
1090
1091 1. On IRIX systems, issue the chkconfig command to deactivate the afsclient configuration variable.
1092
1093        # /etc/chkconfig -f afsclient off
1094
1095 1. Reboot the machine. Most system types use the shutdown command, but the appropriate options vary.
1096
1097        # cd /
1098
1099        # shutdown appropriate_options