1 <?xml version="1.0" encoding="UTF-8"?>
4 <title>Issues in Cell Configuration and Administration</title>
6 <para>This chapter discusses many of the issues to consider when
7 configuring and administering a cell, and directs you to detailed
8 related information available elsewhere in this guide. It is assumed you
9 are already familiar with the material in <link linkend="HDRWQ5">An
10 Overview of OpenAFS Administration</link>.</para>
12 <para>It is best to read this chapter before installing your cell's
13 first file server machine or performing any other administrative
17 <primary>AFS</primary>
19 <secondary>differences from UNIX summarized</secondary>
23 <primary>UNIX</primary>
25 <secondary>differences from AFS summarized</secondary>
29 <primary>differences</primary>
31 <secondary>between AFS and UNIX, summarized</secondary>
36 <title>Differences between AFS and UNIX: A Summary</title>
38 <para>AFS behaves like a standard UNIX file system in most respects,
39 while also making file sharing easy within and between cells. This
40 section describes some differences between AFS and the UNIX file
41 system, referring you to more detailed information as
45 <primary>protection</primary>
47 <secondary>AFS compared to UNIX</secondary>
50 <sect2 id="Header_35">
51 <title>Differences in File and Directory Protection</title>
53 <para>AFS augments the standard UNIX file protection mechanism in
54 two ways: it associates an <emphasis>access control list
55 (ACL)</emphasis> with each directory, and it enables users to define
56 a large number of their own groups, which can be placed on
59 <para>AFS uses ACLs to protect files and directories, rather than
60 relying exclusively on the mode bits. This has several implications,
61 which are discussed further in the indicated sections:
64 <para>AFS ACLs use seven access permissions rather than the
65 three UNIX mode bits. See <link linkend="HDRWQ567">The AFS ACL
66 Permissions</link>.</para>
70 <para>For directories, AFS ignores the UNIX mode bits. For
71 files, AFS uses only the first set of mode bits (the <emphasis
72 role="bold">owner</emphasis> bits), and their meaning
73 interacts with permissions on the directory's ACL. See <link
74 linkend="HDRWQ580">How AFS Interprets the UNIX Mode
79 <para>A directory's ACL protects all of the files in a
80 directory in the same manner. To apply a more restrictive set
81 of AFS permissions to certain file, place it in directory with
82 a different ACL. If a directory must contain files with
83 different permissions, use symbolic links to point to files
84 stored in directories with different ACLs.</para>
88 <para>Moving a file to a different directory changes its
89 protection. See <link linkend="HDRWQ566">Differences Between
90 UFS and AFS Data Protection</link>.</para>
94 <para>An ACL can include about 20 entries granting different
95 combinations of permissions to different users or groups,
96 rather than only the three UNIX entities represented by the
97 three sets of mode bits. See <link
98 linkend="HDRWQ566">Differences Between UFS and AFS Data
99 Protection</link>.</para>
103 <para>You can designate an AFS file as write-only as in the
104 UNIX file system, by setting only the <emphasis
105 role="bold">w</emphasis> (<emphasis
106 role="bold">write</emphasis>) mode bit. You cannot designate
107 an AFS directory as write-only, because AFS ignores the mode
108 bits on a directory. See <link linkend="HDRWQ580">How AFS
109 Interprets the UNIX Mode Bits</link>.</para>
114 <para>AFS enables users to create groups and add other users to
115 those groups. Placing these groups on ACLs extends the same
116 permissions to a number of exactly specified users at the same time,
117 which is much more convenient than placing the individuals on the
118 ACLs directly. See <link linkend="HDRWQ531">Administering the
119 Protection Database</link>.</para>
121 <para>There are also system-defined groups, <emphasis
122 role="bold">system:anyuser</emphasis> and <emphasis
123 role="bold">system:authuser</emphasis>, whose presence on an ACL
124 extends access to a wide range of users at once. See <link
125 linkend="HDRWQ535">The System Groups</link> and <link
126 linkend="HDRWQ571">Using Groups on ACLs</link>.</para>
129 <primary>authentication</primary>
131 <secondary>AFS compared to UNIX</secondary>
135 <primary>password</primary>
137 <secondary>AFS compared to UNIX</secondary>
142 <title>Differences in Authentication</title>
144 <para>Just as the AFS filespace is distinct from each machine's
145 local file system, AFS authentication is separate from local
146 login. This has two practical implications, which will already be
147 familiar to users and system administrators who use Kerberos for
151 <para>To access AFS files, users must log into the local
152 machine as normal, obtain Kerberos tickets, and then obtain
153 AFS tokens. This process can often be automated through the
154 system authentication configuration so that the user logs into
155 the system as normal and obtains Kerberos tickets and AFS
156 tokens transparently. If you cannot or chose not to configure
157 the system this way, your users must login and authenticate in
158 separate steps, as detailed in the <emphasis>OpenAFS User
159 Guide</emphasis>.</para>
163 <para>Passwords may be stored in two separate places: the
164 Kerberos KDC and, optionally, each machine's local user
165 database (<emphasis role="bold">/etc/passwd</emphasis> or
166 equivalent) for the local system. A user's passwords in the
167 two places can differ if desired.</para>
173 <sect2 id="Header_37">
174 <title>Differences in the Semantics of Standard UNIX
177 <para>This section summarizes how AFS modifies the functionality of
181 <term><emphasis role="bold">The chmod
182 command</emphasis></term>
186 <primary>chmod command</primary>
187 <secondary>AFS compared to UNIX</secondary>
191 <primary>commands</primary>
192 <secondary>chmod (AFS compared to UNIX)</secondary>
196 <primary>setuid programs</primary>
197 <secondary>setting mode bits</secondary>
200 <para>Only members of the <emphasis
201 role="bold">system:administrators</emphasis> group can use
202 this command to turn on the setuid, setgid or sticky mode
203 bits on AFS files. For more information, see <link
204 linkend="HDRWQ409">Determining if a Client Can Run Setuid
205 Programs</link>.</para>
210 <term><emphasis role="bold">The chown
211 command</emphasis></term>
215 <primary>chown command</primary>
216 <secondary>AFS compared to UNIX</secondary>
220 <primary>commands</primary>
221 <secondary>chown (AFS compared to UNIX)</secondary>
224 <para>Only members of the <emphasis
225 role="bold">system:administrators</emphasis> group can issue
226 this command on AFS files.</para>
231 <term><emphasis role="bold">The chgrp
232 command</emphasis></term>
236 <primary>chgrp command</primary>
237 <secondary>AFS compared to UNIX</secondary>
241 <primary>commands</primary>
242 <secondary>chgrp (AFS compared to UNIX)</secondary>
245 <para>Only members of the <emphasis
246 role="bold">system:administrators</emphasis> can issue this
247 command on AFS files and directories.</para>
252 <term><emphasis role="bold">The groups and id
253 commands</emphasis></term>
257 <primary>groups command</primary>
258 <secondary>AFS compared to UNIX</secondary>
262 <primary>id command</primary>
263 <secondary>AFS compared to UNIX</secondary>
267 <primary>commands</primary>
268 <secondary>groups (AFS compared to UNIX)</secondary>
272 <primary>commands</primary>
273 <secondary>id (AFS compared to UNIX)</secondary>
276 <para>If the user's AFS tokens are associated with a process
277 authentication group (PAG), the output of these commands may
278 include one or two large numbers. These are artificial
279 groups used by the OpenAFS Cache Manager to track the PAG on
280 some platforms. Other platforms may use other methods, such
281 as native kernel support for a PAG or a similar concept, in
282 which case the large GIDs may not appear. To learn about
283 PAGs, see <link linkend="HDRWQ64">Identifying AFS Tokens by
289 <term><emphasis role="bold">The ln command</emphasis></term>
293 <primary>ln command</primary>
294 <secondary>AFS compared to UNIX</secondary>
298 <primary>commands</primary>
299 <secondary>ln (AFS compared to UNIX)</secondary>
302 <para>This command cannot create hard links between files in
303 different AFS directories. See <link
304 linkend="HDRWQ32">Creating Hard Links</link>.</para>
309 <term><emphasis role="bold">The sshd daemon and ssh
310 command</emphasis></term>
314 <primary>sshd command</primary>
315 <secondary>AFS compared to UNIX</secondary>
319 <primary>commands</primary>
320 <secondary>sshd (AFS compared to UNIX)</secondary>
324 <primary>ssh command</primary>
325 <secondary>AFS compared to UNIX</secondary>
329 <primary>commands</primary>
330 <secondary>ssh (AFS compared to UNIX)</secondary>
333 <para>In order for a user to have access to files stored in
334 AFS, that user needs to have Kerberos tickets and an AFS token
335 on the system from which they're accessing AFS. This has an
336 implication for users who log in remotely via protocols such
337 as Secure Shell (SSH): that log-in process must create local
338 Kerberos tickets and an AFS token on the system, or the user
339 will have to separately authenticate to Kerberos and AFS
340 after logging in.</para>
342 <para>The <ulink url="http://www.openssh.org/">OpenSSH
343 project</ulink> provides an SSH client and server that uses
344 the GSS-API protocol to pass Kerberos tickets between
345 machines. With a suitable SSH client, this allows users to
346 delegate their Kerberos tickets to the remote machine, and
347 that machine to store those tickets and obtain AFS tokens as
348 part of the log-in process.</para>
355 <primary>fsck command</primary>
357 <secondary>AFS compared to UNIX</secondary>
361 <primary>file server machine</primary>
362 <secondary>inode-based</secondary>
366 <primary>file server machine</primary>
367 <secondary>namei-based</secondary>
371 <primary>namei</primary>
372 <secondary>definition</secondary>
376 <primary>commands</primary>
378 <secondary>fsck (AFS compared to UNIX)</secondary>
382 <primary>fsck command</primary>
384 <secondary>AFS version</secondary>
388 <primary>commands</primary>
390 <secondary>fsck (AFS version)</secondary>
394 <primary>directories</primary>
396 <secondary>lost+found</secondary>
400 <primary>lost+found directory</primary>
404 <sect2 id="Header_38">
405 <title>The AFS version of the fsck Command and inode-based
409 <para>The fileserver uses either of two formats for storing data
410 on disk. The inode-based format uses a combination of regular
411 files and extra fields stored in the inode data structures that
412 are normally reserved for use by the operating system. The namei
413 format uses normal file storage and does not use special
414 structures. The choice of storage formats is chosen at compile
415 time and the two formats are incompatible. The inode format is
416 only available on certain platforms. The storage format must be
417 consistent for the fileserver binaries and all vice partitions on
418 a given file server machine.</para>
422 <para>This section on fsck advice only applies to the inode-based
423 fileserver binaries. On servers using namei-based binaries, the
424 vendor-supplied fsck can be used as normal.</para>
427 <para>If you are using AFS fileserver binaries compiled with the
428 inode-based format, never run the standard UNIX <emphasis
429 role="bold">fsck</emphasis> command on an AFS file server
430 machine. It does not understand how the File Server organizes volume
431 data on disk, and so moves all AFS data into the <emphasis
432 role="bold">lost+found</emphasis> directory on the partition.</para>
434 <para>Instead, use the version of the <emphasis
435 role="bold">fsck</emphasis> program that is included in the AFS
436 distribution. The <emphasis>OpenAFS Quick Start Guide</emphasis>
437 explains how to replace the vendor-supplied <emphasis
438 role="bold">fsck</emphasis> program with the AFS version as you
439 install each server machine.</para>
441 <para>The AFS version functions like the standard <emphasis
442 role="bold">fsck</emphasis> program on data stored on both UFS and
443 AFS partitions. The appearance of a banner like the following as the
444 <emphasis role="bold">fsck</emphasis> program initializes confirms
445 that you are running the correct one:</para>
448 --- AFS (R) version fsck---
451 <para>where <emphasis>version</emphasis> is the AFS version. For
452 correct results, it must match the AFS version of the server
453 binaries in use on the machine.</para>
455 <para>If you ever accidentally run the standard version of the
456 program, contact your AFS support provider, contact the OpenAFS
457 mailing lists, or refer to the <ulink
458 url="http://www.openafs.org/support.html">OpenAFS support web
459 page</ulink> for support options. It is sometimes possible to
460 recover volume data from the <emphasis
461 role="bold">lost+found</emphasis> directory. If the data is not
462 recoverabled, then restoring from backup is recommended.</para>
465 <para>Running the fsck binary supplied by the operating system
466 vendor on an fileserver using inode-based file storage will result
467 in data corruption!</para>
472 <title>Creating Hard Links</title>
475 <primary>hard link</primary>
477 <secondary>AFS restrictions on</secondary>
481 <primary>restrictions</primary>
483 <secondary>on hard links in AFS</secondary>
486 <para>AFS does not allow hard links (created with the UNIX <emphasis
487 role="bold">ln</emphasis> command) between files that reside in
488 different directories, because in that case it is unclear which of
489 the directory's ACLs to associate with the link.</para>
491 <para>AFS also does not allow hard links to directories, in order to
492 keep the file system organized as a tree.</para>
494 <para>It is possible to create symbolic links (with the UNIX
495 <emphasis role="bold">ln -s</emphasis> command) between elements in
496 two different AFS directories, or even between an element in AFS and
497 one in a machine's local UNIX file system. Do not create a symbolic
498 link in AFS to a file whose name begins with either a number sign
499 (<emphasis role="bold">#</emphasis>) or a percent sign (<emphasis
500 role="bold">%</emphasis>), however. The Cache Manager interprets
501 such links as a mount point to a regular or read/write volume,
506 <title>AFS Implements Save on Close</title>
509 <primary>fsync system call</primary>
511 <secondary>for files saved on AFS client</secondary>
515 <primary>close system call</primary>
517 <secondary>for files saved on AFS client</secondary>
521 <primary>write</primary>
523 <secondary>system call for files saved on AFS client</secondary>
526 <para>When an application issues the UNIX <emphasis
527 role="bold">close</emphasis> system call on a file, the Cache
528 Manager performs a synchronous write of the data to the File Server
529 that maintains the central copy of the file. It does not return
530 control to the application until the File Server has acknowledged
531 receipt of the data. For the <emphasis role="bold">fsync</emphasis>
532 system call, control does not return to the application until the
533 File Server indicates that it has written the data to non-volatile
534 storage on the file server machine.</para>
536 <para>When an application issues the UNIX <emphasis
537 role="bold">write</emphasis> system call, the Cache Manager writes
538 modifications to the local AFS client cache only. If the local
539 machine crashes or an application program exits without issuing the
540 <emphasis role="bold">close</emphasis> system call, it is possible
541 that the modifications are not recorded in the central copy of the
542 file maintained by the File Server. The Cache Manager does sometimes
543 write this type of modified data from the cache to the File Server
544 without receiving the <emphasis role="bold">close</emphasis> or
545 <emphasis role="bold">fsync</emphasis> system call, such as when it
546 needs to free cache chunks for new data. However, it is not
547 generally possible to predict when the Cache Manager transfers
548 modified data to the File Server in this way.</para>
550 <para>The implication is that if an application's <emphasis
551 role="bold">Save</emphasis> option invokes the <emphasis
552 role="bold">write</emphasis> system call rather than <emphasis
553 role="bold">close</emphasis> or <emphasis
554 role="bold">fsync</emphasis>, the changes are not necessarily stored
555 permanently on the File Server machine. Most application programs
556 issue the <emphasis role="bold">close</emphasis> system call for
557 save operations, as well as when they finish handling a file and
558 when they exit.</para>
561 <sect2 id="Header_41">
562 <title>Setuid Programs</title>
565 <primary>setuid programs</primary>
567 <secondary>restrictions on</secondary>
570 <para>The UNIX setuid bit is ignored by default for programs run
571 from AFS, but can be enabled by the system administrator on a client
572 machine. The <emphasis role="bold">fs setcell</emphasis> command
573 determines whether setuid programs that originate in a particular
574 cell can run on a given client machine. Running setuid binaries from
575 AFS poses a security risk due to weaknesses in the integrity checks
576 of the AFS protocol and should normally not be permitted. See <link
577 linkend="HDRWQ409">Determining if a Client Can Run Setuid
578 Programs</link>.</para>
580 <para>Set the UNIX setuid bit only for files whose owner is UID 0
581 (the local superuser <emphasis role="bold">root</emphasis>). This
582 does not present an automatic security risk: the local superuser has
583 no special privilege in AFS, but only in the local machine's UNIX
584 file system and kernel. Setting the UNIX setuid bit for files owned
585 with a different UID will have unpredictable resuilts, since that
586 UID will be interpreted as possibly different users on each AFS
587 client machine.</para>
589 <para>Any file can be marked with the setuid bit, but only members
590 of the <emphasis role="bold">system:administrators</emphasis> group
591 can issue the <emphasis role="bold">chown</emphasis> system call or
592 the <emphasis role="bold">chown</emphasis> command, or issue the
593 <emphasis role="bold">chmod</emphasis> system call or the <emphasis
594 role="bold">chmod</emphasis> command to set the setuid bit.</para>
599 <title>Choosing a Cell Name</title>
602 <primary>cell</primary>
604 <secondary>name</secondary>
606 <tertiary>choosing</tertiary>
610 <primary>choosing</primary>
612 <secondary>name</secondary>
614 <tertiary>cell</tertiary>
618 <primary>conventions</primary>
620 <secondary>cell name</secondary>
624 <primary>Internet</primary>
626 <secondary>conventions for cell name</secondary>
629 <para>This section explains how to choose a cell name and explains why
630 choosing an appropriate cell name is important.</para>
632 <para>Your cell name must distinguish your cell from all others in the
633 AFS global namespace. By convention, the cell name is the second
634 element in any AFS pathname; therefore, a unique cell name guarantees
635 that every AFS pathname uniquely identifies a file, even if cells use
636 the same directory names at lower levels in their local AFS
637 filespace. For example, both the Example Corporation cell and the Example
638 Organization cell can have a home directory for the user <emphasis
639 role="bold">pat</emphasis>, because the pathnames are distinct:
640 <emphasis role="bold">/afs/example.com/usr/pat</emphasis> and <emphasis
641 role="bold">/afs/example.org/usr/pat</emphasis>.</para>
643 <para>By convention, cell names follow the Domain Name System (DNS)
644 conventions for domain names. If you are already an Internet site,
645 then it is simplest and strongly recommended to choose your Internet
646 domain name as the cell name.</para>
648 <para>If you are not an Internet site, it is best to choose a unique
649 DNS-style name, particularly if you plan to connect to the Internet in
650 the future. There are a few constraints on AFS cell names:
653 <para>It can contain as many as 64 characters, but shorter names
654 are better because the cell name frequently is part of machine
655 and file names. If your cell name is long, you can reduce
656 pathname length either by creating a symbolic link to the
657 complete cell name, at the second level in your file tree or by
658 using the <emphasis role="bold">CellAlias</emphasis>
659 configuration file on a client machine. See <link
660 linkend="HDRWQ42">The Second (Cellname) Level</link>.</para>
664 <para>To guarantee it is suitable for different operating system
665 types, the cell name can contain only lowercase characters,
666 numbers, underscores, dashes, and periods. Do not include
667 command shell metacharacters.</para>
671 <para>It can include any number of fields, which are
672 conventionally separated by periods (see the examples
678 <sect2 id="Header_43">
679 <title>How to Set the Cell Name</title>
682 <primary>setting</primary>
683 <secondary>cell name</secondary>
687 <primary>cell</primary>
688 <secondary>name</secondary>
689 <tertiary>setting</tertiary>
693 <primary>server machine</primary>
694 <secondary>setting home cell</secondary>
698 <primary>client machine</primary>
699 <secondary>setting home cell</secondary>
702 <para>The cell name is recorded in two files on the local disk of
703 each file server and client machine. Among other functions, these
704 files define the machine's cell membership and so affect how
705 programs and processes run on the machine; see <link
706 linkend="HDRWQ35">Why Choosing the Appropriate Cell Name is
707 Important</link>. The procedure for setting the cell name is
708 different for the two types of machines.</para>
710 <para>For file server machines, the two files that record the cell
711 name are the <emphasis role="bold">/usr/afs/etc/ThisCell</emphasis>
712 and <emphasis role="bold">/usr/afs/etc/CellServDB</emphasis>
713 files. As described more explicitly in the <emphasis>OpenAFS Quick
714 Start Guide</emphasis>, you set the cell name in both by issuing the
715 <emphasis role="bold">bos setcellname</emphasis> command on the
716 first file server machine you install in your cell. It is not
717 usually necessary to issue the command again. If you use the Update
718 Server, it distributes its copy of the <emphasis
719 role="bold">ThisCell</emphasis> and <emphasis
720 role="bold">CellServDB</emphasis> files to additional server
721 machines that you install. If you do not use the Update Server, the
722 <emphasis>OpenAFS Quick Start Guide</emphasis> explains how to copy
723 the files manually.</para>
725 <para>For client machines, the two files that record the cell name
726 are the <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and
727 <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> files. You
728 create these files on a per-client basis, either with a text editor
729 or by copying them onto the machine from a central source in AFS.
730 See <link linkend="HDRWQ406">Maintaining Knowledge of Database
731 Server Machines</link> for details.</para>
733 <para>Change the cell name in these files only when you want to
734 transfer the machine to a different cell (client machines can only
735 have one default cell at a time and server machines can only belong
736 to one cell at a time). If the machine is a file server, follow the
737 complete set of instructions in the <emphasis>OpenAFS Quick Start
738 Guide</emphasis> for configuring a new cell. If the machine is a
739 client, all you need to do is change the files appropriately and
740 reboot the machine. The next section explains further the negative
741 consequences of changing the name of an existing cell.</para>
743 <para>To set the default cell name used by most AFS commands without
744 changing the local <emphasis
745 role="bold">/usr/vice/etc/ThisCell</emphasis> file, set the AFSCELL
746 environment variable in the command shell. It is worth setting this
747 variable if you need to complete significant administrative work in
748 a foreign cell.</para>
751 <para>The <emphasis role="bold">fs checkservers</emphasis> and
752 <emphasis role="bold">fs mkmount</emphasis> commands do not use
753 the AFSCELL variable. The <emphasis role="bold">fs
754 checkservers</emphasis> command always defaults to the cell named
755 in the <emphasis role="bold">ThisCell</emphasis> file, unless the
756 <emphasis role="bold">-cell</emphasis> argument is used. The
757 <emphasis role="bold">fs mkmount</emphasis> command defaults to
758 the cell in which the parent directory of the new mount point
764 <title>Why Choosing the Appropriate Cell Name is Important</title>
767 <primary>ThisCell file (client)</primary>
768 <secondary>how used by programs</secondary>
771 <para>Take care to select a cell name that is suitable for long-term
772 use. Changing a cell name later is complicated. An appropriate cell
773 name is important because it is the second element in the pathname
774 of all files in a cell's file tree. Because each cell name is
775 unique, its presence in an AFS pathname makes the pathname unique in
776 the AFS global namespace, even if multiple cells use similar
777 filespace organization at lower levels. For instance, it means that
778 every cell can have a home directory called <emphasis
779 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
780 role="bold">/usr/pat</emphasis> without causing a conflict. The
781 presence of the cell name in pathnames also means that users in
782 every cell use the same pathname to access a file, whether the file
783 resides in their local cell or in a foreign cell.</para>
785 <para>Another reason to choose the correct cell name early in the
786 process of installing your cell is that the cell membership defined
787 in each machine's <emphasis role="bold">ThisCell</emphasis> file
788 affects the performance of many programs and processes running on
789 the machine. For instance, AFS commands (<emphasis
790 role="bold">fs</emphasis>, <emphasis role="bold">pts</emphasis>, and
791 <emphasis role="bold">vos</emphasis> commands, for example) by
792 default execute in the cell of the machine on which they are
793 issued. The command interpreters check the <emphasis
794 role="bold">ThisCell</emphasis> file on the local disk and then
795 contact the database server machines listed in the <emphasis
796 role="bold">CellServDB</emphasis> file or configured in DNS for the
797 indicated cell. (The <emphasis role="bold">bos</emphasis> commands
798 work differently because the issuer always has to name of the
799 machine on which to run the command.)</para>
801 <para>The <emphasis role="bold">ThisCell</emphasis> file also
802 normally determines the cell for which a user receives an AFS token
803 when he or she logs in to a machine.</para>
805 <para>If you change the cell name, you must change the <emphasis
806 role="bold">ThisCell</emphasis> and <emphasis
807 role="bold">CellServDB</emphasis> files on every server and client
808 machine. Failure to change them all will cause many commands from
809 the AFS suites to not work as expected.</para>
814 <title>Participating in the AFS Global Namespace</title>
817 <primary>participation</primary>
818 <secondary>in AFS global namespace</secondary>
822 <primary>AFS</primary>
823 <secondary>global namespace</secondary>
827 <primary>global namespace</primary>
830 <para>Participating in the AFS global namespace makes your cell's
831 local file tree visible to AFS users in foreign cells and makes other
832 cells' file trees visible to your local users. It makes file sharing
833 across cells just as easy as sharing within a cell. This section
834 outlines the procedures necessary for participating in the global
838 <para>Participation in the global namespace is not
839 mandatory. Some cells use AFS primarily to facilitate file
840 sharing within the cell, and are not interested in providing
841 their users with access to foreign cells.</para>
845 <para>Making your file tree visible does not mean making it
846 vulnerable. You control how foreign users access your cell using
847 the same protection mechanisms that control local users'
848 access. See <link linkend="HDRWQ40">Granting and Denying Foreign
849 Users Access to Your Cell</link>.</para>
853 <para>The two aspects of participation are independent. A cell
854 can make its file tree visible without allowing its users to see
855 foreign cells' file trees, or can enable its users to see other
856 file trees without advertising its own.</para>
860 <para>You make your cell visible to others by advertising your
861 database server machines and allowing users at other sites to
862 access your database server and file server machines. See <link
863 linkend="HDRWQ38">Making Your Cell Visible to
864 Others</link>.</para>
868 <para>You control access to foreign cells on a per-client
869 machine basis. In other words, it is possible to make a foreign
870 cell accessible from one client machine in your cell but not
871 another. See <link linkend="HDRWQ39">Making Other Cells Visible
872 in Your Cell</link>.</para>
878 <title>What the Global Namespace Looks Like</title>
881 <primary>conventions</primary>
882 <secondary>AFS pathnames</secondary>
886 <primary>AFS</primary>
887 <secondary>root directory (/afs)</secondary>
888 <tertiary>on client machine</tertiary>
892 <primary>directories</primary>
893 <secondary>/afs</secondary>
897 <primary>directories</primary>
898 <secondary>/afs/<emphasis>cellname</emphasis></secondary>
902 <primary>cell</primary>
903 <secondary>name</secondary>
904 <tertiary>at second level in file tree</tertiary>
907 <para>The AFS global namespace appears the same to all AFS cells
908 that participate in it, because they all agree to follow a small set
909 of conventions in constructing pathnames.</para>
911 <para>The first convention is that all AFS pathnames begin with the
912 string <emphasis role="bold">/afs</emphasis> to indicate that they
913 belong to the AFS global namespace.</para>
915 <para>The second convention is that the cell name is the second
916 element in an AFS pathname; it indicates where the file resides
917 (that is, the cell in which a file server machine houses the
918 file). As noted, the presence of a cell name in pathnames makes the
919 global namespace possible, because it guarantees that all AFS
920 pathnames are unique even if cells use the same directory names at
921 lower levels in their AFS filespace.</para>
923 <para>What appears at the third and lower levels in an AFS pathname
924 depends on how a cell has chosen to arrange its filespace. There
925 are some suggested conventional directories at the third level; see
926 <link linkend="HDRWQ43">The Third Level</link>.</para>
930 <title>Making Your Cell Visible to Others</title>
933 <primary>cell</primary>
934 <secondary>making local visible to foreign</secondary>
938 <primary>local cell</primary>
939 <secondary>making visible to foreign cells</secondary>
943 <primary>foreign cell</primary>
944 <secondary>making local cell visible</secondary>
947 <para>You make your cell visible to others by advertising your cell
948 name and database server machines. Just like client machines in the
949 local cell, the Cache Manager on machines in foreign cells use the
950 information to reach your cell's Volume Location (VL) Servers when
951 they need volume and file location information. For authenticated
952 access, foreign clients must be configured with the necessary
953 Kerberos version 5 domain-to-realm mappings and Key Distribution
954 Center (KDC) location information for both the local and remote
955 Kerberos version 5 realms.</para>
957 <para>There are two places you can make this information available:
960 <primary>files</primary>
962 <secondary>global CellServDB</secondary>
966 <primary>CellServDB file maintained by the AFS
969 <secondary>as global update source</secondary>
973 <para>In the global <emphasis
974 role="bold">CellServDB</emphasis> file maintained by the AFS
975 Registrar. This file lists the name and database server
976 machines of every cell that has agreed to make this
977 information available to other cells. This file is available
979 url="http://grand.central.org/csdb.html">http://grand.central.org/csdb.html</ulink></para>
981 <para>To add or change your cell's listing in this file,
982 follow the instructions at <ulink
983 url="http://grand.central.org/csdb.html">http://grand.central.org/csdb.html</ulink>.
984 It is a good policy to check the file for changes on a
985 regular schedule. An updated copy of this file is included
986 with new releases of OpenAFS.</para>
989 <primary>files</primary>
991 <secondary>CellServDB.local</secondary>
995 <primary>CellServDB.local file</primary>
1000 <para>A file called <emphasis
1001 role="bold">CellServDB.local</emphasis> in the <emphasis
1002 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1003 role="bold">/service/etc</emphasis> directory of your cell's
1004 filespace. List only your cell's database server
1010 <para>Update the files whenever you change the identity of your
1011 cell's database server machines. Also update the copies of the
1012 <emphasis role="bold">CellServDB</emphasis> files on all of your
1013 server machines (in the <emphasis
1014 role="bold">/usr/afs/etc</emphasis> directory) and client machines
1015 (in the <emphasis role="bold">/usr/vice/etc</emphasis>
1016 directory). For instructions, see <link
1017 linkend="HDRWQ118">Maintaining the Server CellServDB File</link> and
1018 <link linkend="HDRWQ406">Maintaining Knowledge of Database Server
1019 Machines</link>.</para>
1021 <para>Once you have advertised your database server machines, it can
1022 be difficult to make your cell invisible again. You can remove the
1023 <emphasis role="bold">CellServDB.local</emphasis> file and ask the
1024 AFS Registrar to remove your entry from the global <emphasis
1025 role="bold">CellServDB</emphasis> file, but other cells probably
1026 have an entry for your cell in their local <emphasis
1027 role="bold">CellServDB</emphasis> files already. To make those
1028 entries invalid, you must change the names or IP addresses of your
1029 database server machines.</para>
1031 <para>Your cell does not have to be invisible to be inaccessible,
1032 however. To make your cell completely inaccessible to foreign users,
1033 remove the <emphasis role="bold">system:anyuser</emphasis> group
1034 from all ACLs at the top three levels of your filespace; see <link
1035 linkend="HDRWQ40">Granting and Denying Foreign Users Access to Your
1039 <primary>cell</primary>
1041 <secondary>making foreign visible to local</secondary>
1045 <primary>local cell</primary>
1047 <secondary>making foreign cells visible in</secondary>
1051 <primary>foreign cell</primary>
1053 <secondary>making visible in local cell</secondary>
1057 <primary>client machine</primary>
1059 <secondary>making foreign cell visible</secondary>
1063 <sect2 id="HDRWQ39">
1064 <title>Making Other Cells Visible in Your Cell</title>
1066 <para>To make a foreign cell's filespace visible on a client machine
1067 in your cell that is not configured for <emphasis
1068 role="bold">Freelance Mode</emphasis> or <emphasis
1069 role="bold">Dynamic Root</emphasis> mode, perform the following
1073 <para>Mount the cell's <emphasis
1074 role="bold">root.cell</emphasis> volume at the second level in
1075 your cell's filespace just below the <emphasis
1076 role="bold">/afs</emphasis> directory. Use the <emphasis
1077 role="bold">fs mkmount</emphasis> command with the <emphasis
1078 role="bold">-cell</emphasis> argument as instructed in <link
1079 linkend="HDRWQ213">To create a cellular mount
1080 point</link>.</para>
1084 <para>Mount AFS at the <emphasis role="bold">/afs</emphasis>
1085 directory on the client machine. The <emphasis
1086 role="bold">afsd</emphasis> program, which initializes the
1087 Cache Manager, performs the mount automatically at the
1088 directory named in the first field of the local <emphasis
1089 role="bold">/usr/vice/etc/cacheinfo</emphasis> file or by the
1090 command's <emphasis role="bold">-mountdir</emphasis>
1091 argument. Mounting AFS at an alternate location makes it
1092 impossible to reach the filespace of any cell that mounts its
1093 <emphasis role="bold">root.afs</emphasis> and <emphasis
1094 role="bold">root.cell</emphasis> volumes at the conventional
1095 locations. See <link linkend="HDRWQ395">Displaying and Setting
1096 the Cache Size and Location</link>.</para>
1100 <para>Create an entry for the cell in the list of database
1101 server machines which the Cache Manager maintains in kernel
1105 role="bold">/usr/vice/etc/CellServDB</emphasis> file on every
1106 client machine's local disk lists the database server machines
1107 for the local and foreign cells. The <emphasis
1108 role="bold">afsd</emphasis> program reads the contents of the
1109 <emphasis role="bold">CellServDB</emphasis> file into kernel
1110 memory as it initializes the Cache Manager. You can also use
1111 the <emphasis role="bold">fs newcell</emphasis> command to add
1112 or alter entries in kernel memory directly between reboots of
1113 the machine. See <link linkend="HDRWQ406">Maintaining
1114 Knowledge of Database Server Machines</link>.</para>
1119 <para>Non-windows client machines may enable <emphasis
1120 role="bold">Dynamic Root Mode</emphasis> by using the <emphasis
1121 role="bold">-dynroot</emphasis> option to <emphasis
1122 role="bold">afsd</emphasis>. When this option is enabled, all cells
1123 listed in the <emphasis role="bold">CellServDB</emphasis> file will
1124 appear in the <emphasis role="bold">/afs</emphasis> directory. The
1125 contents of the <emphasis role="bold">root.afs</emphasis> volume
1126 will be ignored. </para>
1128 <para>Windows client machines may enable <emphasis
1129 role="bold">Freelance Mode</emphasis> during client installation or
1130 by setting the <emphasis role="bold">FreelanceClient</emphasis>
1131 setting under <emphasis role="bold">Service Parameters</emphasis> in
1132 the Windows Registry as mentioned in the <ulink
1133 url="http://docs.openafs.org/ReleaseNotesWindows/">Release
1134 Notes</ulink>. When this option is enabled, the <emphasis
1135 role="bold">root.afs</emphasis> volume is ignored and a mounpoint
1136 for each cell is automatically created in the the <emphasis
1137 role="bold">\\AFS</emphasis> directory when the folder <emphasis
1138 role="bold">\\AFS\<replaceable>cellname</replaceable></emphasis> is
1139 accessed and the foreign Volume Location servers can be reached.
1140 </para> <para>Note that making a foreign cell visible to client
1141 machines does not guarantee that your users can access its
1142 filespace. The ACLs in the foreign cell must also grant them the
1143 necessary permissions.</para>
1146 <primary>cell</primary>
1148 <secondary>granting local access to foreign users</secondary>
1152 <primary>local cell</primary>
1154 <secondary>granting foreign users access to</secondary>
1158 <sect2 id="HDRWQ40">
1159 <title>Granting and Denying Foreign Users Access to Your
1162 <para>Making your cell visible in the AFS global namespace does not
1163 take away your control over the way in which users from foreign
1164 cells access your file tree.</para>
1166 <para>By default, foreign users access your cell as the user
1167 <emphasis role="bold">anonymous</emphasis>, which means they have
1168 only the permissions granted to the <emphasis
1169 role="bold">system:anyuser</emphasis> group on each directory's
1170 ACL. Normally these permissions are limited to the <emphasis
1171 role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>)
1172 and <emphasis role="bold">r</emphasis> (<emphasis
1173 role="bold">read</emphasis>) permissions.</para>
1175 <para>There are three ways to grant wider access to foreign users:
1178 <para>Grant additional permissions to the <emphasis
1179 role="bold">system:anyuser</emphasis> group on certain
1180 ACLs. Keep in mind, however, that all users can then access
1181 that directory in the indicated way (not just specific foreign
1182 users you have in mind).</para>
1186 <para>Enable automatic registration for users in the foreign
1187 cell. This may be done by creating a cross-realm trust in the
1188 <emphasis role="bold">Kerberos Database</emphasis>. Then add a
1189 PTS group named <emphasis
1190 role="bold">system:authuser<replaceable>@FOREIGN.REALM</replaceable></emphasis>
1191 and give it a group quota greater than the number of foreign
1192 users expected to be registered. After the cross-realm trust
1193 and the PTS group are created, the <ulink
1194 url="http://docs.openafs.org/Reference/1/aklog.html">aklog</ulink>
1195 command will automatically register foreign users as
1196 needed. Consult the documentation for your <emphasis
1197 role="bold">Kerberos Server</emphasis> for instructions on how
1198 to establish a cross-realm trust. </para>
1202 <para>Create a local authentication account for specific
1203 foreign users, by creating entries in the Protection Database,
1204 the Kerberos Database, and the local password file.</para>
1210 <primary>cell</primary>
1212 <secondary>filespace configuration issues</secondary>
1216 <primary>configuring</primary>
1218 <secondary>filespace, issues</secondary>
1222 <primary>file tree</primary>
1224 <secondary>conventions</secondary>
1226 <tertiary>for configuring</tertiary>
1231 <sect1 id="HDRWQ41">
1232 <title>Configuring Your AFS Filespace</title>
1234 <para>This section summarizes the issues to consider when configuring
1235 your AFS filespace. For a discussion of creating volumes that
1236 correspond most efficiently to the filespace's directory structure,
1237 see <link linkend="HDRWQ44">Creating Volumes to Simplify
1238 Administration</link>.</para>
1241 <para><emphasis role="bold">For Windows users:</emphasis> Windows
1242 uses a backslash (<emphasis role="bold">\</emphasis>) rather than a
1243 forward slash (<emphasis role="bold">/</emphasis>) to separate the
1244 elements in a pathname. The hierarchical organization of the
1245 filespace is however the same as on a UNIX machine.</para>
1248 <para>AFS pathnames must follow a few conventions so the AFS global
1249 namespace looks the same from any AFS client machine. There are
1250 corresponding conventions to follow in building your file tree, not
1251 just because pathnames reflect the structure of a file tree, but also
1252 because the AFS Cache Manager expects a certain configuration.</para>
1255 <primary>AFS</primary>
1257 <secondary>root directory (/afs)</secondary>
1259 <tertiary>in cell filespace</tertiary>
1263 <primary>directories</primary>
1265 <secondary>/afs</secondary>
1268 <sect2 id="Header_51">
1269 <title>The Top /afs Level</title>
1271 <para>The first convention is that the top level in your file tree
1272 be called the <emphasis role="bold">/afs</emphasis> directory. If
1273 you name it something else, then you must use the <emphasis
1274 role="bold">-mountdir</emphasis> argument with the <emphasis
1275 role="bold">afsd</emphasis> program to get Cache Managers to mount
1276 AFS properly. You cannot participate in the AFS global namespace in
1280 <primary>cell</primary>
1282 <secondary>name</secondary>
1284 <tertiary>at second level in file tree</tertiary>
1288 <primary>directories</primary>
1290 <secondary>/afs/<emphasis>cellname</emphasis></secondary>
1294 <primary>symbolic link</primary>
1296 <secondary>at second level of AFS pathname</secondary>
1300 <sect2 id="HDRWQ42">
1301 <title>The Second (Cellname) Level</title>
1303 <para>The second convention is that just below the <emphasis
1304 role="bold">/afs</emphasis> directory you place directories
1305 corresponding to each cell whose file tree is visible and accessible
1306 from the local cell. Minimally, there must be a directory for the
1307 local cell. Each such directory is a mount point to the indicated
1308 cell's <emphasis role="bold">root.cell</emphasis> volume. For
1309 example, in the Example Corporation cell, <emphasis
1310 role="bold">/afs/example.com</emphasis> is a mount point for the cell's
1311 own <emphasis role="bold">root.cell</emphasis> volume and <emphasis
1312 role="bold">example.org</emphasis> is a mount point for the Example
1313 Organization cell's <emphasis role="bold">root.cell</emphasis>
1314 volume. The <emphasis role="bold">fs lsmount</emphasis> command
1315 displays the mount points.</para>
1318 % <emphasis role="bold">fs lsmount /afs/example.com</emphasis>
1319 '/afs/example.com' is a mount point for volume '#root.cell'
1320 % <emphasis role="bold">fs lsmount /afs/example.org</emphasis>
1321 '/afs/example.org' is a mount point for volume '#example.org:root.cell'
1324 <para>To reduce the amount of typing necessary in pathnames, you can
1325 create a symbolic link with an abbreviated name to the mount point
1326 of each cell your users frequently access (particularly the home
1327 cell). In the Example Corporation cell, for instance, <emphasis
1328 role="bold">/afs/example</emphasis> is a symbolic link to the <emphasis
1329 role="bold">/afs/example.com</emphasis> mount point, as the <emphasis
1330 role="bold">fs lsmount</emphasis> command reveals.</para>
1333 % <emphasis role="bold">fs lsmount /afs/example</emphasis>
1334 '/afs/example' is a symbolic link, leading to a mount point for volume
1335 '#root.cell' </programlisting>
1338 <primary>file tree</primary>
1340 <secondary>conventions</secondary>
1342 <tertiary>third level</tertiary>
1346 <primary>directories</primary>
1348 <secondary>conventional under /afs/cellname</secondary>
1352 <sect2 id="HDRWQ43">
1353 <title>The Third Level</title>
1355 <para>You can organize the third level of your cell's file tree any
1356 way you wish. The following list describes directories that appear
1357 at this level in the conventional configuration:
1360 <term><emphasis role="bold">common</emphasis></term>
1363 <para>This directory contains programs and files needed by
1364 users working on machines of all system types, such as text
1365 editors, online documentation files, and so on. Its
1366 <emphasis role="bold">/etc</emphasis> subdirectory is a
1367 logical place to keep the central update sources for files
1368 used on all of your cell's client machines, such as the
1369 <emphasis role="bold">ThisCell</emphasis> and <emphasis
1370 role="bold">CellServDB</emphasis> files.</para>
1375 <term><emphasis role="bold">public</emphasis></term>
1378 <para>A directory accessible to anyone who can access your
1379 filespace, because its ACL grants the <emphasis
1380 role="bold">l</emphasis> (<emphasis
1381 role="bold">lookup</emphasis>) and <emphasis
1382 role="bold">r</emphasis> (<emphasis
1383 role="bold">read</emphasis>) permissions to the <emphasis
1384 role="bold">system:anyuser</emphasis> group. It is useful if
1385 you want to enable your users to make selected information
1386 available to everyone, but do not want to grant foreign
1387 users access to the contents of the <emphasis
1388 role="bold">usr</emphasis> directory which houses user home
1389 directories (and is also at this level). It is conventional
1390 to create a subdirectory for each of your cell's
1396 <term><emphasis role="bold">service</emphasis></term>
1399 <para>This directory contains files and subdirectories that
1400 help cells coordinate resource sharing. For a list of the
1401 proposed standard files and subdirectories to create, call
1402 or write to AFS Product Support.</para>
1404 <para>As an example, files that other cells expect to find
1405 in this directory's <emphasis role="bold">etc</emphasis>
1406 subdirectory can include the following: <itemizedlist>
1409 role="bold">CellServDB.export</emphasis>, a list of
1410 database server machines for many cells</para>
1415 role="bold">CellServDB.local</emphasis>, a list of the
1416 cell's own database server machines</para>
1420 <para><emphasis role="bold">passwd</emphasis>, a copy
1421 of the local password file (<emphasis
1422 role="bold">/etc/passwd</emphasis> or equivalent) kept
1423 on the local disk of the cell's client machines</para>
1427 <para><emphasis role="bold">group</emphasis>, a copy
1428 of the local groups file (<emphasis
1429 role="bold">/etc/group</emphasis> or equivalent) kept
1430 on the local disk of the cell's client machines</para>
1438 <term><emphasis>sys_type</emphasis></term>
1441 <para>A separate directory for storing the server and client
1442 binaries for each system type you use in the cell.
1443 Configuration is simplest if you use the system type names
1444 assigned in the AFS distribution, particularly if you wish
1445 to use the <emphasis role="bold">@sys</emphasis> variable in
1446 pathnames (see <link linkend="HDRWQ56">Using the @sys
1447 Variable in Pathnames</link>). The <emphasis>OpenAFS Release
1448 Notes</emphasis> lists the conventional name for each
1449 supported system type.</para>
1451 <para>Within each such directory, create directories named
1452 <emphasis role="bold">bin</emphasis>, <emphasis
1453 role="bold">etc</emphasis>, <emphasis
1454 role="bold">usr</emphasis>, and so on, to store the programs
1455 normally kept in the <emphasis role="bold">/bin</emphasis>,
1456 <emphasis role="bold">/etc</emphasis> and <emphasis
1457 role="bold">/usr</emphasis> directories on a local
1458 disk. Then create symbolic links from the local directories
1459 on client machines into AFS; see <link
1460 linkend="HDRWQ55">Configuring the Local Disk</link>. Even if
1461 you do not choose to use symbolic links in this way, it can
1462 be convenient to have central copies of system binaries in
1463 AFS. If binaries are accidentally removed from a machine,
1464 you can recopy them onto the local disk from AFS rather than
1465 having to recover them from tape</para>
1470 <term><emphasis role="bold">usr</emphasis></term>
1473 <para>This directory contains home directories for your
1474 local users. As discussed in the previous entry for the
1475 <emphasis role="bold">public</emphasis> directory, it is
1476 often practical to protect this directory so that only
1477 locally authenticated users can access it. This keeps the
1478 contents of your user's home directories as secure as
1481 <para>If your cell is quite large, directory lookup can be
1482 slowed if you put all home directories in a single <emphasis
1483 role="bold">usr</emphasis> directory. For suggestions on
1484 distributing user home directories among multiple grouping
1485 directories, see <link linkend="HDRWQ59">Grouping Home
1486 Directories</link>.</para>
1487 </listitem> </varlistentry>
1490 <term><emphasis role="bold">wsadmin</emphasis></term>
1493 <para>This directory contains prototype, configuration and
1494 library files for use with the <emphasis
1495 role="bold">package</emphasis> program. See <link
1496 linkend="HDRWQ419">Configuring Client Machines with the
1497 package Program</link>.</para>
1504 <primary>volume name</primary>
1506 <secondary>conventions for</secondary>
1510 <primary>conventions</primary>
1512 <secondary>volume names</secondary>
1516 <primary>volume</primary>
1518 <secondary>separate for each top level directory</secondary>
1522 <primary>file tree</primary>
1524 <secondary>creating volumes to match top level
1525 directories</secondary>
1530 <sect1 id="HDRWQ44">
1531 <title>Creating Volumes to Simplify Administration</title>
1533 <para>This section discusses how to create volumes in ways that make
1534 administering your system easier.</para>
1536 <para>At the top levels of your file tree (at least through the third
1537 level), each directory generally corresponds to a separate
1538 volume. Some cells also configure the subdirectories of some third
1539 level directories as separate volumes. Common examples are the
1541 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1542 role="bold">/common</emphasis> and <emphasis
1543 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1544 role="bold">/usr</emphasis> directories.</para>
1546 <para>You do not have to create a separate volume for every directory
1547 level in a tree, but the advantage is that each volume tends to be
1548 smaller and easier to move for load balancing. The overhead for a
1549 mount point is no greater than for a standard directory, nor does the
1550 volume structure itself require much disk space. Most cells find that
1551 below the fourth level in the tree, using a separate volume for each
1552 directory is no longer efficient. For instance, while each user's home
1553 directory (at the fourth level in the tree) corresponds to a separate
1554 volume, all of the subdirectories in the home directory normally
1555 reside in the same volume.</para>
1557 <para>Keep in mind that only one volume can be mounted at a given
1558 directory location in the tree. In contrast, a volume can be mounted
1559 at several locations, though this is not recommended because it
1560 distorts the hierarchical nature of the file tree, potentially causing
1564 <primary>volume name</primary>
1566 <secondary>restrictions</secondary>
1570 <primary>restrictions</primary>
1572 <secondary>on volume names</secondary>
1576 <primary>volume name</primary>
1578 <secondary>two required</secondary>
1582 <primary>volume</primary>
1584 <secondary>root (root.afs and root.cell)</secondary>
1588 <primary>root volumes (root.afs and root.cell)</primary>
1591 <sect2 id="Header_55">
1592 <title>Assigning Volume Names</title>
1594 <para>You can name your volumes anything you choose, subject to a
1598 <para>Read/write volume names can be up to 22 characters in
1599 length. The maximum length for volume names is 31 characters,
1600 and there must be room to add the <emphasis
1601 role="bold">.readonly</emphasis> extension on read-only
1606 <para>Do not add the <emphasis
1607 role="bold">.readonly</emphasis> and <emphasis
1608 role="bold">.backup</emphasis> extensions to volume names
1609 yourself, even if they are appropriate. The Volume Server adds
1610 them automatically as it creates a read-only or backup version
1615 <para>There must be volumes named <emphasis
1616 role="bold">root.afs</emphasis> and <emphasis
1617 role="bold">root.cell</emphasis>, mounted respectively at the
1618 top (<emphasis role="bold">/afs</emphasis>) level in the
1619 filespace and just below that level, at the cell's name (for
1620 example, at <emphasis role="bold">/afs/example.com</emphasis> in
1621 the Example Corporation cell).</para>
1623 <para>Deviating from these names only creates confusion and
1624 extra work. Changing the name of the <emphasis
1625 role="bold">root.afs</emphasis> volume, for instance, means
1626 that you must use the <emphasis
1627 role="bold">-rootvol</emphasis> argument to the <emphasis
1628 role="bold">afsd</emphasis> program on every client machine,
1629 to name the alternate volume.</para>
1631 <para>Similarly, changing the <emphasis
1632 role="bold">root.cell</emphasis> volume name prevents users in
1633 foreign cells from accessing your filespace, if the mount
1634 point for your cell in their filespace refers to the
1635 conventional <emphasis role="bold">root.cell</emphasis>
1636 name. Of course, this is one way to make your cell invisible
1637 to other cells.</para>
1642 <para>It is best to assign volume names that indicate the type of
1643 data they contain, and to use similar names for volumes with similar
1644 contents. It is also helpful if the volume name is similar to (or at
1645 least has elements in common with) the name of the directory at
1646 which it is mounted. Understanding the pattern then enables you
1647 accurately to guess what a volume contains and where it is
1650 <para>Many cells find that the most effective volume naming scheme
1651 puts a common prefix on the names of all related volumes. <link
1652 linkend="TBLVOL-PREFIX">Table 1</link> describes the recommended
1653 prefixing scheme.</para>
1655 <table id="TBLVOL-PREFIX" label="1">
1656 <title>Suggested volume prefixes</title>
1659 <colspec colwidth="14*" />
1661 <colspec colwidth="28*" />
1663 <colspec colwidth="22*" />
1665 <colspec colwidth="36*" />
1669 <entry><emphasis role="bold">Prefix</emphasis></entry>
1671 <entry><emphasis role="bold">Contents</emphasis></entry>
1673 <entry><emphasis role="bold">Example Name</emphasis></entry>
1675 <entry><emphasis role="bold">Example Mount
1676 Point</emphasis></entry>
1682 <entry><emphasis role="bold">common.</emphasis></entry>
1684 <entry>popular programs and files</entry>
1686 <entry><emphasis role="bold">common.etc</emphasis></entry>
1689 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1690 role="bold">/common/etc</emphasis></entry>
1694 <entry><emphasis role="bold">src.</emphasis></entry>
1696 <entry>source code</entry>
1698 <entry><emphasis role="bold">src.afs</emphasis></entry>
1701 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1702 role="bold">/src/afs</emphasis></entry>
1706 <entry><emphasis role="bold">proj.</emphasis></entry>
1708 <entry>project data</entry>
1710 <entry><emphasis role="bold">proj.portafs</emphasis></entry>
1713 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1714 role="bold">/proj/portafs</emphasis></entry>
1718 <entry><emphasis role="bold">test.</emphasis></entry>
1720 <entry>testing or other temporary data</entry>
1722 <entry><emphasis role="bold">test.smith</emphasis></entry>
1725 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1726 role="bold">/usr/smith/test</emphasis></entry>
1730 <entry><emphasis role="bold">user.</emphasis></entry>
1732 <entry>user home directory data</entry>
1734 <entry><emphasis role="bold">user.terry</emphasis></entry>
1737 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1738 role="bold">/usr/terry</emphasis></entry>
1742 <entry>sys_type<emphasis role="bold">.</emphasis></entry>
1744 <entry>programs compiled for an operating system
1747 <entry><emphasis role="bold">rs_aix42.bin</emphasis></entry>
1750 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1751 role="bold">/rs_aix42/bin</emphasis></entry>
1757 <para><link linkend="TBLPREFIX-EXAMPLE">Table 2</link> is a more
1758 specific example for a cell's <emphasis
1759 role="bold">rs_aix42</emphasis> system volumes and
1762 <table id="TBLPREFIX-EXAMPLE" label="2">
1763 <title>Example volume-prefixing scheme</title>
1766 <colspec colwidth="14*" />
1768 <colspec colwidth="28*" />
1770 <colspec colwidth="22*" />
1772 <colspec colwidth="36*" />
1776 <entry><emphasis role="bold">Example Name</emphasis></entry>
1778 <entry><emphasis role="bold">Example Mount
1779 Point</emphasis></entry>
1785 <entry><emphasis role="bold">rs_aix42.bin</emphasis></entry>
1788 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1789 role="bold">/rs_aix42/bin</emphasis>, <emphasis
1790 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1791 role="bold">/rs_aix42/bin</emphasis></entry>
1795 <entry><emphasis role="bold">rs_aix42.etc</emphasis></entry>
1798 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1799 role="bold">/rs_aix42/etc</emphasis></entry>
1803 <entry><emphasis role="bold">rs_aix42.usr</emphasis></entry>
1806 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1807 role="bold">/rs_aix42/usr</emphasis></entry>
1812 role="bold">rs_aix42.usr.afsws</emphasis></entry>
1815 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1816 role="bold">/rs_aix42/usr/afsws</emphasis></entry>
1821 role="bold">rs_aix42.usr.lib</emphasis></entry>
1824 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1825 role="bold">/rs_aix42/usr/lib</emphasis></entry>
1830 role="bold">rs_aix42.usr.bin</emphasis></entry>
1833 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1834 role="bold">/rs_aix42/usr/bin</emphasis></entry>
1839 role="bold">rs_aix42.usr.etc</emphasis></entry>
1842 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1843 role="bold">/rs_aix42/usr/etc</emphasis></entry>
1848 role="bold">rs_aix42.usr.inc</emphasis></entry>
1851 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1852 role="bold">/rs_aix42/usr/inc</emphasis></entry>
1857 role="bold">rs_aix42.usr.man</emphasis></entry>
1860 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1861 role="bold">/rs_aix42/usr/man</emphasis></entry>
1866 role="bold">rs_aix42.usr.sys</emphasis></entry>
1869 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1870 role="bold">/rs_aix42/usr/sys</emphasis></entry>
1875 role="bold">rs_aix42.usr.local</emphasis></entry>
1878 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1879 role="bold">/rs_aix42/usr/local</emphasis></entry>
1885 <para>There are several advantages to this scheme:
1888 <para>The volume name is similar to the mount point name in
1889 the filespace. In all of the entries in <link
1890 linkend="TBLPREFIX-EXAMPLE">Table 2</link>, for example, the
1891 only difference between the volume and mount point name is
1892 that the former uses periods as separators and the latter uses
1893 slashes. Another advantage is that the volume name indicates
1894 the contents, or at least suggests the directory on which to
1895 issue the <emphasis role="bold">ls</emphasis> command to learn
1896 the contents.</para>
1900 <para>It makes it easy to manipulate groups of related volumes
1901 at one time. In particular, the <emphasis role="bold">vos
1902 backupsys</emphasis> command's <emphasis
1903 role="bold">-prefix</emphasis> argument enables you to create
1904 a backup version of every volume whose name starts with the
1905 same string of characters. Making a backup version of each
1906 volume is one of the first steps in backing up a volume with
1907 the AFS Backup System, and doing it for many volumes with one
1908 command saves you a good deal of typing. For instructions for
1909 creating backup volumes, see <link linkend="HDRWQ201">Creating
1910 Backup Volumes</link>, For information on the AFS Backup
1911 System, see <link linkend="HDRWQ248">Configuring the AFS
1912 Backup System</link> and <link linkend="HDRWQ283">Backing Up
1913 and Restoring AFS Data</link>.</para>
1917 <para>It makes it easy to group related volumes together on a
1918 partition. Grouping related volumes together has several
1919 advantages of its own, discussed in <link
1920 linkend="HDRWQ49">Grouping Related Volumes on a
1921 Partition</link>.</para>
1927 <primary>volume</primary>
1929 <secondary>grouping related on same partition</secondary>
1933 <primary>disk partition</primary>
1935 <secondary>grouping related volumes on</secondary>
1939 <sect2 id="HDRWQ49">
1940 <title>Grouping Related Volumes on a Partition</title>
1942 <para>If your cell is large enough to make it practical, consider
1943 grouping related volumes together on a partition. In general, you
1944 need at least three file server machines for volume grouping to be
1945 effective. Grouping has several advantages, which are most obvious
1946 when the file server machine becomes inaccessible:
1949 <para>If you keep a hardcopy record of the volumes on a
1950 partition, you know which volumes are unavailable. You can
1951 keep such a record without grouping related volumes, but a
1952 list composed of unrelated volumes is much harder to maintain.
1953 Note that the record must be on paper, because the outage can
1954 prevent you from accessing an online copy or from issuing the
1955 <emphasis role="bold">vos listvol</emphasis> command, which
1956 gives you the same information.</para>
1960 <para>The effect of an outage is more localized. For example,
1961 if all of the binaries for a given system type are on one
1962 partition, then only users of that system type are
1963 affected. If a partition houses binary volumes from several
1964 system types, then an outage can affect more people,
1965 particularly if the binaries that remain available are
1966 interdependent with those that are not available.</para>
1971 <para>The advantages of grouping related volumes on a partition do
1972 not necessarily extend to the grouping of all related volumes on one
1973 file server machine. For instance, it is probably unwise in a cell
1974 with two file server machines to put all system volumes on one
1975 machine and all user volumes on the other. An outage of either
1976 machine probably affects everyone.</para>
1978 <para>Admittedly, the need to move volumes for load balancing
1979 purposes can limit the practicality of grouping related volumes.
1980 You need to weigh the complementary advantages case by case.</para>
1983 <primary>replication</primary>
1985 <secondary>appropriate volumes</secondary>
1989 <primary>volume</primary>
1991 <secondary>type to replicate</secondary>
1995 <primary>volume</primary>
1997 <secondary>where to place replicated</secondary>
2001 <primary>read-only volume</primary>
2003 <secondary>selecting site</secondary>
2007 <sect2 id="HDRWQ50">
2008 <title>When to Replicate Volumes</title>
2010 <para>As discussed in <link linkend="HDRWQ15">Replication</link>,
2011 replication refers to making a copy, or clone, of a read/write
2012 source volume and then placing the copy on one or more additional
2013 file server machines. Replicating a volume can increase the
2014 availability of the contents. If one file server machine housing the
2015 volume becomes inaccessible, users can still access the copy of the
2016 volume stored on a different machine. No one machine is likely to
2017 become overburdened with requests for a popular file, either,
2018 because the file is available from several machines.</para>
2020 <para>However, replication is not appropriate for all cells. If a
2021 cell does not have much disk space, replication can be unduly
2022 expensive, because each clone not on the same partition as the
2023 read/write source takes up as much disk space as its source volume
2024 did at the time the clone was made. Also, if you have only one file
2025 server machine, replication uses up disk space without increasing
2026 availability.</para>
2028 <para>Replication is also not appropriate for volumes that change
2029 frequently. You must issue the <emphasis role="bold">vos
2030 release</emphasis> command every time you need to update a read-only
2031 volume to reflect changes in its read/write source.</para>
2033 <para>For both of these reasons, replication is appropriate only for
2034 popular volumes whose contents do not change very often, such as
2035 system binaries and other volumes mounted at the upper levels of
2036 your filespace. User volumes usually exist only in a read/write
2037 version since they change so often.</para>
2039 <para>If you are replicating any volumes, you must replicate the
2040 <emphasis role="bold">root.afs</emphasis> and <emphasis
2041 role="bold">root.cell</emphasis> volumes, preferably at two or three
2042 sites each (even if your cell only has two or three file server
2043 machines). The Cache Manager needs to pass through the directories
2044 corresponding to the <emphasis role="bold">root.afs</emphasis> and
2045 <emphasis role="bold">root.cell</emphasis> volumes as it interprets
2046 any pathname. The unavailability of these volumes makes all other
2047 volumes unavailable too, even if the file server machines storing
2048 the other volumes are still functioning.</para>
2050 <para>Another reason to replicate the <emphasis
2051 role="bold">root.afs</emphasis> volume is that it can lessen the
2052 load on the File Server machine. The Cache Manager has a bias to
2053 access a read-only version of the <emphasis
2054 role="bold">root.afs</emphasis> volume if it is replicate, which
2055 puts the Cache Manager onto the <emphasis>read-only path</emphasis>
2056 through the AFS filespace. While on the read-only path, the Cache
2057 Manager attempts to access a read-only copy of replicated
2058 volumes. The File Server needs to track only one callback per Cache
2059 Manager for all of the data in a read-only volume, rather than the
2060 one callback per file it must track for read/write volumes. Fewer
2061 callbacks translate into a smaller load on the File Server.</para>
2063 <para>If the <emphasis role="bold">root.afs</emphasis> volume is not
2064 replicated, the Cache Manager follows a read/write path through the
2065 filespace, accessing the read/write version of each volume. The File
2066 Server distributes and tracks a separate callback for each file in a
2067 read/write volume, imposing a greater load on it.</para>
2069 <para>For more on read/write and read-only paths, see <link
2070 linkend="HDRWQ209">The Rules of Mount Point Traversal</link>.</para>
2072 <para>It also makes sense to replicate system binary volumes in many
2073 cases, as well as the volume corresponding to the <emphasis
2074 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
2075 role="bold">/usr</emphasis> directory and the volumes corresponding
2077 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
2078 role="bold">/common</emphasis> directory and its
2079 subdirectories.</para>
2081 <para>It is a good idea to place a replica on the same partition as
2082 the read/write source. In this case, the read-only volume is a clone
2083 (like a backup volume): it is a copy of the source volume's vnode
2084 index, rather than a full copy of the volume contents. Only if the
2085 read/write volume moves to another partition or changes
2086 substantially does the read-only volume consume significant disk
2087 space. Read-only volumes kept on other servers' partitions always
2088 consume the full amount of disk space that the read/write source
2089 consumed when the read-only volume was created.</para>
2091 <para>You cannot have a replica volume on a different partition of
2092 the same server hosting the read/write volume. "Cheap" read-only
2093 volumes must be on the same partition as the read/write; all other
2094 read-only volumes must be on different servers.</para>
2097 <sect2 id="Header_58">
2098 <title>The Default Quota and ACL on a New Volume</title>
2100 <para>Every AFS volume has associated with it a quota that limits
2101 the amount of disk space the volume is allowed to use. To set and
2102 change quota, use the commands described in <link
2103 linkend="HDRWQ234">Setting and Displaying Volume Quota and Current
2106 <para>By default, every new volume is assigned a space quota of 5000
2107 KB blocks unless you include the <emphasis
2108 role="bold">-maxquota</emphasis> argument to the <emphasis
2109 role="bold">vos create</emphasis> command. Also by default, the ACL
2110 on the root directory of every new volume grants all permissions to
2111 the members of the <emphasis
2112 role="bold">system:administrators</emphasis> group. To learn how to
2113 change these values when creating an account with individual
2114 commands, see <link linkend="HDRWQ503">To create one user account
2115 with individual commands</link>. When using <emphasis
2116 role="bold">uss</emphasis> commands to create accounts, you can
2117 specify alternate ACL and quota values in the template file's
2118 <emphasis role="bold">V</emphasis> instruction; see <link
2119 linkend="HDRWQ473">Creating a Volume with the V
2120 Instruction</link>.</para>
2123 <primary>server machine</primary>
2125 <secondary>configuration issues</secondary>
2129 <primary>configuring</primary>
2131 <secondary>file server machine, issues</secondary>
2135 <primary>roles for server machine</primary>
2137 <secondary>summary</secondary>
2141 <primary>server machine</primary>
2143 <secondary>roles for</secondary>
2145 <tertiary>summary</tertiary>
2149 <primary>server machine</primary>
2151 <secondary>first installed</secondary>
2156 <sect1 id="HDRWQ51">
2157 <title>Configuring Server Machines</title>
2159 <para>This section discusses some issues to consider when configuring
2160 server machines, which store AFS data, transfer it to client machines
2161 on request, and house the AFS administrative databases. To learn about
2162 client machines, see <link linkend="HDRWQ54">Configuring Client
2163 Machines</link>.</para>
2165 <para>If your cell has more than one AFS server machine, you can
2166 configure them to perform specialized functions. A machine can assume
2167 one or more of the roles described in the following list. For more
2168 details, see <link linkend="HDRWQ90">The Four Roles for File Server
2172 <para>A <emphasis>simple file server</emphasis> machine runs
2173 only the processes that store and deliver AFS files to client
2174 machines. You can run as many simple file server machines as you
2175 need to satisfy your cell's performance and disk space
2176 requirements.</para>
2180 <para>A <emphasis>database server machine</emphasis> runs the
2181 four database server processes that maintain AFS's replicated
2182 administrative databases: the Authentication, Backup,
2183 Protection, and Volume Location (VL) Server processes.</para>
2187 <para>A <emphasis>binary distribution machine</emphasis>
2188 distributes the AFS server binaries for its system type to all
2189 other server machines of that system type.</para>
2193 <para>The single <emphasis>system control machine</emphasis>
2194 distributes common server configuration files to all other
2195 server machines in the cell.
2201 <para>The <emphasis>OpenAFS Quick Beginnings</emphasis> explains how
2202 to configure your cell's first file server machine to assume all four
2203 roles. The <emphasis>OpenAFS Quick Beginnings</emphasis> chapter on
2204 installing additional server machines also explains how to configure
2205 them to perform one or more roles.</para>
2208 <primary>database server machine</primary>
2210 <secondary>reason to run three</secondary>
2214 <primary>distribution</primary>
2216 <secondary>of databases</secondary>
2220 <primary>databases, distributed</primary>
2224 <primary>distributed databases</primary>
2227 <sect2 id="HDRWQ52">
2228 <title>Replicating the OpenAFS Administrative Databases</title>
2230 <para>The AFS administrative databases are housed on database server
2231 machines and store information that is crucial for correct cell
2232 functioning. Both server processes and Cache Managers access the
2233 information frequently:
2236 <para>Every time a Cache Manager fetches a file from a
2237 directory that it has not previously accessed, it must look up
2238 the file's location in the Volume Location Database
2243 <para>Every time a user obtains an AFS token from the
2244 Authentication Server, the server looks up the user's password
2245 in the Authentication Database.</para>
2249 <para>The first time that a user accesses a volume housed on a
2250 specific file server machine, the File Server contacts the
2251 Protection Server for a list of the user's group memberships
2252 as recorded in the Protection Database.</para>
2256 <para>Every time you back up a volume using the AFS Backup
2257 System, the Backup Server creates records for it in the Backup
2263 <para>Maintaining your cell is simplest if the first machine has the
2264 lowest IP address of any machine you plan to use as a database
2265 server machine. If you later decide to use a machine with a lower IP
2266 address as a database server machine, you must update the <emphasis
2267 role="bold">CellServDB</emphasis> file on all clients before
2268 introducing the new machine.</para>
2270 <para>If your cell has more than one server machine, it is best to
2271 run more than one as a database server machine (but more than three
2272 are rarely necessary). Replicating the administrative databases in
2273 this way yields the same benefits as replicating volumes: increased
2274 availability and reliability. If one database server machine or
2275 process stops functioning, the information in the database is still
2276 available from others. The load of requests for database information
2277 is spread across multiple machines, preventing any one from becoming
2280 <para>Unlike replicated volumes, however, replicated databases do
2281 change frequently. Consistent system performance demands that all
2282 copies of the database always be identical, so it is not acceptable
2283 to record changes in only some of them. To synchronize the copies of
2284 a database, the database server processes use AFS's distributed
2285 database technology, Ubik. See <link linkend="HDRWQ102">Replicating
2286 the OpenAFS Administrative Databases</link>.</para>
2288 <para>If your cell has only one file server machine, it must also
2289 serve as a database server machine. If you cell has two file server
2290 machines, it is not always advantageous to run both as database
2291 server machines. If a server, process, or network failure interrupts
2292 communications between the database server processes on the two
2293 machines, it can become impossible to update the information in the
2294 database because neither of them can alone elect itself as the
2295 synchronization site.</para>
2298 <primary>server machine</primary>
2300 <secondary>protecting directories on local disk</secondary>
2304 <primary>local disk</primary>
2306 <secondary>protecting on file server machine</secondary>
2310 <sect2 id="HDRWQ53">
2311 <title>AFS Files on the Local Disk</title>
2313 <para>It is generally simplest to store the binaries for all AFS
2314 server processes in the <emphasis
2315 role="bold">/usr/afs/bin</emphasis> directory on every file server
2316 machine, even if some processes do not actively run on the
2317 machine. This makes it easier to reconfigure a machine to fill a new
2320 <para>For security reasons, the <emphasis
2321 role="bold">/usr/afs</emphasis> directory on a file server machine
2322 and all of its subdirectories and files must be owned by the local
2323 superuser <emphasis role="bold">root</emphasis> and have only the
2324 first <emphasis role="bold">w</emphasis> (<emphasis
2325 role="bold">write</emphasis>) mode bit turned on. Some files even
2326 have only the first <emphasis role="bold">r</emphasis> (<emphasis
2327 role="bold">read</emphasis>) mode bit turned on (for example, the
2328 <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis> file, which
2329 lists the AFS server encryption keys). Each time the BOS Server
2330 starts, it checks that the mode bits on certain files and
2331 directories match the expected values. For a list, see the
2332 <emphasis>OpenAFS Quick Beginnings</emphasis> section about
2333 protecting sensitive AFS directories, or the discussion of the
2334 output from the <emphasis role="bold">bos status</emphasis> command
2335 in <link linkend="HDRWQ159">To display the status of server
2336 processes and their BosConfig entries</link>.</para>
2338 <para>For a description of the contents of all AFS directories on a
2339 file server machine's local disk, see <link
2340 linkend="HDRWQ80">Administering Server Machines</link>.</para>
2343 <sect2 id="Header_62">
2344 <title>Configuring Partitions to Store AFS Data</title>
2346 <para>The partitions that house AFS volumes on a file server machine
2347 must be mounted at directories named</para>
2350 role="bold">/vicep</emphasis><emphasis>index</emphasis></para>
2352 <para>where <emphasis>index</emphasis> is one or two lowercase
2353 letters. By convention, the first AFS partition created is mounted
2354 at the <emphasis role="bold">/vicepa</emphasis> directory, the
2355 second at the <emphasis role="bold">/vicepb</emphasis> directory,
2356 and so on through the <emphasis role="bold">/vicepz</emphasis>
2357 directory. The names then continue with <emphasis
2358 role="bold">/vicepaa</emphasis> through <emphasis
2359 role="bold">/vicepaz</emphasis>, <emphasis
2360 role="bold">/vicepba</emphasis> through <emphasis
2361 role="bold">/vicepbz</emphasis>, and so on, up to the maximum
2362 supported number of server partitions, which is specified in the
2363 OpenAFS Release Notes.</para>
2365 <para>Each <emphasis role="bold">/vicep</emphasis>x directory must
2366 correspond to an entire partition or logical volume, and must be a
2367 subdirectory of the root directory (/). It is not acceptable to
2368 configure part of (for example) the <emphasis
2369 role="bold">/usr</emphasis> partition as an AFS server partition and
2370 mount it on a directory called <emphasis
2371 role="bold">/usr/vicepa</emphasis>.</para>
2373 <para>Also, do not store non-AFS files on AFS server partitions. The
2374 File Server and Volume Server expect to have available all of the
2375 space on the partition. Sharing space also creates competition
2376 between AFS and the local UNIX file system for access to the
2377 partition, particularly if the UNIX files are frequently
2381 <primary>server machine</primary>
2383 <secondary>monitoring</secondary>
2387 <primary>file server machine</primary>
2389 <secondary>rebooting, about</secondary>
2393 <primary>rebooting</primary>
2395 <secondary>file server machine, limiting</secondary>
2399 <primary>weekly restart of BOS Server (automatic)</primary>
2401 <secondary>about</secondary>
2405 <primary>restart times for BOS Server</primary>
2407 <secondary>about</secondary>
2411 <sect2 id="Header_63">
2412 <title>Monitoring, Rebooting and Automatic Process Restarts</title>
2414 <para>AFS provides several tools for monitoring the File Server,
2415 including the <emphasis role="bold">scout</emphasis> and <emphasis
2416 role="bold">afsmonitor</emphasis> programs. You can configure them
2417 to alert you when certain threshold values are exceeded, for example
2418 when a server partition is more than 95% full. See <link
2419 linkend="HDRWQ323">Monitoring and Auditing AFS
2420 Performance</link>.</para>
2422 <para>Rebooting a file server machine requires shutting down the AFS
2423 processes and so inevitably causes a service outage. Reboot file
2424 server machines as infrequently as possible. For instructions, see
2425 <link linkend="HDRWQ139">Rebooting a Server Machine</link>.</para>
2427 <para>The BOS Server checks each morning at 5:00 a.m. for any newly
2428 installed binary files in the <emphasis
2429 role="bold">/usr/afs/bin</emphasis> directory. It compares the
2430 timestamp on each binary file to the time at which the corresponding
2431 process last restarted. If the timestamp on the binary is later, the
2432 BOS Server restarts the corresponding process to start using
2435 <para>The BOS server also supports performing a weekly restart of
2436 all AFS server processes, including itself. This functionality is
2437 disabled on new installs, but historically it was set to 4:00am on
2438 Sunday. Administrators may find that installations predating OpenAFS
2439 1.6.0 have weekly restarts enabled.</para>
2441 <para>The default times are in the early morning hours when the
2442 outage that results from restarting a process is likely to disturb
2443 the fewest number of people. You can display the restart times for
2444 each machine with the <emphasis role="bold">bos
2445 getrestart</emphasis> command, and set them with the <emphasis
2446 role="bold">bos setrestart</emphasis> command. The latter command
2447 enables you to disable automatic restarts entirely, by setting the
2448 time to <emphasis role="bold">never</emphasis>. See <link
2449 linkend="HDRWQ171">Setting the BOS Server's Restart
2450 Times</link>.</para>
2453 <primary>client machine</primary>
2455 <secondary>configuration issues</secondary>
2459 <primary>configuring</primary>
2461 <secondary>client machine, issues</secondary>
2466 <sect1 id="HDRWQ54">
2467 <title>Configuring Client Machines</title>
2469 <para>This section summarizes issues to consider as you install and
2470 configure client machines in your cell.</para>
2473 <primary>client machine</primary>
2475 <secondary>files required on local disk</secondary>
2479 <primary>local disk</primary>
2481 <secondary>files required on client machine</secondary>
2485 <primary>file</primary>
2487 <secondary>required on client machine local disk</secondary>
2490 <sect2 id="HDRWQ55">
2491 <title>Configuring the Local Disk</title>
2493 <para>You can often free up significant amounts of local disk space
2494 on AFS client machines by storing standard UNIX files in AFS and
2495 creating symbolic links to them from the local disk. The <emphasis
2496 role="bold">@sys</emphasis> pathname variable can be useful in links
2497 to system-specific files; see <link linkend="HDRWQ56">Using the @sys
2498 Variable in Pathnames</link>.</para>
2500 <para>There are two types of files that must actually reside on the
2501 local disk: boot sequence files needed before the <emphasis
2502 role="bold">afsd</emphasis> program is invoked, and files that can
2503 be helpful during file server machine outages.</para>
2505 <para>During a reboot, AFS is inaccessible until the <emphasis
2506 role="bold">afsd</emphasis> program executes and initializes the
2507 Cache Manager. (In the conventional configuration, the AFS
2508 initialization file is included in the machine's initialization
2509 sequence and invokes the <emphasis role="bold">afsd</emphasis>
2510 program.) Files needed during reboot prior to that point must reside
2511 on the local disk. They include the following, but this list is not
2512 necessarily exhaustive.
2515 <para>Standard UNIX utilities including the following or their
2519 <para>Machine initialization files (stored in the
2520 <emphasis role="bold">/etc</emphasis> or <emphasis
2521 role="bold">/sbin</emphasis> directory on many system
2526 <para>The <emphasis role="bold">fstab</emphasis>
2531 <para>The <emphasis role="bold">mount</emphasis> command
2536 <para>The <emphasis role="bold">umount</emphasis>
2537 command binary</para>
2544 <para>All subdirectories and files in the <emphasis
2545 role="bold">/usr/vice</emphasis> directory, including the
2550 role="bold">/usr/vice/cache</emphasis> directory</para>
2555 role="bold">/usr/vice/etc/afsd</emphasis> command
2561 role="bold">/usr/vice/etc/cacheinfo</emphasis> file</para>
2566 role="bold">/usr/vice/etc/CellServDB</emphasis>
2572 role="bold">/usr/vice/etc/ThisCell</emphasis> file</para>
2577 <para>For more information on these files, see <link
2578 linkend="HDRWQ391">Configuration and Cache-Related Files on
2579 the Local Disk</link>.</para>
2584 <para>The other type of files and programs to retain on the local
2585 disk are those you need when diagnosing and fixing problems caused
2586 by a file server outage, because the outage can make inaccessible
2587 the copies stored in AFS. Examples include the binaries for a text
2588 editor (such as <emphasis role="bold">ed</emphasis> or <emphasis
2589 role="bold">vi</emphasis>) and for the <emphasis
2590 role="bold">fs</emphasis> and <emphasis role="bold">bos</emphasis>
2591 commands. Store copies of AFS command binaries in the <emphasis
2592 role="bold">/usr/vice/etc</emphasis> directory as well as including
2593 them in the <emphasis role="bold">/usr/afsws</emphasis> directory,
2594 which is normally a link into AFS. Then place the <emphasis
2595 role="bold">/usr/afsws</emphasis> directory before the <emphasis
2596 role="bold">/usr/vice/etc</emphasis> directory in users'
2597 <envar>PATH</envar> environment variable definition. When AFS is
2598 functioning normally, users access the copy in the <emphasis
2599 role="bold">/usr/afsws</emphasis> directory, which is more likely to
2600 be current than a local copy.</para>
2602 <para>You can automate the configuration of client machine local
2603 disks by using the <emphasis role="bold">package</emphasis> program,
2604 which updates the contents of the local disk to match a
2605 configuration file. See <link linkend="HDRWQ419">Configuring Client
2606 Machines with the package Program</link>.</para>
2609 <sect2 id="Header_66">
2610 <title>Enabling Access to Foreign Cells</title>
2613 <primary>client machine</primary>
2615 <secondary>enabling access to foreign cell</secondary>
2618 <para>As detailed in <link linkend="HDRWQ39">Making Other Cells
2619 Visible in Your Cell</link>, you enable the Cache Manager to access
2620 a cell's AFS filespace by storing a list of the cell's database
2621 server machines in the local <emphasis
2622 role="bold">/usr/vice/etc/CellServDB</emphasis> file. The Cache
2623 Manager reads the list into kernel memory at reboot for faster
2624 retrieval. You can change the list in kernel memory between reboots
2625 by using the <emphasis role="bold">fs newcell</emphasis> command. It
2626 is often practical to store a central version of the <emphasis
2627 role="bold">CellServDB</emphasis> file in AFS and use the <emphasis
2628 role="bold">package</emphasis> program periodically to update each
2629 client's version with the source copy. See <link
2630 linkend="HDRWQ406">Maintaining Knowledge of Database Server
2631 Machines</link>.</para>
2633 <para>Because each client machine maintains its own copy of the
2634 <emphasis role="bold">CellServDB</emphasis> file, you can in theory
2635 enable access to different foreign cells on different client
2636 machines. This is not usually practical, however, especially if
2637 users do not always work on the same machine.</para>
2640 <primary>at-sys (@sys) variable in pathnames</primary>
2644 <primary>sys (@sys) variable in pathnames</primary>
2648 <primary>variables</primary>
2650 <secondary>@sys in pathnames</secondary>
2654 <sect2 id="HDRWQ56">
2655 <title>Using the @sys Variable in Pathnames</title>
2657 <para>When creating symbolic links into AFS on the local disk, it is
2658 often practical to use the @sys variable in pathnames. The Cache
2659 Manager automatically substitutes the local machine's AFS system
2660 name (CPU/operating system type) for the @sys variable. This means
2661 you can place the same links on machines of various system types and
2662 still have each machine access the binaries for its system type. For
2663 example, the Cache Manager on a machine running AIX 4.2 converts
2664 <emphasis role="bold">/afs/example.com/@sys</emphasis> to <emphasis
2665 role="bold">/afs/example.com/rs_aix42</emphasis>, whereas a machine
2666 running Solaris 10 converts it to <emphasis
2667 role="bold">/afs/example.com/sun4x_510</emphasis>.</para>
2669 <para>If you want to use the @sys variable, it is simplest to use
2670 the conventional AFS system type names as specified in the OpenAFS
2671 Release Notes. The Cache Manager records the local machine's system
2672 type name in kernel memory during initialization. If you do not use
2673 the conventional names, you must use the <emphasis role="bold">fs
2674 sysname</emphasis> command to change the value in kernel memory from
2675 its default just after Cache Manager initialization, on every client
2676 machine of the relevant system type. The <emphasis role="bold">fs
2677 sysname</emphasis> command also displays the current value; see
2678 <link linkend="HDRWQ417">Displaying and Setting the System Type
2681 <para>In pathnames in the AFS filespace itself, use the @sys
2682 variable carefully and sparingly, because it can lead to unexpected
2683 results. It is generally best to restrict its use to only one level
2684 in the filespace. The third level is a common choice, because that
2685 is where many cells store the binaries for different machine
2688 <para>Multiple instances of the @sys variable in a pathname are
2689 especially dangerous to people who must explicitly change
2690 directories (with the <emphasis role="bold">cd</emphasis> command,
2691 for example) into directories that store binaries for system types
2692 other than the machine on which they are working, such as
2693 administrators or developers who maintain those directories. After
2694 changing directories, it is recommended that such people verify they
2695 are in the desired directory.</para>
2698 <sect2 id="Header_68">
2699 <title>Setting Server Preferences</title>
2701 <para>The Cache Manager stores a table of preferences for file
2702 server machines in kernel memory. A preference rank pairs a file
2703 server machine interface's IP address with an integer in the range
2704 from 1 to 65,534. When it needs to access a file, the Cache Manager
2705 compares the ranks for the interfaces of all machines that house the
2706 file, and first attempts to access the file via the interface with
2707 the best rank. As it initializes, the Cache Manager sets default
2708 ranks that bias it to access files via interfaces that are close to
2709 it in terms of network topology. You can adjust the preference ranks
2710 to improve performance if you wish.</para>
2712 <para>The Cache Manager also uses similar preferences for Volume
2713 Location (VL) Server machines. Use the <emphasis role="bold">fs
2714 getserverprefs</emphasis> command to display preference ranks and
2715 the <emphasis role="bold">fs setserverprefs</emphasis> command to
2716 set them. See <link linkend="HDRWQ414">Maintaining Server Preference
2717 Ranks</link>.</para>
2720 <primary>user account</primary>
2722 <secondary>configuration issues</secondary>
2726 <sect1 id="HDRWQ57">
2727 <title>Configuring AFS User Accounts</title>
2729 <para>This section discusses some of the issues to consider when
2730 configuring AFS user accounts. Because AFS is separate from the UNIX
2731 file system, a user's AFS account is separate from her UNIX
2734 <para>The preferred method for creating a user account is with the
2735 <emphasis role="bold">uss</emphasis> suite of commands. With a single
2736 command, you can create all the components of one or many accounts,
2737 after you have prepared a template file that guides the account
2738 creation. See <link linkend="HDRWQ449">Creating and Deleting User
2739 Accounts with the uss Command Suite</link>.</para>
2741 <para>Alternatively, you can issue the individual commands that create
2742 each component of an account. For instructions, along with
2743 instructions for removing user accounts and changing user passwords,
2744 user volume quotas and usernames, see <link
2745 linkend="HDRWQ491">Administering User Accounts</link>.</para>
2747 <para>When users leave your system, it is often good policy to remove
2748 their accounts. Instructions appear in <link
2749 linkend="HDRWQ486">Deleting Individual Accounts with the uss delete
2750 Command</link> and <link linkend="HDRWQ524">Removing a User
2751 Account</link>.</para>
2753 <para>An AFS user account consists of the following components, which
2754 are described in greater detail in <link linkend="HDRWQ494">The
2755 Components of an AFS User Account</link>.
2758 <para>A Protection Database entry</para>
2762 <para>An Authentication Database entry</para>
2766 <para>A volume</para>
2770 <para>A home directory at which the volume is mounted</para>
2774 <para>Ownership of the home directory and full permissions on
2779 <para>An entry in the local password file (<emphasis
2780 role="bold">/etc/passwd</emphasis> or equivalent) of each
2781 machine the user needs to log into</para>
2785 <para>Optionally, standard files and subdirectories that make
2786 the account more useful</para>
2791 <para>By creating some components but not others, you can create
2792 accounts at different levels of functionality, using either <emphasis
2793 role="bold">uss</emphasis> commands as described in <link
2794 linkend="HDRWQ449">Creating and Deleting User Accounts with the uss
2795 Command Suite</link> or individual commands as described in <link
2796 linkend="HDRWQ491">Administering User Accounts</link>. The levels of
2797 functionality include the following
2800 <para>An authentication-only account enables the user to obtain
2801 AFS tokens and so to access protected AFS data and to issue
2802 privileged commands. It consists only of entries in the
2803 Authentication and Protection Database. This type of account is
2804 suitable for administrative accounts and for users from foreign
2805 cells who need to access protected data. Local users generally
2806 also need a volume and home directory.</para>
2810 <para>A basic user account includes a volume for the user, in
2811 addition to Authentication and Protection Database entries. The
2812 volume is mounted in the AFS filespace as the user's home
2813 directory, and provides a repository for the user's personal
2818 <para>A full account adds configuration files for basic
2819 functions such as logging in, printing, and mail delivery to a
2820 basic account, making it more convenient and useful. For a
2821 discussion of some useful types of configuration files, see
2822 <link linkend="HDRWQ60">Creating Standard Files in New AFS
2823 Accounts</link>.</para>
2828 <para>If your users have UNIX user accounts that predate the
2829 introduction of AFS in the cell, you possibly want to convert them
2830 into AFS accounts. There are three main issues to consider:
2833 <para>Making UNIX and AFS UIDs match</para> </listitem>
2836 <para>Setting the password field in the local password file
2837 appropriately</para>
2841 <para>Moving files from the UNIX file system into AFS</para>
2846 <para>For further discussion, see <link linkend="HDRWQ459">Converting
2847 Existing UNIX Accounts with uss</link> or <link
2848 linkend="HDRWQ498">Converting Existing UNIX Accounts</link>.</para>
2851 <primary>username</primary>
2853 <secondary>choosing</secondary>
2857 <primary>user</primary>
2859 <secondary>name</secondary>
2865 <primary>choosing</primary>
2867 <secondary>name</secondary>
2869 <tertiary>user</tertiary>
2873 <primary>anonymous user</primary>
2875 <secondary>AFS UID reserved</secondary>
2879 <primary>AFS UID</primary>
2881 <secondary>reserved</secondary>
2883 <tertiary>anonymous user</tertiary>
2886 <sect2 id="HDRWQ58">
2887 <title>Choosing Usernames and Naming Other Account
2890 <para>This section suggests schemes for choosing usernames, AFS
2891 UIDs, user volume names and mount point names, and also outlines
2892 some restrictions on your choices.</para>
2895 <title>Usernames</title>
2897 <para>AFS imposes very few restrictions on the form of
2898 usernames. It is best to keep usernames short, both because many
2899 utilities and applications can handle usernames of no more than
2900 eight characters and because by convention many components of and
2901 AFS account incorporate the name. These include the entries in the
2902 Protection and Authentication Databases, the volume, and the mount
2903 point. Depending on your electronic mail delivery system, the
2904 username can become part of the user's mailing address. The
2905 username is also the string that the user types when logging in to
2906 a client machine.</para>
2909 <para>Some common choices for usernames are last names, first names,
2910 initials, or a combination, with numbers sometimes added. It is
2911 also best to avoid using the following characters, many of which
2912 have special meanings to the command shell.
2915 <para>The comma (<emphasis role="bold">,</emphasis>)</para>
2919 <para>The colon (<emphasis role="bold">:</emphasis>), because
2920 AFS reserves it as a field separator in protection group
2921 names; see <link linkend="HDRWQ62">The Two Types of
2922 User-Defined Groups</link></para>
2926 <para>The semicolon (<emphasis
2927 role="bold">;</emphasis>)</para>
2931 <para>The "at-sign" (<emphasis role="bold">@</emphasis>); this
2932 character is reserved for Internet mailing addresses</para>
2940 <para>The newline character</para>
2944 <para>The period (<emphasis role="bold">.</emphasis>); it is
2945 conventional to use this character only in the special
2946 username that an administrator adopts while performing
2947 privileged tasks, such as <emphasis
2948 role="bold">pat.admin</emphasis></para>
2954 <title>AFS UIDs and UNIX UIDs</title>
2956 <para>AFS associates a unique identification number, the AFS UID,
2957 with every username, recording the mapping in the user's
2958 Protection Database entry. The AFS UID functions within AFS much
2959 as the UNIX UID does in the local file system: the AFS server
2960 processes and the Cache Manager use it internally to identify a
2961 user, rather than the username.</para>
2964 <para>Every AFS user also must have a UNIX UID recorded in the local
2965 password file (<emphasis role="bold">/etc/passwd</emphasis> or
2966 equivalent) of each client machine they log onto. Both
2967 administration and a user's AFS access are simplest if the AFS UID
2968 and UNIX UID match. One important consequence of matching UIDs is
2969 that the owner reported by the <emphasis role="bold">ls
2970 -l</emphasis> command matches the AFS username.</para>
2972 <para>It is usually best to allow the Protection Server to allocate
2973 the AFS UID as it creates the Protection Database entry. However,
2974 both the <emphasis role="bold">pts createuser</emphasis> command and
2975 the <emphasis role="bold">uss</emphasis> commands that create user
2976 accounts enable you to assign AFS UIDs explicitly. This is
2977 appropriate in two cases:
2980 <para>You wish to group together the AFS UIDs of related
2985 <para>You are converting an existing UNIX account into an AFS
2986 account and want to make the AFS UID match the existing UNIX
2992 <para>After the Protection Server initializes for the first time on
2993 a cell's first file server machine, it starts assigning AFS UIDs at
2994 a default value. To change the default before creating any user
2995 accounts, or at any time, use the <emphasis role="bold">pts
2996 setmax</emphasis> command to reset the <computeroutput>max user id
2997 counter</computeroutput>. To display the counter, use the <emphasis
2998 role="bold">pts listmax</emphasis> command. See <link
2999 linkend="HDRWQ560">Displaying and Setting the AFS UID and GID
3000 Counters</link>.</para>
3002 <para>AFS reserves one AFS UID, 32766, for the user <emphasis
3003 role="bold">anonymous</emphasis>. The AFS server processes assign
3004 this identity and AFS UID to any user who does not possess a token
3005 for the local cell. Do not assign this AFS UID to any other user or
3006 hardcode its current value into any programs or a file's owner
3007 field, because it is subject to change in future releases.</para>
3010 <primary>username</primary>
3012 <secondary>part of volume name</secondary>
3016 <primary>choosing</primary>
3018 <secondary>name</secondary>
3020 <tertiary>user volume</tertiary>
3024 <title>User Volume Names</title>
3026 <para>Like any volume name, a user volume's base (read/write) name
3027 cannot exceed 22 characters in length or include the <emphasis
3028 role="bold">.readonly</emphasis> or <emphasis
3029 role="bold">.backup</emphasis> extension. See <link
3030 linkend="HDRWQ44">Creating Volumes to Simplify
3031 Administration</link>. By convention, user volume names have the
3032 format <emphasis role="bold">user.</emphasis>username. Using the
3033 <emphasis role="bold">user.</emphasis> prefix not only makes it
3034 easy to identify the volume's contents, but also to create a
3035 backup version of all user volumes by issuing a single <emphasis
3036 role="bold">vos backupsys</emphasis> command.</para>
3040 <primary>mount point</primary>
3042 <secondary>choosing name for user volume</secondary>
3046 <primary>choosing</primary>
3048 <secondary>name</secondary>
3050 <tertiary>user volume mount point</tertiary>
3054 <title>Mount Point Names</title>
3056 <para>By convention, the mount point for a user's volume is named
3057 after the username. Many cells follow the convention of mounting
3058 user volumes in the <emphasis
3059 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3060 role="bold">/usr</emphasis> directory, as discussed in <link
3061 linkend="HDRWQ43">The Third Level</link>. Very large cells
3062 sometimes find that mounting all user volumes in the same
3063 directory slows directory lookup, however; for suggested
3064 alternatives, see the following section.</para>
3068 <primary>directories</primary>
3070 <secondary>for grouping user home directories</secondary>
3074 <primary>user account</primary>
3076 <secondary>suggestions for grouping home directories</secondary>
3080 <sect2 id="HDRWQ59">
3081 <title>Grouping Home Directories</title>
3083 <para>Mounting user volumes in the <emphasis
3084 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3085 role="bold">/usr</emphasis> directory is an AFS-appropriate
3086 variation on the standard UNIX practice of putting user home
3087 directories under the <emphasis role="bold">/usr</emphasis>
3088 subdirectory. However, cells with more than a few hundred users
3089 sometimes find that mounting all user volumes in a single directory
3090 results in slow directory lookup. The solution is to distribute user
3091 volume mount points into several directories; there are a number of
3092 alternative methods to accomplish this.
3095 <para>Distribute user home directories into multiple
3096 directories that reflect organizational divisions, such as
3097 academic or corporate departments. For example, a company can
3098 create group directories called <emphasis
3099 role="bold">usr/marketing</emphasis>, <emphasis
3100 role="bold">usr/research</emphasis>, <emphasis
3101 role="bold">usr/finance</emphasis>. A good feature of this
3102 scheme is that knowing a user's department is enough to find
3103 the user's home directory. Also, it makes it easy to set the
3104 ACL to limit access to members of the department only. A
3105 potential drawback arises if departments are of sufficiently
3106 unequal size that users in large departments experience slower
3107 lookup than users in small departments. This scheme is also
3108 not appropriate in cells where users frequently change between
3113 <para>Distribute home directories into alphabetic
3114 subdirectories of the <emphasis role="bold">usr</emphasis>
3115 directory (the <emphasis role="bold">usr/a</emphasis>
3116 subdirectory, the <emphasis role="bold">usr/b</emphasis>
3117 subdirectory, and so on), based on the first letter of the
3118 username. If the cell is very large, create subdirectories
3119 under each letter that correspond to the second letter in the
3120 user name. This scheme has the same advantages and
3121 disadvantages of a department-based scheme. Anyone who knows
3122 the user's username can find the user's home directory, but
3123 users with names that begin with popular letters sometimes
3124 experience slower lookup.</para>
3128 <para>Distribute home directories randomly but evenly into
3129 more than one grouping directory. One cell that uses this
3130 scheme has over twenty such directories called the <emphasis
3131 role="bold">usr1</emphasis> directory, the <emphasis
3132 role="bold">usr2</emphasis> directory, and so on. This scheme
3133 is especially appropriate in cells where the other two schemes
3134 do not seem feasible. It eliminates the potential problem of
3135 differences in lookup speed, because all directories are about
3136 the same size. Its disadvantage is that there is no way to
3137 guess which directory a given user's volume is mounted in, but
3138 a solution is to create a symbolic link in the regular
3139 <emphasis role="bold">usr</emphasis> directory that references
3140 the actual mount point. For example, if user <emphasis
3141 role="bold">smith</emphasis>'s volume is mounted at the
3143 role="bold">/afs/bigcell.example.com/usr17/smith</emphasis>
3144 directory, then the <emphasis
3145 role="bold">/afs/bigcell.example.com/usr/smith</emphasis>
3146 directory is a symbolic link to the <emphasis
3147 role="bold">../usr17/smith</emphasis> directory. This way, if
3148 someone does not know which directory the user <emphasis
3149 role="bold">smith</emphasis> is in, he or she can access it
3150 through the link called <emphasis
3151 role="bold">usr/smith</emphasis>; people who do know the
3152 appropriate directory save lookup time by specifying
3158 <para>For instructions on how to implement the various schemes when
3159 using the <emphasis role="bold">uss</emphasis> program to create
3160 user accounts, see <link linkend="HDRWQ472">Evenly Distributing User
3161 Home Directories with the G Instruction</link> and <link
3162 linkend="HDRWQ473">Creating a Volume with the V
3163 Instruction</link>.</para>
3166 <sect2 id="Header_72">
3167 <title>Making a Backup Version of User Volumes Available</title>
3169 <para>Mounting the backup version of a user's volume is a simple way
3170 to enable users themselves to restore data they have accidentally
3171 removed or deleted. It is conventional to mount the backup version
3172 at a subdirectory of the user's home directory (called perhaps the
3173 <emphasis role="bold">OldFiles</emphasis> subdirectory), but other
3174 schemes are possible. Once per day you create a new backup version
3175 to capture the changes made that day, overwriting the previous day's
3176 backup version with the new one. Users can always retrieve the
3177 previous day's copy of a file without your assistance, freeing you
3178 to deal with more pressing tasks.</para>
3180 <para>Users sometimes want to delete the mount point to their backup
3181 volume, because they erroneously believe that the backup volume's
3182 contents count against their quota. Remind them that the backup
3183 volume is separate, so the only space it uses in the user volume is
3184 the amount needed for the mount point.</para>
3186 <para>For further discussion of backup volumes, see <link
3187 linkend="HDRWQ77">Backing Up AFS Data</link> and <link
3188 linkend="HDRWQ201">Creating Backup Volumes</link>.</para>
3191 <primary>file</primary>
3193 <secondary>creating standard ones in new user account</secondary>
3197 <primary>user account</primary>
3199 <secondary>creating</secondary>
3201 <tertiary>standard files in</tertiary>
3205 <primary>creating</primary>
3207 <secondary>standard files in new user account</secondary>
3211 <sect2 id="HDRWQ60">
3212 <title>Creating Standard Files in New AFS Accounts</title>
3214 <para>From your experience as a UNIX administrator, you are probably
3215 familiar with the use of login and shell initialization files (such
3216 as the <emphasis role="bold">.login</emphasis> and <emphasis
3217 role="bold">.cshrc</emphasis> files) to make an account easier to
3220 <para>It is often practical to add some AFS-specific directories to
3221 the definition of the user's <envar>PATH</envar> environment
3222 variable, including the following:
3225 <para>The path to a <emphasis role="bold">bin</emphasis>
3226 subdirectory in the user's home directory for binaries the
3227 user has created (that is, <emphasis
3228 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3229 role="bold">/usr/</emphasis><replaceable>username</replaceable><emphasis
3230 role="bold">/bin</emphasis>)</para>
3234 <para>The <emphasis role="bold">/usr/afsws/bin</emphasis>
3235 path, which conventionally includes programs like <emphasis
3236 role="bold">fs</emphasis>, <emphasis
3237 role="bold">klog</emphasis>, <emphasis
3238 role="bold">kpasswd</emphasis>, <emphasis
3239 role="bold">pts</emphasis>, <emphasis
3240 role="bold">tokens</emphasis>, and <emphasis
3241 role="bold">unlog</emphasis></para>
3245 <para>The <emphasis role="bold">/usr/afsws/etc</emphasis>
3246 path, if the user is an administrator; it usually houses the
3247 AFS command suites that require privilege (the <emphasis
3248 role="bold">backup</emphasis>, <emphasis
3249 role="bold">butc</emphasis>, <emphasis
3250 role="bold">kas</emphasis>, <emphasis
3251 role="bold">uss</emphasis>, <emphasis
3252 role="bold">vos</emphasis> commands), the <emphasis
3253 role="bold">package</emphasis> program, and others</para>
3258 <para>If you are not using an AFS-modified login utility, it can be
3259 helpful to users to invoke the <emphasis role="bold">klog</emphasis>
3260 command in their <emphasis role="bold">.login</emphasis> file so
3261 that they obtain AFS tokens as part of logging in. In the following
3262 example command sequence, the first line echoes the string
3263 <computeroutput>klog</computeroutput> to the standard output stream,
3264 so that the user understands the purpose of the
3265 <computeroutput>Password:</computeroutput> prompt that appears when
3266 the second line is executed. The <emphasis
3267 role="bold">-setpag</emphasis> flag associates the new tokens with a
3268 process authentication group (PAG), which is discussed further in
3269 <link linkend="HDRWQ64">Identifying AFS Tokens by PAG</link>.</para>
3272 echo -n "klog " klog -setpag
3275 <para>The following sequence of commands has a similar effect,
3276 except that the <emphasis role="bold">pagsh</emphasis> command forks
3277 a new shell with which the PAG and tokens are associated.</para>
3280 pagsh echo -n "klog " klog
3283 <para>If you use an AFS-modified login utility, this sequence is not
3284 necessary, because such utilities both log a user in locally and
3285 obtain AFS tokens.</para>
3288 <primary>group</primary>
3290 <secondary>AFS GID</secondary>
3294 <primary>group</primary>
3296 <secondary>restrictions</secondary>
3300 <primary>group</primary>
3302 <secondary>privacy flags</secondary>
3306 <primary>privacy flags on Protection Database entry</primary>
3311 <sect1 id="HDRWQ61">
3312 <title>Using AFS Protection Groups</title>
3314 <para>AFS enables users to define their own groups of other users or
3315 machines. The groups are placed on ACLs to grant the same permissions
3316 to many users without listing each user individually. For group
3317 creation instructions, see <link linkend="HDRWQ531">Administering the
3318 Protection Database</link>.</para>
3320 <para>Groups have AFS ID numbers, just as users do, but an AFS group
3321 ID (GID) is a negative integer whereas a user's AFS UID is a positive
3322 integer. By default, the Protection Server allocates a new group's AFS
3323 GID automatically, but members of the <emphasis
3324 role="bold">system:administrators</emphasis> group can assign a GID
3325 when issuing the <emphasis role="bold">pts creategroup</emphasis>
3326 command. Before explicitly assigning a GID, it is best to verify that
3327 it is not already in use.</para>
3329 <para>A group cannot belong to another group, but it can own another
3330 group or even itself as long as it (the owning group) has at least one
3331 member. The current owner of a group can transfer ownership of the
3332 group to another user or group, even without the new owner's
3333 permission. At that point the former owner loses administrative
3334 control over the group.</para>
3336 <para>By default, each user can create 20 groups. A system
3337 administrator can increase or decrease this group creation quota with
3338 the <emphasis role="bold">pts setfields</emphasis> command.</para>
3340 <para>Each Protection Database entry (group or user) is protected by a
3341 set of five privacy flagswhich limit who can administer the entry and
3342 what they can do. The default privacy flags are fairly restrictive,
3343 especially for user entries. See <link linkend="HDRWQ559">Setting the
3344 Privacy Flags on Database Entries</link>.</para>
3347 <primary>system:administrators group</primary>
3349 <secondary>about</secondary>
3353 <primary>system:anyuser group</primary>
3355 <secondary>about</secondary>
3359 <primary>system:authuser group</primary>
3361 <secondary>about</secondary>
3365 <primary>group</primary>
3367 <secondary>system-defined</secondary>
3370 <sect2 id="Header_75">
3371 <title>The Three System Groups</title>
3373 <para>As the Protection Server initializes for the first time on a
3374 cell's first database server machine, it automatically creates three
3375 group entries: the <emphasis role="bold">system:anyuser</emphasis>,
3376 <emphasis role="bold">system:authuser</emphasis>, and <emphasis
3377 role="bold">system:administrators</emphasis> groups.</para>
3380 <primary>AFS UID</primary>
3382 <secondary>reserved</secondary>
3384 <tertiary>system-defined groups</tertiary>
3387 <para>The first two system groups are unlike any other groups in the
3388 Protection Database in that they do not have a stable membership:
3391 <para>The <emphasis role="bold">system:anyuser</emphasis>
3392 group includes everyone who can access a cell's AFS filespace:
3393 users who have tokens for the local cell, users who have
3394 logged in on a local AFS client machine but not obtained
3395 tokens (such as the local superuser <emphasis
3396 role="bold">root</emphasis>), and users who have connected to
3397 a local machine from outside the cell. Placing the <emphasis
3398 role="bold">system:anyuser</emphasis> group on an ACL grants
3399 access to the widest possible range of users. It is the only
3400 way to extend access to users from foreign AFS cells that do
3401 not have local accounts.</para>
3405 <para>The <emphasis role="bold">system:authuser</emphasis>
3406 group includes everyone who has a valid token obtained from
3407 the cell's AFS authentication service.</para>
3412 <para>Because the groups do not have a stable membership, the
3413 <emphasis role="bold">pts membership</emphasis> command produces no
3414 output for them. Similarly, they do not appear in the list of groups
3415 to which a user belongs.</para>
3417 <para>The <emphasis role="bold">system:administrators</emphasis>
3418 group does have a stable membership, consisting of the cell's
3419 privileged administrators. Members of this group can issue any
3420 <emphasis role="bold">pts</emphasis> command, and are the only ones
3421 who can issue several other restricted commands (such as the
3422 <emphasis role="bold">chown</emphasis> command on AFS files). By
3423 default, they also implicitly have the <emphasis
3424 role="bold">a</emphasis> (<emphasis
3425 role="bold">administer</emphasis>) and <emphasis
3426 role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>)
3427 permissions on every ACL in the filespace. For information about
3428 changing this default, see <link linkend="HDRWQ586">Administering
3429 the system:administrators Group</link>.</para>
3431 <para>For a discussion of how to use system groups effectively on
3432 ACLs, see <link linkend="HDRWQ571">Using Groups on
3436 <sect2 id="HDRWQ62">
3437 <title>The Two Types of User-Defined Groups</title>
3439 <para>All users can create regular groups. A regular group name has
3440 two fields separated by a colon, the first of which must indicate
3441 the group's ownership. The Protection Server refuses to create or
3442 change the name of a group if the result does not accurately
3443 indicate the ownership.</para>
3445 <para>Members of the <emphasis
3446 role="bold">system:administrators</emphasis> group can create
3447 prefix-less groups whose names do not have the first field that
3448 indicates ownership. For suggestions on using the two types of
3449 groups effectively, see <link linkend="HDRWQ545">Using Groups
3450 Effectively</link>.</para>
3453 <primary>authentication</primary>
3455 <secondary>AFS separate from UNIX</secondary>
3459 <primary>AFS</primary>
3461 <secondary>authentication separate from UNIX</secondary>
3466 <sect1 id="HDRWQ63">
3467 <title>Login and Authentication in AFS</title>
3469 <para>As explained in <link linkend="HDRWQ31">Differences in
3470 Authentication</link>, AFS authentication is separate from UNIX
3471 authentication because the two file systems are separate. The
3472 separation has two practical implications:
3475 <para>To access AFS files, users must both log into the local
3476 file system and authenticate with the AFS authentication
3477 service. (Logging into the local file system is necessary
3478 because the only way to access the AFS filespace is through a
3479 Cache Manager, which resides in the local machine's
3484 <para>Passwords are stored in two separate places: in the
3485 Kerberos Database for AFS and in the each machine's local
3486 password file (the <emphasis role="bold">/etc/passwd</emphasis>
3487 file or equivalent) for the local file system.</para>
3492 <para>When a user successfully authenticates, the AFS authentication
3493 service passes a token to the user's Cache Manager. The token is a
3494 small collection of data that certifies that the user has correctly
3495 provided the password associated with a particular AFS identity. The
3496 Cache Manager presents the token to AFS server processes along with
3497 service requests, as proof that the user is genuine. To learn about
3498 the mutual authentication procedure they use to establish identity,
3499 see <link linkend="HDRWQ75">A More Detailed Look at Mutual
3500 Authentication</link>.</para>
3502 <para>The Cache Manager stores tokens in the user's credential
3503 structure in kernel memory. To distinguish one user's credential
3504 structure from another's, the Cache Manager identifies each one either
3505 by the user's UNIX UID or by a process authentication group (PAG),
3506 which is an identification number guaranteed to be unique in the
3507 cell. For further discussion, see <link linkend="HDRWQ64">Identifying
3508 AFS Tokens by PAG</link>.</para>
3511 <primary>tokens</primary>
3513 <secondary>one-per-cell rule</secondary>
3516 <para>A user can have only one token per cell in each separately
3517 identified credential structure. To obtain a second token for the same
3518 cell, the user must either log into a different machine or obtain
3519 another credential structure with a different identifier than any
3520 existing credential structure, which is most easily accomplished by
3521 issuing the <emphasis role="bold">pagsh</emphasis> command (see <link
3522 linkend="HDRWQ64">Identifying AFS Tokens by PAG</link>). In a single
3523 credential structure, a user can have one token for each of many cells
3524 at the same time. As this implies, authentication status on one
3525 machine or PAG is independent of authentication status on another
3526 machine or PAG, which can be very useful to a user or system
3527 administrator.</para>
3529 <para>The AFS distribution includes library files that enable each
3530 system type's login utility to authenticate users with AFS and log
3531 them into the local file system in one step. If you do not configure
3532 an AFS-modified login utility on a client machine, its users must
3533 issue the <emphasis role="bold">klog</emphasis> command to
3534 authenticate with AFS after logging in.</para>
3537 <para>The AFS-modified libraries do not necessarily support all
3538 features available in an operating system's proprietary login
3539 utility. In some cases, it is not possible to support a utility at
3540 all. For more information about the supported utilities in each AFS
3541 version, see the OpenAFS Release Notes.</para>
3545 <primary>commands</primary>
3547 <secondary>pagsh</secondary>
3551 <primary>pagsh command</primary>
3555 <primary>commands</primary>
3557 <secondary>klog with -setpag flag</secondary>
3561 <primary>klog command</primary>
3563 <secondary>with -setpag flag</secondary>
3567 <primary>PAG</primary>
3569 <secondary>creating with klog or pagsh command</secondary>
3573 <primary>creating</primary>
3575 <secondary>PAG with klog or pagsh command</secondary>
3579 <primary>process authentication group</primary>
3581 <secondary></secondary>
3586 <sect2 id="HDRWQ64">
3587 <title>Identifying AFS Tokens by PAG</title>
3589 <para>As noted, the Cache Manager identifies user credential
3590 structures either by UNIX UID or by PAG. Using a PAG is preferable
3591 because it guaranteed to be unique: the Cache Manager allocates it
3592 based on a counter that increments with each use. In contrast,
3593 multiple users on a machine can share or assume the same UNIX UID,
3594 which creates potential security problems. The following are two
3595 common such situations:
3598 <para>The local superuser <emphasis
3599 role="bold">root</emphasis> can always assume any other user's
3600 UNIX UID simply by issuing the <emphasis
3601 role="bold">su</emphasis> command, without providing the
3602 user's password. If the credential structure is associated
3603 with the user's UNIX UID, then assuming the UID means
3604 inheriting the AFS tokens.</para>
3608 <para>Two users working on different NFS client machines can
3609 have the same UNIX UID in their respective local file
3610 systems. If they both access the same NFS/AFS Translator
3611 machine, and the Cache Manager there identifies them by their
3612 UNIX UID, they become indistinguishable. To eliminate this
3613 problem, the Cache Manager on a translator machine
3614 automatically generates a PAG for each user and uses it,
3615 rather than the UNIX UID, to tell users apart.</para>
3620 <para>Yet another advantage of PAGs over UIDs is that processes
3621 spawned by the user inherit the PAG and so share the token; thus
3622 they gain access to AFS as the authenticated user. In many
3623 environments, for example, printer and other daemons run under
3624 identities (such as the local superuser <emphasis
3625 role="bold">root</emphasis>) that the AFS server processes recognize
3626 only as the <emphasis role="bold">anonymous</emphasis> user. Unless
3627 PAGs are used, such daemons cannot access files for which the
3628 <emphasis role="bold">system:anyuser</emphasis> group does not have
3629 the necessary ACL permissions.</para>
3631 <para>Once a user has a PAG, any new tokens the user obtains are
3632 associated with the PAG. The PAG expires two hours after any
3633 associated tokens expire or are discarded. If the user issues the
3634 <emphasis role="bold">klog</emphasis> command before the PAG
3635 expires, the new token is associated with the existing PAG (the PAG
3636 is said to be recycled in this case).</para>
3638 <para>AFS-modified login utilities automatically generate a PAG, as
3639 described in the following section. If you use a standard login
3640 utility, your users must issue the <emphasis
3641 role="bold">pagsh</emphasis> command before the <emphasis
3642 role="bold">klog</emphasis> command, or include the latter command's
3643 <emphasis role="bold">-setpag</emphasis> flag. For instructions, see
3644 <link linkend="HDRWQ69">Using Two-Step Login and
3645 Authentication</link>.</para>
3647 <para>Users can also use either command at any time to create a new
3648 PAG. The difference between the two commands is that the <emphasis
3649 role="bold">klog</emphasis> command replaces the PAG associated with
3650 the current command shell and tokens. The <emphasis
3651 role="bold">pagsh</emphasis> command initializes a new command shell
3652 before creating a new PAG. If the user already had a PAG, any
3653 running processes or jobs continue to use the tokens associated with
3654 the old PAG whereas any new jobs or processes use the new PAG and
3655 its associated tokens. When you exit the new shell (by pressing
3656 <<emphasis role="bold">Ctrl-d</emphasis>>, for example), you
3657 return to the original PAG and shell. By default, the <emphasis
3658 role="bold">pagsh</emphasis> command initializes a Bourne shell, but
3659 you can include the <emphasis role="bold">-c</emphasis> argument to
3660 initialize a C shell (the <emphasis role="bold">/bin/csh</emphasis>
3661 program on many system types) or Korn shell (the <emphasis
3662 role="bold">/bin/ksh</emphasis> program) instead.</para>
3665 <primary>login utility</primary>
3667 <secondary>AFS version</secondary>
3671 <sect2 id="HDRWQ65">
3672 <title>Using an AFS-modified login Utility</title>
3674 <para>As previously mentioned, an AFS-modified login utility
3675 simultaneously obtains an AFS token and logs the user into the local
3676 file system. This section outlines the login and authentication
3677 process and its interaction with the value in the password field of
3678 the local password file.</para>
3680 <para>An AFS-modified login utility performs a sequence of steps
3681 similar to the following; details can vary for different operating
3685 <para>It checks the user's entry in the local password file
3686 (the <emphasis role="bold">/etc/passwd</emphasis> file or
3691 <para>If no entry exists, or if an asterisk
3692 (<computeroutput>*</computeroutput>) appears in the entry's
3693 password field, the login attempt fails. If the entry exists,
3694 the attempt proceeds to the next step.</para>
3697 <listitem id="LIWQ66">
3698 <para>The utility obtains a PAG.</para>
3701 <listitem id="LIWQ67">
3702 <para>The utility converts the password
3703 provided by the user into an encryption key and encrypts a
3704 packet of data with the key. It sends the packet to the AFS
3705 authentication service (the AFS Authentication Server in the
3706 conventional configuration).</para>
3710 <para>The authentication service decrypts the packet and,
3711 depending on the success of the decryption, judges the
3712 password to be correct or incorrect. (For more details, see
3713 <link linkend="HDRWQ75">A More Detailed Look at Mutual
3714 Authentication</link>.)
3717 <para>If the authentication service judges the password
3718 incorrect, the user does not receive an AFS token. The
3719 PAG is retained, ready to be associated with any tokens
3720 obtained later. The attempt proceeds to Step <link
3721 linkend="LIWQ68">6</link>.</para>
3725 <para>If the authentication service judges the password
3726 correct, it issues a token to the user as proof of AFS
3727 authentication. The login utility logs the user into the
3728 local UNIX file system. Some login utilities echo the
3729 following banner to the screen to alert the user to
3730 authentication with AFS. Step <link
3731 linkend="LIWQ68">6</link> is skipped.
3733 AFS(R) version Login
3741 <listitem id="LIWQ68">
3742 <para>If no AFS token was granted in
3743 Step <link linkend="LIWQ67">4</link>, the login utility
3744 attempts to log the user into the local file system, by
3745 comparing the password provided to the local password file.
3748 <para>If the password is incorrect or any value other
3749 than an encrypted 13-character string appears in the
3750 password field, the login attempt fails.</para>
3754 <para>If the password is correct, the user is logged
3755 into the local file system only.</para> </listitem>
3763 <primary>local password file</primary>
3765 <secondary>when using AFS--modified login utility</secondary>
3769 <primary>login utility</primary>
3771 <secondary>AFS version's interaction with local password
3776 <primary>password</primary>
3778 <secondary>local password file</secondary>
3781 <para>As indicated, when you use an AFS-modified login utility, the
3782 password field in the local password file is no longer the primary
3783 gate for access to your system. If the user provides the correct AFS
3784 password, then the program never consults the local password
3785 file. However, you can still use the password field to control
3786 access, in the following way:
3789 <para>To prevent both local login and AFS authentication,
3790 place an asterisk (<emphasis role="bold">*</emphasis>) in the
3791 field. This is useful mainly in emergencies, when you want to
3792 prevent a certain user from logging into the machine.</para>
3796 <para>To prevent login to the local file system if the user
3797 does not provide the correct AFS password, place a character
3798 string of any length other than the standard thirteen
3799 characters in the field. This is appropriate if you want to
3800 permit only people with local AFS accounts to login on your
3801 machines. A single <emphasis role="bold">X</emphasis> or other
3802 character is the most easily recognizable way to do
3807 <para>To enable a user to log into the local file system even
3808 after providing an incorrect AFS password, record a standard
3809 UNIX encrypted password in the field by issuing the standard
3810 UNIX password-setting command (<emphasis
3811 role="bold">passwd</emphasis> or equivalent).</para>
3816 <para>Systems that use a Pluggable Authentication Module (PAM) for
3817 login and AFS authentication do not necessarily consult the local
3818 password file at all, in which case they do not use the password
3819 field to control authentication and login attempts. Instead,
3820 instructions in the PAM configuration file (on many system types,
3821 <emphasis role="bold">/etc/pam.conf</emphasis>) fill the same
3822 function. See the instructions in the OpenAFS Quick Beginnings for
3823 installing AFS-modified login utilities.</para>
3826 <primary>local password file</primary>
3828 <secondary>when not using AFS-modified login utility</secondary>
3832 <sect2 id="HDRWQ69">
3833 <title>Using Two-Step Login and Authentication</title>
3835 <para>In cells that do not use an AFS-modified login utility, users
3836 must issue separate commands to login and authenticate, as detailed
3837 in the OpenAFS User Guide:
3840 <para>They use the standard <emphasis
3841 role="bold">login</emphasis> program to login to the local
3842 file system, providing the password listed in the local
3843 password file (the <emphasis
3844 role="bold">/etc/passwd</emphasis> file or equivalent).</para>
3848 <para>They must issue the <emphasis
3849 role="bold">klog</emphasis> command to authenticate with the
3850 AFS authentication service, including its <emphasis
3851 role="bold">-setpag</emphasis> flag to associate the new
3852 tokens with a process authentication group (PAG).</para>
3857 <para>As mentioned in <link linkend="HDRWQ60">Creating Standard
3858 Files in New AFS Accounts</link>, you can invoke the <emphasis
3859 role="bold">klog -setpag</emphasis> command in a user's <emphasis
3860 role="bold">.login</emphasis> file (or equivalent) so that the user
3861 does not have to remember to issue the command after logging in. The
3862 user still must type a password twice, once at the prompt generated
3863 by the login utility and once at the <emphasis
3864 role="bold">klog</emphasis> command's prompt. This implies that the
3865 two passwords can differ, but it is less confusing if they do
3868 <para>Another effect of not using an AFS-modified login utility is
3869 that the AFS servers recognize the standard <emphasis
3870 role="bold">login</emphasis> program as the <emphasis
3871 role="bold">anonymous</emphasis> user. If the <emphasis
3872 role="bold">login</emphasis> program needs to access any AFS files
3873 (such as the <emphasis role="bold">.login</emphasis> file in a
3874 user's home directory), then the ACL that protects the file must
3875 include an entry granting the <emphasis role="bold">l</emphasis>
3876 (<emphasis role="bold">lookup</emphasis>) and <emphasis
3877 role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>)
3878 permissions to the <emphasis role="bold">system:anyuser</emphasis>
3881 <para>When you do not use an AFS-modified login utility, an actual
3882 (scrambled) password must appear in the local password file for each
3883 user. Use the <emphasis role="bold">/bin/passwd</emphasis> file to
3884 insert or change these passwords. It is simpler if the password in
3885 the local password file matches the AFS password, but it is not
3889 <primary>tokens</primary>
3891 <secondary>displaying for user</secondary>
3895 <primary>tokens</primary>
3897 <secondary>command</secondary>
3901 <primary>commands</primary>
3903 <secondary>tokens</secondary>
3907 <primary>listing</primary>
3909 <secondary>tokens held by issuer</secondary>
3913 <primary>commands</primary>
3915 <secondary>klog</secondary>
3919 <primary>klog command</primary>
3923 <primary>server process</primary>
3925 <secondary>creating ticket (tokens) for</secondary>
3929 <primary>tickets</primary>
3931 <secondary></secondary>
3937 <primary>tokens</primary>
3939 <secondary>creating for server process</secondary>
3943 <primary>authenticated identity</primary>
3945 <secondary>acquiring with klog command</secondary>
3949 <primary>unlog command</primary>
3953 <primary>commands</primary>
3955 <secondary>unlog</secondary>
3959 <primary>discarding</primary>
3961 <secondary>tokens</secondary>
3965 <primary>tokens</primary>
3967 <secondary>discarding with unlog command</secondary>
3971 <sect2 id="Header_81">
3972 <title>Obtaining, Displaying, and Discarding Tokens</title>
3974 <para>Once logged in, a user can obtain a token at any time with the
3975 <emphasis role="bold">klog</emphasis> command. If a valid token
3976 already exists, the new one overwrites it. If a PAG already exists,
3977 the new token is associated with it.</para>
3979 <para>By default, the <emphasis role="bold">klog</emphasis> command
3980 authenticates the issuer using the identity currently logged in to
3981 the local file system. To authenticate as a different identity, use
3982 the <emphasis role="bold">-principal</emphasis> argument. To obtain
3983 a token for a foreign cell, use the <emphasis
3984 role="bold">-cell</emphasis> argument (it can be combined with the
3985 <emphasis role="bold">-principal</emphasis> argument). See the
3986 OpenAFS User Guide and the entry for the <emphasis
3987 role="bold">klog</emphasis> command in the OpenAFS Administration
3990 <para>To discard either all tokens or the token for a particular
3991 cell, issue the <emphasis role="bold">unlog</emphasis> command. The
3992 command affects only the tokens associated with the current command
3993 shell. See the OpenAFS User Guideand the entry for the <emphasis
3994 role="bold">unlog</emphasis> command in the OpenAFS Administration
3997 <para>To display the tokens associated with the current command
3998 shell, issue the <emphasis role="bold">tokens</emphasis>
3999 command. The following examples illustrate its output in various
4002 <para>If the issuer is not authenticated in any cell:</para>
4005 % <emphasis role="bold">tokens</emphasis>
4006 Tokens held by the Cache Manager:
4010 <para>The following shows the output for a user with AFS UID 1000 in
4011 the Example Corporation cell:</para>
4014 % <emphasis role="bold">tokens</emphasis>
4015 Tokens held by the Cache Manager:
4016 User's (AFS ID 1000) tokens for afs@example.com [Expires Jun 2 10:00]
4020 <para>The following shows the output for a user who is authenticated
4021 in Example Corporation cell, the Example Organization cell and the
4022 Example Network cell. The user has different AFS UIDs in the three
4023 cells. Tokens for the last cell are expired:</para>
4026 % <emphasis role="bold">tokens</emphasis>
4027 Tokens held by the Cache Manager:
4028 User's (AFS ID 1000) tokens for afs@example.com [Expires Jun 2 10:00]
4029 User's (AFS ID 4286) tokens for afs@example.org [Expires Jun 3 1:34]
4030 User's (AFS ID 22) tokens for afs@example.net [>>Expired<<]
4034 <para>The Kerberos version of the <emphasis
4035 role="bold">tokens</emphasis> command (the <emphasis
4036 role="bold">tokens.krb</emphasis> command), also reports information
4037 on the ticket-granting ticket, including the ticket's owner, the
4038 ticket-granting service, and the expiration date, as in the
4039 following example. Also see <link linkend="HDRWQ70">Support for
4040 Kerberos Authentication</link>.</para>
4043 % <emphasis role="bold">tokens.krb</emphasis>
4044 Tokens held by the Cache Manager:
4045 User's (AFS ID 1000) tokens for afs@example.com [Expires Jun 2 10:00]
4046 User smith's tokens for krbtgt.EXAMPLE.COM@example.com [Expires Jun 2 10:00]
4051 <sect2 id="Header_82">
4052 <title>Setting Default Token Lifetimes for Users</title>
4055 <primary>tokens</primary>
4057 <secondary>setting default lifetimes for users</secondary>
4060 <para>The maximum lifetime of a user token is the smallest of the
4061 ticket lifetimes recorded in the following three Authentication
4062 Database entries. The <emphasis role="bold">kas examine</emphasis>
4063 command reports the lifetime as <computeroutput>Max ticket
4064 lifetime</computeroutput>. Administrators who have the
4065 <computeroutput>ADMIN</computeroutput> flag on their Authentication
4066 Database entry can use the <emphasis
4067 role="bold">-lifetime</emphasis> argument to the <emphasis
4068 role="bold">kas setfields</emphasis> command to set an entry's
4072 <para>The <emphasis role="bold">afs</emphasis> entry, which
4073 corresponds to the AFS server processes. The default is 100
4078 <para>The <emphasis role="bold">krbtgt</emphasis>.cellname
4079 entry, which corresponds to the ticket-granting ticket used
4080 internally in generating the token. The default is 720 hours
4085 <para>The entry for the user of the AFS-modified login utility
4086 or issuer of the <emphasis role="bold">klog</emphasis>
4087 command. The default is 25 hours for user entries created
4088 using the AFS 3.1 or later version of the Authentication
4089 Server, and 100 hours for user entries created using the AFS
4090 3.0 version of the Authentication Server. A user can use the
4091 <emphasis role="bold">kas examine</emphasis> command to
4092 display his or her own Authentication Database entry.</para>
4098 <para>An AFS-modified login utility always grants a token with a
4099 lifetime calculated from the previously described three
4100 values. When issuing the <emphasis role="bold">klog</emphasis>
4101 command, a user can request a lifetime shorter than the default by
4102 using the <emphasis role="bold">-lifetime</emphasis> argument. For
4103 further information, see the OpenAFS User Guide and the <emphasis
4104 role="bold">klog</emphasis> reference page in the OpenAFS
4105 Administration Reference.</para>
4109 <sect2 id="Header_83">
4110 <title>Changing Passwords</title>
4113 <primary>password</primary>
4115 <secondary>changing in AFS</secondary>
4119 <primary>kpasswd command</primary>
4123 <primary>commands</primary>
4125 <secondary>kpasswd</secondary>
4129 <primary>kas commands</primary>
4131 <secondary>setpassword</secondary>
4135 <primary>commands</primary>
4137 <secondary>kas setpassword</secondary>
4140 <para>Regular AFS users can change their own passwords by using
4141 either the <emphasis role="bold">kpasswd</emphasis> or <emphasis
4142 role="bold">kas setpassword</emphasis> command. The commands prompt
4143 for the current password and then twice for the new password, to
4144 screen out typing errors.</para>
4146 <para>Administrators who have the
4147 <computeroutput>ADMIN</computeroutput> flag on their Authentication
4148 Database entries can change any user's password, either by using the
4149 <emphasis role="bold">kpasswd</emphasis> command (which requires
4150 knowing the current password) or the <emphasis role="bold">kas
4151 setpassword</emphasis> command.</para>
4153 <para>If your cell does not use an AFS-modified login utility,
4154 remember also to change the local password, using the operating
4155 system's password-changing command. For more instructions on
4156 changing passwords, see <link linkend="HDRWQ516">Changing AFS
4157 Passwords</link>.</para>
4160 <sect2 id="Header_84">
4161 <title>Imposing Restrictions on Passwords and Authentication
4164 <para>You can help to make your cell more secure by imposing
4165 restrictions on user passwords and authentication attempts. To
4166 impose the restrictions as you create an account, use the <emphasis
4167 role="bold">A</emphasis> instruction in the <emphasis
4168 role="bold">uss</emphasis> template file as described in <link
4169 linkend="HDRWQ478">Increasing Account Security with the A
4170 Instruction</link>. To set or change the values on an existing
4171 account, use the <emphasis role="bold">kas setfields</emphasis>
4172 command as described in <link linkend="HDRWQ515">Improving Password
4173 and Authentication Security</link>.</para>
4176 <primary>password</primary>
4178 <secondary>expiration</secondary>
4182 <primary>password</primary>
4184 <secondary>lifetime</secondary>
4188 <primary>kas commands</primary>
4190 <secondary>setfields</secondary>
4194 <primary>commands</primary>
4196 <secondary>kas setfields</secondary>
4200 <primary>Authentication Database</primary>
4202 <secondary>password lifetime, setting</secondary>
4206 <primary>password</primary>
4208 <secondary>restricting reuse</secondary>
4211 <para>By default, AFS passwords never expire. Limiting password
4212 lifetime can help improve security by decreasing the time the
4213 password is subject to cracking attempts. You can choose an lifetime
4214 from 1 to 254 days after the password was last changed. It
4215 automatically applies to each new password as it is set. When the
4216 user changes passwords, you can also insist that the new password is
4217 not similar to any of the 20 passwords previously used.</para>
4220 <primary>password</primary>
4222 <secondary>consequences of multiple failed authentication
4223 attempts</secondary>
4227 <primary>kas commands</primary>
4229 <secondary>setfields</secondary>
4233 <primary>commands</primary>
4235 <secondary>kas setfields</secondary>
4239 <primary>authentication</primary>
4241 <secondary>consequences of multiple failures</secondary>
4244 <para>Unscrupulous users can try to gain access to your AFS cell by
4245 guessing an authorized user's password. To protect against this type
4246 of attack, you can limit the number of times that a user can
4247 consecutively fail to provide the correct password. When the limit
4248 is exceeded, the authentication service refuses further
4249 authentication attempts for a specified period of time (the lockout
4250 time). To reenable authentication attempts before the lockout time
4251 expires, an administrator must issue the <emphasis role="bold">kas
4252 unlock</emphasis> command.</para>
4255 <primary>password</primary>
4257 <secondary>checking quality of</secondary>
4261 <primary>kpasswd command</primary>
4265 <primary>commands</primary>
4267 <secondary>kpasswd</secondary>
4271 <primary>kas commands</primary>
4273 <secondary>setpassword</secondary>
4277 <primary>kpwvalid program</primary>
4280 <para>In addition to settings on user's authentication accounts, you
4281 can improve security by automatically checking the quality of new
4282 user passwords. The <emphasis role="bold">kpasswd</emphasis> and
4283 <emphasis role="bold">kas setpassword</emphasis> commands pass the
4284 proposed password to a program or script called <emphasis
4285 role="bold">kpwvalid</emphasis>, if it exists. The <emphasis
4286 role="bold">kpwvalid</emphasis> performs quality checks and returns
4287 a code to indicate whether the password is acceptable. You can
4288 create your own program or modified the sample program included in
4289 the AFS distribution. See the <emphasis
4290 role="bold">kpwvalid</emphasis> reference page in the OpenAFS
4291 Administration Reference.</para>
4293 <para>There are several types of quality checks that can improve
4297 <para>The password is a minimum length</para>
4301 <para>The password is not a word</para>
4305 <para>The password contains both numbers and letters</para>
4311 <sect2 id="HDRWQ70">
4312 <title>Support for Kerberos Authentication</title>
4315 <primary>Kerberos</primary>
4317 <secondary>support for in AFS</secondary>
4321 <primary>commands</primary>
4323 <secondary>klog.krb</secondary>
4327 <primary>commands</primary>
4329 <secondary>pagsh.krb</secondary>
4333 <primary>commands</primary>
4335 <secondary>tokens.krb</secondary>
4339 <primary>klog.krb command</primary>
4343 <primary>pagsh.krb command</primary>
4347 <primary>tokens.krb command</primary>
4350 <para>If your site is using standard Kerberos authentication rather
4351 than the AFS Authentication Server, use the modified versions of the
4352 <emphasis role="bold">klog</emphasis>, <emphasis
4353 role="bold">pagsh</emphasis>, and <emphasis
4354 role="bold">tokens</emphasis> commands that support Kerberos
4355 authentication. The binaries for the modified version of these
4356 commands have the same name as the standard binaries with the
4357 addition of a <emphasis role="bold">.krb</emphasis>
4360 <para>Use either the Kerberos version or the standard command
4361 throughout the cell; do not mix the two versions. AFS Product
4362 Support can provide instructions on installing the Kerberos version
4363 of these four commands. For information on the differences between
4364 the two versions of these commands, see the OpenAFS Administration
4368 <sect1 id="HDRWQ71">
4369 <title>Security and Authorization in AFS</title>
4371 <para>AFS incorporates several features to ensure that only authorized
4372 users gain access to data. This section summarizes the most important
4373 of them and suggests methods for improving security in your
4376 <sect2 id="HDRWQ72">
4377 <title>Some Important Security Features</title>
4380 <primary>security</primary>
4382 <secondary>AFS features</secondary>
4386 <primary>AFS</primary>
4388 <secondary>security features</secondary>
4392 <title>ACLs on Directories</title>
4394 <para>Files in AFS are protected by the access control list (ACL)
4395 associated with their parent directory. The ACL defines which
4396 users or groups can access the data in the directory, and in what
4397 way. See <link linkend="HDRWQ562">Managing Access Control
4398 Lists</link>.</para>
4402 <title>Mutual Authentication Between Client and Server</title>
4404 <para>When an AFS client and server process communicate, each
4405 requires the other to prove its identity during mutual
4406 authentication, which involves the exchange of encrypted
4407 information that only valid parties can decrypt and respond
4408 to. For a detailed description of the mutual authentication
4409 process, see <link linkend="HDRWQ75">A More Detailed Look at
4410 Mutual Authentication</link>.</para>
4413 <para>AFS server processes mutually authenticate both with one
4414 another and with processes that represent human users. After mutual
4415 authentication is complete, the server and client have established
4416 an authenticated connection, across which they can communicate
4417 repeatedly without having to authenticate again until the connection
4418 expires or one of the parties closes it. Authenticated connections
4419 have varying lifetimes.</para>
4422 <title>Tokens</title>
4424 <para>In order to access AFS files, users must prove their
4425 identities to the AFS authentication service by providing the
4426 correct AFS password. If the password is correct, the
4427 authentication service sends the user a token as evidence of
4428 authenticated status. See <link linkend="HDRWQ63">Login and
4429 Authentication in AFS</link>.</para>
4432 <para>Servers assign the user identity <emphasis
4433 role="bold">anonymous</emphasis> to users and processes that do not
4434 have a valid token. The <emphasis role="bold">anonymous</emphasis>
4435 identity has only the access granted to the <emphasis
4436 role="bold">system:anyuser</emphasis> group on ACLs.</para>
4439 <title>Authorization Checking</title>
4441 <para>Mutual authentication establishes that two parties
4442 communicating with one another are actually who they claim to be.
4443 For many functions, AFS server processes also check that the
4444 client whose identity they have verified is also authorized to
4445 make the request. Different requests require different kinds of
4446 privilege. See <link linkend="HDRWQ73">Three Types of
4447 Privilege</link>.</para>
4451 <title>Encrypted Network Communications</title>
4454 <primary>network</primary>
4456 <secondary>encrypted communication in AFS</secondary>
4460 <primary>encrypted network communication</primary>
4464 <primary>security</primary>
4466 <secondary>encrypted network communication</secondary>
4469 <para>The AFS server processes encrypt particularly sensitive
4470 information before sending it back to clients. Even if an
4471 unauthorized party is able to eavesdrop on an authenticated
4472 connection, they cannot decipher encrypted data without the proper
4476 <para>The following AFS commands encrypt data because they involve
4477 server encryption keys and passwords:
4480 <para>The <emphasis role="bold">bos addkey</emphasis> command,
4481 which adds a server encryption key to the <emphasis
4482 role="bold">/usr/afs/etc/KeyFile</emphasis> file</para>
4486 <para>The <emphasis role="bold">bos listkeys</emphasis>
4487 command, which lists the server encryption keys from the
4488 <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis>
4493 <para>The <emphasis role="bold">kpasswd</emphasis> command,
4494 which changes a password in the Authentication Database</para>
4498 <para>Most commands in the <emphasis
4499 role="bold">kas</emphasis> command suite</para>
4504 <para>In addition, the Update Server
4505 encrypts sensitive information (such as the contents of <emphasis
4506 role="bold">KeyFile</emphasis>) when distributing it. Other commands
4507 in the <emphasis role="bold">bos</emphasis> suite and the commands
4508 in the <emphasis role="bold">fs</emphasis>, <emphasis
4509 role="bold">pts</emphasis> and <emphasis role="bold">vos</emphasis>
4510 suites do not encrypt data before transmitting it.</para>
4513 <sect2 id="HDRWQ73">
4514 <title>Three Types of Privilege</title>
4516 <para>AFS uses three separate types of privilege for the reasons
4517 discussed in <link linkend="HDRWQ585">The Reason for Separate
4521 <para>Membership in the <emphasis
4522 role="bold">system:administrators</emphasis> group. Members
4523 are entitled to issue any <emphasis role="bold">pts</emphasis>
4524 command and those <emphasis role="bold">fs</emphasis> commands
4525 that set volume quota. By default, they also implicitly have
4526 the <emphasis role="bold">a</emphasis> (<emphasis
4527 role="bold">administer</emphasis>) and <emphasis
4528 role="bold">l</emphasis> (<emphasis
4529 role="bold">lookup</emphasis>) permissions on every ACL in the
4530 file tree even if the ACL does not include an entry for
4535 <para>The <computeroutput>ADMIN</computeroutput> flag on the
4536 Authentication Database entry. An administrator with this flag
4537 can issue any <emphasis role="bold">kas</emphasis>
4542 <para>Inclusion in the <emphasis
4543 role="bold">/usr/afs/etc/UserList</emphasis> file. An
4544 administrator whose username appears in this file can issue
4545 any <emphasis role="bold">bos</emphasis>, <emphasis
4546 role="bold">vos</emphasis>, or <emphasis
4547 role="bold">backup</emphasis> command (although some <emphasis
4548 role="bold">backup</emphasis> commands require additional
4549 privilege as described in <link linkend="HDRWQ260">Granting
4550 Administrative Privilege to Backup Operators</link>).</para>
4556 <sect2 id="Header_89">
4557 <title>Authorization Checking versus Authentication</title>
4559 <para>AFS distinguishes between authentication and authorization
4560 checking. Authentication refers to the process of proving
4561 identity. Authorization checking refers to the process of verifying
4562 that an authenticated identity is allowed to perform a certain
4565 <para>AFS implements authentication at the level of
4566 connections. Each time two parties establish a new connection, they
4567 mutually authenticate. In general, each issue of an AFS command
4568 establishes a new connection between AFS server process and
4571 <para>AFS implements authorization checking at the level of server
4572 machines. If authorization checking is enabled on a server machine,
4573 then all of the server processes running on it provide services only
4574 to authorized users. If authorization checking is disabled on a
4575 server machine, then all of the server processes perform any action
4576 for anyone. Obviously, disabling authorization checking is an
4577 extreme security exposure. For more information, see <link
4578 linkend="HDRWQ123">Managing Authentication and Authorization
4579 Requirements</link>.</para>
4582 <sect2 id="HDRWQ74">
4583 <title>Improving Security in Your Cell</title>
4586 <primary>security</primary>
4588 <secondary>suggestions for improving</secondary>
4591 <para>You can improve the level of security in your cell by
4592 configuring user accounts, server machines, and system administrator
4593 accounts in the indicated way.</para>
4596 <title>User Accounts</title>
4601 <para>Use an AFS-modified login utility, or include the
4602 <emphasis role="bold">-setpag</emphasis> flag to the
4603 <emphasis role="bold">klog</emphasis> command, to associate
4604 the credential structure that houses tokens with a PAG
4605 rather than a UNIX UID. This prevents users from inheriting
4606 someone else's tokens by assuming their UNIX identity. For
4607 further discussion, see <link linkend="HDRWQ64">Identifying
4608 AFS Tokens by PAG</link>.</para>
4612 <para>Encourage users to issue the <emphasis
4613 role="bold">unlog</emphasis> command to destroy their tokens
4614 before logging out. This forestalls attempts to access
4615 tokens left behind kernel memory. Consider including the
4616 <emphasis role="bold">unlog</emphasis> command in every
4617 user's <emphasis role="bold">.logout</emphasis> file or
4625 <title>Server Machines</title>
4630 <para>Disable authorization checking only in emergencies or
4631 for very brief periods of time. It is best to work at the
4632 console of the affected machine during this time, to prevent
4633 anyone else from accessing the machine through the
4638 <para>Change the AFS server encryption key on a frequent and
4639 regular schedule. Make it difficult to guess (a long string
4640 including nonalphabetic characters, for instance). Unlike
4641 user passwords, the password from which the AFS key is
4642 derived can be longer than eight characters, because it is
4643 never used during login. The <emphasis role="bold">kas
4644 setpassword</emphasis> command accepts a password hundreds
4645 of characters long. For instructions, see <link
4646 linkend="HDRWQ355">Managing Server Encryption
4651 <para>As much as possible, limit the number of people who
4652 can login at a server machine's console or remotely.
4653 Imposing this limit is an extra security precaution rather
4654 than a necessity. The machine cannot serve as an AFS client
4655 in this case.</para>
4659 <para>Particularly limit access to the local superuser
4660 <emphasis role="bold">root</emphasis> account on a server
4661 machine. The local superuser <emphasis
4662 role="bold">root</emphasis> has free access to important
4663 administrative subdirectories of the <emphasis
4664 role="bold">/usr/afs</emphasis> directory, as described in
4665 <link linkend="HDRWQ53">AFS Files on the Local
4669 <primary>root superuser</primary>
4671 <secondary>limiting logins</secondary>
4676 <para>As in any computing environment, server machines must
4677 be located in a secured area. Any other security measures
4678 are effectively worthless if unauthorized people can access
4679 the computer hardware.</para>
4686 <title>System Administrators</title>
4691 <para>Limit the number of system administrators in your
4692 cell. Limit the use of system administrator accounts on
4693 publicly accessible workstations. Such machines are not
4694 secure, so unscrupulous users can install programs that try
4695 to steal tokens or passwords. If administrators must use
4696 publicly accessible workstations at times, they must issue
4697 the <emphasis role="bold">unlog</emphasis> command before
4698 leaving the machine.</para>
4702 <para>Create an administrative account for each
4703 administrator separate from the personal account, and assign
4704 AFS privileges only to the administrative account. The
4705 administrators must authenticate to the administrative
4706 accounts to perform duties that require privilege, which
4707 provides a useful audit trail as well.</para>
4711 <para>Administrators must not leave a machine unattended
4712 while they have valid tokens. Issue the <emphasis
4713 role="bold">unlog</emphasis> command before leaving.</para>
4717 <para>Use the <emphasis role="bold">-lifetime</emphasis>
4718 argument to the <emphasis role="bold">kas
4719 setfields</emphasis> command to set the token lifetime for
4720 administrative accounts to a fairly short amount of time.
4721 The default lifetime for AFS tokens is 25 hours, but 30 or
4722 60 minutes is possibly a more reasonable lifetime for
4723 administrative tokens. The tokens for administrators who
4724 initiate AFS Backup System operations must last somewhat
4725 longer, because it can take several hours to complete some
4726 dump operations, depending on the speed of the tape device
4727 and the network connecting it to the file server machines
4728 that house the volumes is it accessing.</para>
4732 <para>Limit administrators' use of the <emphasis
4733 role="bold">telnet</emphasis> program. It sends unencrypted
4734 passwords across the network. Similarly, limit use of other
4735 remote programs such as <emphasis role="bold">rsh</emphasis>
4736 and <emphasis role="bold">rcp</emphasis>, which send
4737 unencrypted tokens across the network.</para>
4744 <sect2 id="HDRWQ75">
4745 <title>A More Detailed Look at Mutual Authentication</title>
4748 <primary>mutual authentication</primary>
4752 <primary>distributed file system</primary>
4754 <secondary>security issues</secondary>
4758 <primary>shared secret</primary>
4762 <primary>server encryption key</primary>
4764 <secondary>defined</secondary>
4767 <para>As in any file system, security is a prime concern in AFS. A
4768 file system that makes file sharing easy is not useful if it makes
4769 file sharing mandatory, so AFS incorporates several features that
4770 prevent unauthorized users from accessing data. Security in a
4771 networked environment is difficult because almost all procedures
4772 require transmission of information across wires that almost anyone
4773 can tap into. Also, many machines on networks are powerful enough
4774 that unscrupulous users can monitor transactions or even intercept
4775 transmissions and fake the identity of one of the
4776 participants.</para>
4778 <para>The most effective precaution against eavesdropping and
4779 information theft or fakery is for servers and clients to accept the
4780 claimed identity of the other party only with sufficient proof. In
4781 other words, the nature of the network forces all parties on the
4782 network to assume that the other party in a transaction is not
4783 genuine until proven so. Mutual authentication is the means through
4784 which parties prove their genuineness.</para>
4786 <para>Because the measures needed to prevent fakery must be quite
4787 sophisticated, the implementation of mutual authentication
4788 procedures is complex. The underlying concept is simple, however:
4789 parties prove their identities by demonstrating knowledge of a
4790 shared secret. A shared secret is a piece of information known only
4791 to the parties who are mutually authenticating (they can sometimes
4792 learn it in the first place from a trusted third party or some other
4793 source). The party who originates the transaction presents the
4794 shared secret and refuses to accept the other party as valid until
4795 it shows that it knows the secret too.</para>
4797 <para>The most common form of shared secret in AFS transactions is
4798 the encryption key, also referred to simply as a key. The two
4799 parties use their shared key to encrypt the packets of information
4800 they send and to decrypt the ones they receive. Encryption using
4801 keys actually serves two related purposes. First, it protects
4802 messages as they cross the network, preventing anyone who does not
4803 know the key from eavesdropping. Second, ability to encrypt and
4804 decrypt messages successfully indicates that the parties are using
4805 the key (it is their shared secret). If they are using different
4806 keys, messages remain scrambled and unintelligible after
4809 <para>The following sections describe AFS's mutual authentication
4810 procedures in more detail. Feel free to skip these sections if you
4811 are not interested in the mutual authentication process.</para>
4813 <sect3 id="Header_92">
4814 <title>Simple Mutual Authentication</title>
4816 <para>Simple mutual authentication involves only one encryption
4817 key and two parties, generally a client and server. The client
4818 contacts the server by sending a challenge message encrypted with
4819 a key known only to the two of them. The server decrypts the
4820 message using its key, which is the same as the client's if they
4821 really do share the same secret. The server responds to the
4822 challenge and uses its key to encrypt its response. The client
4823 uses its key to decrypt the server's response, and if it is
4824 correct, then the client can be sure that the server is genuine:
4825 only someone who knows the same key as the client can decrypt the
4826 challenge and answer it correctly. On its side, the server
4827 concludes that the client is genuine because the challenge message
4828 made sense when the server decrypted it.</para>
4830 <para>AFS uses simple mutual authentication to verify user
4831 identities during the first part of the login procedure. In that
4832 case, the key is based on the user's password.</para>
4835 <sect3 id="HDRWQ76">
4836 <title>Complex Mutual Authentication</title>
4838 <para>Complex mutual authentication involves three encryption keys
4839 and three parties. All secure AFS transactions (except the first
4840 part of the login process) employ complex mutual
4841 authentication.</para>
4844 <primary>ticket-granter</primary>
4848 <primary>server encryption key</primary>
4852 <primary>tokens</primary>
4854 <secondary>data in</secondary>
4857 <para>When a client wishes to communicate with a server, it first
4858 contacts a third party called a ticket-granter. The ticket-granter
4859 and the client mutually authenticate using the simple
4860 procedure. When they finish, the ticket-granter gives the client a
4861 server ticket (or simply ticket) as proof that it (the
4862 ticket-granter) has preverified the identity of the client. The
4863 ticket-granter encrypts the ticket with the first of the three
4864 keys, called the server encryption key because it is known only to
4865 the ticket-granter and the server the client wants to contact. The
4866 client does not know this key.</para>
4868 <para>The ticket-granter sends several other pieces of information
4869 along with the ticket. They enable the client to use the ticket
4870 effectively despite being unable to decrypt the ticket
4871 itself. Along with the ticket, the items constitute a token:
4874 <para>A session key, which is the second encryption key
4875 involved in mutual authentication. The ticket-granter
4876 invents the session key at random as the shared secret
4877 between client and server. For reasons explained further
4878 below, the ticket-granter also puts a copy of the session
4879 key inside the ticket. The client and server use the session
4880 key to encrypt messages they send to one another during
4881 their transactions. The ticket-granter invents a different
4882 session key for each connection between a client and a
4883 server (there can be several transactions during a single
4887 <primary>session key</primary>
4892 <para>The name of the server for which the ticket is valid
4893 (and so which server encryption key encrypts the ticket
4898 <para>A ticket lifetime indicator. The default lifetime of
4899 AFS server tickets is 100 hours. If the client wants to
4900 contact the server again after the ticket expires, it must
4901 contact the ticket-granter to get a new ticket.</para>
4906 <para>The ticket-granter seals the entire token with the third key
4907 involved in complex mutual authentication--the key known only to
4908 it (the ticket-granter) and the client. In some cases, this third
4909 key is derived from the password of the human user whom the client
4912 <para>Now that the client has a valid server ticket, it is ready
4913 to contact the server. It sends the server two things:
4916 <para>The server ticket. This is encrypted with the server
4917 encryption key.</para>
4921 <para>Its request message, encrypted with the session
4922 key. Encrypting the message protects it as it crosses the
4923 network, since only the server/client pair for whom the
4924 ticket-granter invented the session key know it.</para>
4929 <para>At this point, the server does not know the session key,
4930 because the ticket-granter just created it. However, the
4931 ticket-granter put a copy of the session key inside the
4932 ticket. The server uses the server encryption key to decrypts the
4933 ticket and learns the session key. It then uses the session key to
4934 decrypt the client's request message. It generates a response and
4935 sends it to the client. It encrypts the response with the session
4936 key to protect it as it crosses the network.</para>
4938 <para>This step is the heart of mutual authentication between
4939 client and server, because it proves to both parties that they
4940 know the same secret:
4943 <para>The server concludes that the client is authorized to
4944 make a request because the request message makes sense when
4945 the server decrypts it using the session key. If the client
4946 uses a different session key than the one the server finds
4947 inside the ticket, then the request message remains
4948 unintelligible even after decryption. The two copies of the
4949 session key (the one inside the ticket and the one the
4950 client used) can only be the same if they both came from the
4951 ticket-granter. The client cannot fake knowledge of the
4952 session key because it cannot look inside the ticket, sealed
4953 as it is with the server encryption key known only to the
4954 server and the ticket-granter. The server trusts the
4955 ticket-granter to give tokens only to clients with whom it
4956 (the ticket-granter) has authenticated, so the server
4957 decides the client is legitimate.</para>
4959 <para>(Note that there is no direct communication between
4960 the ticket-granter and the server, even though their
4961 relationship is central to ticket-based mutual
4962 authentication. They interact only indirectly, via the
4963 client's possession of a ticket sealed with their shared
4968 <para>The client concludes that the server is genuine and
4969 trusts the response it gets back from the server, because
4970 the response makes sense after the client decrypts it using
4971 the session key. This indicates that the server encrypted
4972 the response with the same session key as the client
4973 knows. The only way for the server to learn that matching
4974 session key is to decrypt the ticket first. The server can
4975 only decrypt the ticket because it shares the secret of the
4976 server encryption key with the ticket-granter. The client
4977 trusts the ticket-granter to give out tickets only for
4978 legitimate servers, so the client accepts a server that can
4979 decrypt the ticket as genuine, and accepts its
4988 <sect1 id="HDRWQ77">
4989 <title>Backing Up AFS Data</title>
4991 <para>AFS provides two related facilities that help the administrator
4992 back up AFS data: backup volumes and the AFS Backup System.</para>
4994 <sect2 id="Header_95">
4995 <title>Backup Volumes</title>
4997 <para>The first facility is the backup volume, which you create by
4998 cloning a read/write volume. The backup volume is read-only and so
4999 preserves the state of the read/write volume at the time the clone
5002 <para>Backup volumes can ease administration if you mount them in
5003 the file system and make their contents available to users. For
5004 example, it often makes sense to mount the backup version of each
5005 user volume as a subdirectory of the user's home directory. A
5006 conventional name for this mount point is <emphasis
5007 role="bold">OldFiles</emphasis>. Create a new version of the backup
5008 volume (that is, reclone the read/write) once a day to capture any
5009 changes that were made since the previous backup. If a user
5010 accidentally removes or changes data, the user can restore it from
5011 the backup volume, rather than having to ask you to restore
5014 <para>The OpenAFS User Guide does not mention backup volumes, so
5015 regular users do not know about them if you decide not to use
5016 them. This implies that if you <emphasis role="bold">do</emphasis>
5017 make backup versions of user volumes, you need to tell your users
5018 about how the backup works and where you have mounted it.</para>
5020 <para>Users are often concerned that the data in a backup volume
5021 counts against their volume quota and some of them even want to
5022 remove the <emphasis role="bold">OldFiles</emphasis> mount point. It
5023 does not, because the backup volume is a separate volume. The only
5024 amount of space it uses in the user's volume is the amount needed
5025 for the mount point, which is about the same as the amount needed
5026 for a standard directory element.</para>
5028 <para>Backup volumes are discussed in detail in <link
5029 linkend="HDRWQ201">Creating Backup Volumes</link>.</para>
5032 <sect2 id="Header_96">
5033 <title>The AFS Backup System</title>
5035 <para>Backup volumes can reduce restoration requests, but they
5036 reside on disk and so do not protect data from loss due to hardware
5037 failure. Like any file system, AFS is vulnerable to this sort of
5040 <para>To protect your cell's users from permanent loss of data, you
5041 are strongly urged to back up your file system to tape on a regular
5042 and frequent schedule. The AFS Backup System is available to ease
5043 the administration and performance of backups. For detailed
5044 information about the AFS Backup System, see <link
5045 linkend="HDRWQ248">Configuring the AFS Backup System</link> and
5046 <link linkend="HDRWQ283">Backing Up and Restoring AFS
5051 <sect1 id="HDRWQ79">
5052 <title>Accessing AFS through NFS</title>
5054 <para>Users of NFS client machines can access the AFS filespace by
5055 mounting the <emphasis role="bold">/afs</emphasis> directory of an AFS
5056 client machine that is running the NFS/AFS Translator. This is a
5057 particular advantage in cells already running NFS who want to access
5058 AFS using client machines for which AFS is not available. See <link
5059 linkend="HDRWQ595">Appendix A, Managing the NFS/AFS
5060 Translator</link>.</para>