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>
35 <title>Differences between AFS and UNIX: A Summary</title>
37 <para>AFS behaves like a standard UNIX file system in most respects,
38 while also making file sharing easy within and between cells. This
39 section describes some differences between AFS and the UNIX file
40 system, referring you to more detailed information as
44 <primary>protection</primary>
46 <secondary>AFS compared to UNIX</secondary>
49 <sect2 id="Header_35">
50 <title>Differences in File and Directory Protection</title>
52 <para>AFS augments the standard UNIX file protection mechanism in
53 two ways: it associates an <emphasis>access control list
54 (ACL)</emphasis> with each directory, and it enables users to define
55 a large number of their own groups, which can be placed on
58 <para>AFS uses ACLs to protect files and directories, rather than
59 relying exclusively on the mode bits. This has several implications,
60 which are discussed further in the indicated sections:
63 <para>AFS ACLs use seven access permissions rather than the
64 three UNIX mode bits. See <link linkend="HDRWQ567">The AFS ACL
65 Permissions</link>.</para>
69 <para>For directories, AFS ignores the UNIX mode bits. For
70 files, AFS uses only the first set of mode bits (the <emphasis
71 role="bold">owner</emphasis> bits) , and their meaning
72 interacts with permissions on the directory's ACL. See <link
73 linkend="HDRWQ580">How AFS Interprets the UNIX Mode
78 <para>A directory's ACL protects all of the files in a
79 directory in the same manner. To apply a more restrictive set
80 of AFS permissions to certain file, place it in directory with
81 a different ACL.</para>
85 <para>Moving a file to a different directory changes its
86 protection. See <link linkend="HDRWQ566">Differences Between
87 UFS and AFS Data Protection</link>.</para>
91 <para>An ACL can include about 20 entries granting different
92 combinations of permissions to different users or groups,
93 rather than only the three UNIX entities represented by the
94 three sets of mode bits. See <link
95 linkend="HDRWQ566">Differences Between UFS and AFS Data
96 Protection</link>.</para>
100 <para>You can designate an AFS file as write-only as in the
101 UNIX file system, by setting only the <emphasis
102 role="bold">w</emphasis> (<emphasis
103 role="bold">write</emphasis>) mode bit. You cannot designate
104 an AFS directory as write-only, because AFS ignores the mode
105 bits on a directory. See <link linkend="HDRWQ580">How AFS
106 Interprets the UNIX Mode Bits</link>.</para>
111 <para>AFS enables users to define the groups of other users. Placing
112 these groups on ACLs extends the same permissions to a number of
113 exactly specified users at the same time, which is much more
114 convenient than placing the individuals on the ACLs directly. See
115 <link linkend="HDRWQ531">Administering the Protection
116 Database</link>.</para>
118 <para>There are also system-defined groups, <emphasis
119 role="bold">system:anyuser</emphasis> and <emphasis
120 role="bold">system:authuser</emphasis>, whose presence on an ACL
121 extends access to a wide range of users at once. See <link
122 linkend="HDRWQ535">The System Groups</link> and <link
123 linkend="HDRWQ571">Using Groups on ACLs</link>.</para>
126 <primary>authentication</primary>
128 <secondary>AFS compared to UNIX</secondary>
132 <primary>password</primary>
134 <secondary>AFS compared to UNIX</secondary>
139 <title>Differences in Authentication</title>
141 <para>Just as the AFS filespace is distinct from each machine's
142 local file system, AFS authentication is separate from local
143 login. This has two practical implications, which are discussed
144 further in <link linkend="HDRWQ65">Using an AFS-modified login
145 Utility</link>. <itemizedlist>
147 <para>To access AFS files, users must both log into the local
148 machine's UNIX file system and authenticate with the AFS
149 authentication service. (Logging into the local UNIX file
150 system is necessary because the AFS filespace is accessed
151 through the Cache Manager, which resides in the local
152 machine's kernel.)</para>
154 <para>AFS provides a modified login utility for each system
155 type that accomplishes both local login and AFS authentication
156 in one step, based on a single password. If you choose not to
157 use the AFS-modified login utility, your users must login and
158 authenticate in separate steps, as detailed in the
159 <emphasis>OpenAFS User Guide</emphasis>.</para>
163 <para>Passwords may be stored in two separate places: the
164 Kerberos Server and, optionally, each machine's local password
165 file (<emphasis role="bold">/etc/passwd</emphasis> or
166 equivalent) for the UNIX file system. A user's passwords in
167 the two places can differ if desired, though the resulting
168 behavior depends on whether and how the cell is using an
169 AFS-modified login utility.</para>
175 <sect2 id="Header_37">
176 <title>Differences in the Semantics of Standard UNIX
179 <para>This section summarizes how AFS modifies the functionality of
180 some UNIX commands. <variablelist>
182 <primary>chmod command</primary>
184 <secondary>AFS compared to UNIX</secondary>
188 <primary>commands</primary>
190 <secondary>chmod (AFS compared to UNIX)</secondary>
194 <primary>setuid programs</primary>
196 <secondary>setting mode bits</secondary>
200 <term><emphasis role="bold">The chmod
201 command</emphasis></term>
204 <para>Only members of the <emphasis
205 role="bold">system:administrators</emphasis> group can use
206 this command to turn on the setuid, setgid or sticky mode
207 bits on AFS files. For more information, see <link
208 linkend="HDRWQ409">Determining if a Client Can Run Setuid
209 Programs</link>.</para>
212 <primary>chown command</primary>
214 <secondary>AFS compared to UNIX</secondary>
218 <primary>commands</primary>
220 <secondary>chown (AFS compared to UNIX)</secondary>
226 <term><emphasis role="bold">The chown
227 command</emphasis></term>
230 <para>Only members of the <emphasis
231 role="bold">system:administrators</emphasis> group can issue
232 this command on AFS files.</para>
235 <primary>chgrp command</primary>
237 <secondary>AFS compared to UNIX</secondary>
241 <primary>commands</primary>
243 <secondary>chgrp (AFS compared to UNIX)</secondary>
249 <term><emphasis role="bold">The chgrp
250 command</emphasis></term>
253 <para>Only members of the <emphasis
254 role="bold">system:administrators</emphasis> can issue this
255 command on AFS files and directories.</para>
258 <primary>groups command</primary>
260 <secondary>AFS compared to UNIX</secondary>
264 <primary>commands</primary>
266 <secondary>groups (AFS compared to UNIX)</secondary>
272 <term><emphasis role="bold">The groups
273 command</emphasis></term>
276 <para>If the user's AFS tokens are associated with a process
277 authentication group (PAG), the output of this command can
278 include one or two large numbers. To learn about PAGs, see
279 <link linkend="HDRWQ64">Identifying AFS Tokens by
283 <primary>login utility</primary>
285 <secondary>AFS compared to UNIX</secondary>
289 <primary>commands</primary>
291 <secondary>login (AFS compared to UNIX)</secondary>
298 <term><emphasis role="bold">The login
299 utility</emphasis></term>
302 <para>AFS-modified login utilities both log the issuer into
303 the local file system and authenticate the user with the AFS
304 authentication service. See <link linkend="HDRWQ65">Using an
305 AFS-modified login Utility</link>.</para>
308 <primary>ln command</primary>
310 <secondary>AFS compared to UNIX</secondary>
314 <primary>commands</primary>
316 <secondary>ln (AFS compared to UNIX)</secondary>
322 <term><emphasis role="bold">The ln command</emphasis></term>
325 <para>This command cannot create hard links between files in
326 different AFS directories. See <link
327 linkend="HDRWQ32">Creating Hard Links</link>.</para>
330 <primary>sshd command</primary>
332 <secondary>AFS compared to UNIX</secondary>
336 <primary>commands</primary>
338 <secondary>sshd (AFS compared to UNIX)</secondary>
344 <term><emphasis role="bold">The sshd daemon</emphasis></term>
347 <para>The <ulink url="http://www.openssh.org/">OpenSSH
348 project</ulink> provides an sshd daemon that uses the GSSAPI
349 protocol to pass Kerberos tickets between machines.</para>
352 <primary>ssh command</primary>
354 <secondary>AFS compared to UNIX</secondary>
358 <primary>commands</primary>
360 <secondary>ssh (AFS compared to UNIX)</secondary>
368 <primary>fsck command</primary>
370 <secondary>AFS compared to UNIX</secondary>
374 <primary>inode-based fileserver</primary>
378 <primary>namei-based fileserver</primary>
382 <primary>commands</primary>
384 <secondary>fsck (AFS compared to UNIX)</secondary>
388 <primary>fsck command</primary>
390 <secondary>AFS version</secondary>
394 <primary>commands</primary>
396 <secondary>fsck (AFS version)</secondary>
400 <primary>directories</primary>
402 <secondary>lost+found</secondary>
406 <primary>lost+found directory</primary>
410 <sect2 id="Header_38">
411 <title>The AFS version of the fsck Command and inode-based
415 <para>The fileserver uses either of two formats for storing data
416 on disk. The inode format uses a combination of regular files and
417 extra fields stored in the inode data structures that are normally
418 reserved for use by the operating system. The namei interface uses
419 normal file storage and does not use special structures. The
420 choice of storage formats is chosen at compile time and the two
421 formats are incompatible. The storage format must be consistent
422 for the fileserver binaries and all vice partitions on a given
423 fileserver machine.</para>
426 <important><para>This section on fsck advice only applies to the
427 inode-based fileserver binaries. On servers using namei-based
428 binaries, the vendor-supplied fsck is required.</para></important>
430 <para>If you are using AFS fileserver binaries compiled with the
431 inode-based format, never run the standard UNIX <emphasis
432 role="bold">fsck</emphasis> command on an AFS file server
433 machine. It does not understand how the File Server organizes volume
434 data on disk, and so moves all AFS data into the <emphasis
435 role="bold">lost+found</emphasis> directory on the partition.</para>
437 <para>Instead, use the version of the <emphasis
438 role="bold">fsck</emphasis> program that is included in the AFS
439 distribution. The <emphasis>OpenAFS Quick Beginnings</emphasis>
440 explains how to replace the vendor-supplied <emphasis
441 role="bold">fsck</emphasis> program with the AFS version as you
442 install each server machine.</para>
444 <para>The AFS version functions like the standard <emphasis
445 role="bold">fsck</emphasis> program on data stored on both UFS and
446 AFS partitions. The appearance of a banner like the following as the
447 <emphasis role="bold">fsck</emphasis> program initializes confirms
448 that you are running the correct one:</para>
451 --- AFS (R) version fsck---
454 <para>where <emphasis>version</emphasis> is the AFS version. For
455 correct results, it must match the AFS version of the server
456 binaries in use on the machine.</para>
458 <para>If you ever accidentally run the standard version of the
459 program, contact your AFS support provider or refer to the <ulink
460 url="http://www.openafs.org/support.html">OpenAFS support web
461 page</ulink> for support options. It is sometimes possible to
462 recover volume data from the <emphasis
463 role="bold">lost+found</emphasis> directory. If the data is not
464 recoverabled, then restoring from backup is recommended.</para>
466 <warning><para>Running the fsck binary supplied by the operating
467 system vendor on an fileserver using inode-based binaries will
468 result in data corruption!</para></warning>
471 <primary>hard link</primary>
473 <secondary>AFS restrictions on</secondary>
477 <primary>restrictions</primary>
479 <secondary>on hard links in AFS</secondary>
484 <title>Creating Hard Links</title>
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 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,
505 <primary>fsync system call</primary>
507 <secondary>for files saved on AFS client</secondary>
511 <primary>close system call</primary>
513 <secondary>for files saved on AFS client</secondary>
517 <primary>write</primary>
519 <secondary>system call for files saved on AFS client</secondary>
524 <title>AFS Implements Save on Close</title>
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, for example if
546 it 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>Set the UNIX setuid bit only for the local superuser <emphasis
571 role="bold">root</emphasis>; this does not present an automatic
572 security risk: the local superuser has no special privilege in AFS,
573 but only in the local machine's UNIX file system and kernel.</para>
575 <para>Any file can be marked with the setuid bit, but only members
576 of the <emphasis role="bold">system:administrators</emphasis> group
577 can issue the <emphasis role="bold">chown</emphasis> system call or
578 the <emphasis role="bold">chown</emphasis> command.</para>
580 <para>The <emphasis role="bold">fs setcell</emphasis> command
581 determines whether setuid programs that originate in a foreign cell
582 can run on a given client machine. See <link
583 linkend="HDRWQ409">Determining if a Client Can Run Setuid
584 Programs</link>.</para>
587 <primary>cell</primary>
589 <secondary>name</secondary>
591 <tertiary>choosing</tertiary>
595 <primary>choosing</primary>
597 <secondary>name</secondary>
599 <tertiary>cell</tertiary>
603 <primary>conventions</primary>
605 <secondary>cell name</secondary>
609 <primary>Internet</primary>
611 <secondary>conventions for cell name</secondary>
617 <title>Choosing a Cell Name</title>
619 <para>This section explains how to choose a cell name and explains why
620 choosing an appropriate cell name is important.</para>
622 <para>Your cell name must distinguish your cell from all others in the
623 AFS global namespace. By conventions, the cell name is the second
624 element in any AFS pathname; therefore, a unique cell name guarantees
625 that every AFS pathname uniquely identifies a file, even if cells use
626 the same directory names at lower levels in their local AFS
627 filespace. For example, both the ABC Corporation cell and the State
628 University cell can have a home directory for the user <emphasis
629 role="bold">pat</emphasis>, because the pathnames are distinct:
630 <emphasis role="bold">/afs/abc.com/usr/pat</emphasis> and <emphasis
631 role="bold">/afs/stateu.edu/usr/pat</emphasis>.</para>
633 <para>By convention, cell names follow the ARPA Internet Domain System
634 conventions for site names. If you are already an Internet site, then
635 it is simplest to choose your Internet domain name as the
638 <para>If you are not an Internet site, it is best to choose a unique
639 Internet-style name, particularly if you plan to connect to the
640 Internet in the future. There are a few constraints on AFS cell names:
643 <para>It can contain as many as 64 characters, but shorter names
644 are better because the cell name frequently is part of machine
645 and file names. If your cell name is long, you can reduce
646 pathname length by creating a symbolic link to the complete cell
647 name, at the second level in your file tree. See <link
648 linkend="HDRWQ42">The Second (Cellname) Level</link>.</para>
652 <para>To guarantee it is suitable for different operating system
653 types, the cell name can contain only lowercase characters,
654 numbers, underscores, dashes, and periods. Do not include
655 command shell metacharacters.</para>
659 <para>It can include any number of fields, which are
660 conventionally separated by periods (see the examples
665 <para>It must end in a suffix that indicates the type of
666 institution it is, or the country in which it is situated. The
667 following are some of the standard suffixes:
670 <term><emphasis role="bold">.com</emphasis></term>
673 <para>For businesses and other commercial
674 organizations. Example: <emphasis
675 role="bold">abc.com</emphasis> for the ABC Corporation
677 </listitem> </varlistentry>
680 <term><emphasis role="bold">.edu</emphasis></term>
683 <para>For educational institutions such as
684 universities. Example: <emphasis
685 role="bold">stateu.edu</emphasis> for the State
686 University cell.</para>
687 </listitem> </varlistentry>
690 <term><emphasis role="bold">.gov</emphasis></term>
693 <para>For United States government institutions.</para>
698 <term><emphasis role="bold">.mil</emphasis></term>
701 <para>For United States military installations.</para>
711 <primary>Internet</primary>
713 <secondary>Domain Registrar</secondary>
717 <primary>Domain Registrar</primary>
720 <para>Other suffixes are available if none of these are
721 appropriate. Contact a domain registrar to purchase a domain name for
725 <primary>setting</primary>
727 <secondary>cell name</secondary>
731 <primary>cell</primary>
733 <secondary>name</secondary>
735 <tertiary>setting</tertiary>
739 <primary>server machine</primary>
741 <secondary>setting home cell</secondary>
745 <primary>client machine</primary>
747 <secondary>setting home cell</secondary>
750 <sect2 id="Header_43">
751 <title>How to Set the Cell Name</title>
753 <para>The cell name is recorded in two files on the local disk of
754 each file server and client machine. Among other functions, these
755 files define the machine's cell membership and so affect how
756 programs and processes run on the machine; see <link
757 linkend="HDRWQ35">Why Choosing the Appropriate Cell Name is
758 Important</link>. The procedure for setting the cell name is
759 different for the two types of machines.</para>
761 <para>For file server machines, the two files that record the cell
762 name are the <emphasis role="bold">/usr/afs/etc/ThisCell</emphasis>
763 and <emphasis role="bold">/usr/afs/etc/CellServDB</emphasis>
764 files. As described more explicitly in the <emphasis>OpenAFS Quick
765 Beginnings</emphasis>, you set the cell name in both by issuing the
766 <emphasis role="bold">bos setcellname</emphasis> command on the
767 first file server machine you install in your cell. It is not
768 usually necessary to issue the command again. If you use the Update
769 Server, it distributes its copy of the <emphasis
770 role="bold">ThisCell</emphasis> and <emphasis
771 role="bold">CellServDB</emphasis> files to additional server
772 machines that you install. If you do not use the Update Server, the
773 <emphasis>OpenAFS Quick Beginnings</emphasis> explains how to copy
774 the files manually.</para>
776 <para>For client machines, the two files that record the cell name
777 are the <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and
778 <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> files. You
779 create these files on a per-client basis, either with a text editor
780 or by copying them onto the machine from a central source in AFS.
781 See <link linkend="HDRWQ406">Maintaining Knowledge of Database
782 Server Machines</link> for details.</para>
784 <para>Change the cell name in these files only when you want to
785 transfer the machine to a different cell (it can only belong to one
786 cell at a time). If the machine is a file server, follow the
787 complete set of instructions in the <emphasis>OpenAFS Quick
788 Beginnings</emphasis> for configuring a new cell. If the machine is
789 a client, all you need to do is change the files appropriately and
790 reboot the machine. The next section explains further the negative
791 consequences of changing the name of an existing cell.</para>
793 <para>To set the default cell name used by most AFS commands without
794 changing the local <emphasis
795 role="bold">/usr/vice/etc/ThisCell</emphasis> file, set the AFSCELL
796 environment variable in the command shell. It is worth setting this
797 variable if you need to complete significant administrative work in
798 a foreign cell.</para>
801 <para>The <emphasis role="bold">fs checkservers</emphasis> and
802 <emphasis role="bold">fs mkmount</emphasis> commands do not use
803 the AFSCELL variable. The <emphasis role="bold">fs
804 checkservers</emphasis> command always defaults to the cell named
805 in the <emphasis role="bold">ThisCell</emphasis> file, unless the
806 <emphasis role="bold">-cell</emphasis> argument is used. The
807 <emphasis role="bold">fs mkmount</emphasis> command defaults to
808 the cell in which the parent directory of the new mount point
813 <primary>ThisCell file (client)</primary>
815 <secondary>how used by programs</secondary>
820 <title>Why Choosing the Appropriate Cell Name is Important</title>
822 <para>Take care to select a cell name that is suitable for long-term
823 use. Changing a cell name later is complicated. An appropriate cell
824 name is important because it is the second element in the pathname
825 of all files in a cell's file tree. Because each cell name is
826 unique, its presence in an AFS pathname makes the pathname unique in
827 the AFS global namespace, even if multiple cells use similar
828 filespace organization at lower levels. For instance, it means that
829 every cell can have a home directory called <emphasis
830 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
831 role="bold">/usr/pat</emphasis> without causing a conflict. The
832 presence of the cell name in pathnames also means that users in
833 every cell use the same pathname to access a file, whether the file
834 resides in their local cell or in a foreign cell.</para>
836 <para>Another reason to choose the correct cell name early in the
837 process of installing your cell is that the cell membership defined
838 in each machine's <emphasis role="bold">ThisCell</emphasis> file
839 affects the performance of many programs and processes running on
840 the machine. For instance, AFS commands (<emphasis
841 role="bold">fs</emphasis>, <emphasis role="bold">kas</emphasis>,
842 <emphasis role="bold">pts</emphasis> and <emphasis
843 role="bold">vos</emphasis> commands) by default execute in the cell
844 of the machine on which they are issued. The command interpreters
845 check the <emphasis role="bold">ThisCell</emphasis> file on the
846 local disk and then contact the database server machines listed in
847 the <emphasis role="bold">CellServDB</emphasis> file for the
848 indicated cell (the <emphasis role="bold">bos</emphasis> commands
849 work differently because the issuer always has to name of the
850 machine on which to run the command).</para> <para>The <emphasis
851 role="bold">ThisCell</emphasis> file also determines the cell for
852 which a user receives an AFS token when he or she logs in to a
853 machine.</para> <para>This method of converting passwords into
854 encryption keys means that the same password results in different
855 keys in different cells. Even if a user uses the same password in
856 multiple cells, obtaining a user's token from one cell does not
857 enable unauthorized access to the user's account in another
860 <para>If you change the cell name, you must change the <emphasis
861 role="bold">ThisCell</emphasis> and <emphasis
862 role="bold">CellServDB</emphasis> files on every server and client
863 machine. Failure to change them all can prevent login, because the
864 encryption keys produced by the login utility do not match the keys
865 stored in the Authentication Database. In addition, many commands
866 from the AFS suites do not work as expected.</para>
869 <primary>participation</primary>
871 <secondary>in AFS global namespace</secondary>
875 <primary>AFS</primary>
877 <secondary>global namespace</secondary>
881 <primary>global namespace</primary>
887 <title>Participating in the AFS Global Namespace</title>
889 <para>Participating in the AFS global namespace makes your cell's
890 local file tree visible to AFS users in foreign cells and makes other
891 cells' file trees visible to your local users. It makes file sharing
892 across cells just as easy as sharing within a cell. This section
893 outlines the procedures necessary for participating in the global
894 namespace. <itemizedlist>
896 <para>Participation in the global namespace is not
897 mandatory. Some cells use AFS primarily to facilitate file
898 sharing within the cell, and are not interested in providing
899 their users with access to foreign cells.</para>
903 <para>Making your file tree visible does not mean making it
904 vulnerable. You control how foreign users access your cell using
905 the same protection mechanisms that control local users'
906 access. See <link linkend="HDRWQ40">Granting and Denying Foreign
907 Users Access to Your Cell</link>.</para>
911 <para>The two aspects of participation are independent. A cell
912 can make its file tree visible without allowing its users to see
913 foreign cells' file trees, or can enable its users to see other
914 file trees without advertising its own.</para>
918 <para>You make your cell visible to others by advertising your
919 database server machines. See <link linkend="HDRWQ38">Making
920 Your Cell Visible to Others</link>.</para>
924 <para>You control access to foreign cells on a per-client
925 machine basis. In other words, it is possible to make a foreign
926 cell accessible from one client machine in your cell but not
927 another. See <link linkend="HDRWQ39">Making Other Cells Visible
928 in Your Cell</link>.</para>
934 <primary>conventions</primary>
936 <secondary>AFS pathnames</secondary>
940 <primary>AFS</primary>
942 <secondary>root directory (/afs)</secondary>
944 <tertiary>on client machine</tertiary>
948 <primary>directories</primary>
950 <secondary>/afs</secondary>
954 <primary>directories</primary>
956 <secondary>/afs/<emphasis>cellname</emphasis></secondary>
960 <primary>cell</primary>
962 <secondary>name</secondary>
964 <tertiary>at second level in file tree</tertiary>
968 <title>What the Global Namespace Looks Like</title>
970 <para>The AFS global namespace appears the same to all AFS cells
971 that participate in it, because they all agree to follow a small set
972 of conventions in constructing pathnames.</para>
974 <para>The first convention is that all AFS pathnames begin with the
975 string <emphasis role="bold">/afs</emphasis> to indicate that they
976 belong to the AFS global namespace.</para>
978 <para>The second convention is that the cell name is the second
979 element in an AFS pathname; it indicates where the file resides
980 (that is, the cell in which a file server machine houses the
981 file). As noted, the presence of a cell name in pathnames makes the
982 global namespace possible, because it guarantees that all AFS
983 pathnames are unique even if cells use the same directory names at
984 lower levels in their AFS filespace.</para>
986 <para>What appears at the third and lower levels in an AFS pathname
987 depends on how a cell has chosen to arrange its filespace. There
988 are some suggested conventional directories at the third level; see
989 <link linkend="HDRWQ43">The Third Level</link>.</para>
992 <primary>cell</primary>
994 <secondary>making local visible to foreign</secondary>
998 <primary>local cell</primary>
1000 <secondary>making visible to foreign cells</secondary>
1004 <primary>foreign cell</primary>
1006 <secondary>making local cell visible</secondary>
1010 <sect2 id="HDRWQ38">
1011 <title>Making Your Cell Visible to Others</title>
1013 <para>You make your cell visible to others by advertising your cell
1014 name and database server machines. Just like client machines in the
1015 local cell, the Cache Manager on machines in foreign cells use the
1016 information to reach your cell's Volume Location (VL) Servers when
1017 they need volume and file location information. For authenticated
1018 access, foreign clients must be configured with the necessary
1019 Kerberos v5 domain-to-realm mappings and Key Distribution Center
1020 location information for both the local and remote Kerberos v5
1023 <para>There are two places you can make this information available:
1026 <primary>files</primary>
1028 <secondary>global CellServDB</secondary>
1032 <primary>CellServDB file maintained by the AFS
1035 <secondary>as global update source</secondary>
1039 <para>In the global <emphasis
1040 role="bold">CellServDB</emphasis> file maintained by the AFS
1041 Registrar. This file lists the name and database server
1042 machines of every cell that has agreed to make this
1043 information available to other cells. This file is available
1045 url="http://grand.central.org/csdb.html">http://grand.central.org/csdb.html</ulink></para>
1047 <para>To add or change your cell's listing in this file,
1048 follow the instructions at <ulink
1049 url="http://grand.central.org/csdb.html">http://grand.central.org/csdb.html</ulink>.
1050 It is a good policy to check the file for changes on a
1051 regular schedule. An updated copy of this file is included
1052 with new releases of OpenAFS.</para>
1055 <primary>files</primary>
1057 <secondary>CellServDB.local</secondary>
1061 <primary>CellServDB.local file</primary>
1066 <para>A file called <emphasis
1067 role="bold">CellServDB.local</emphasis> in the <emphasis
1068 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1069 role="bold">/service/etc</emphasis> directory of your cell's
1070 filespace. List only your cell's database server
1076 <para>Update the files whenever you change the identity of your
1077 cell's database server machines. Also update the copies of the
1078 <emphasis role="bold">CellServDB</emphasis> files on all of your
1079 server machines (in the <emphasis
1080 role="bold">/usr/afs/etc</emphasis> directory) and client machines
1081 (in the <emphasis role="bold">/usr/vice/etc</emphasis>
1082 directory). For instructions, see <link
1083 linkend="HDRWQ118">Maintaining the Server CellServDB File</link> and
1084 <link linkend="HDRWQ406">Maintaining Knowledge of Database Server
1085 Machines</link>.</para>
1087 <para>Once you have advertised your database server machines, it can
1088 be difficult to make your cell invisible again. You can remove the
1089 <emphasis role="bold">CellServDB.local</emphasis> file and ask the
1090 AFS Registrar to remove your entry from the global <emphasis
1091 role="bold">CellServDB</emphasis> file, but other cells probably
1092 have an entry for your cell in their local <emphasis
1093 role="bold">CellServDB</emphasis> files already. To make those
1094 entries invalid, you must change the names or IP addresses of your
1095 database server machines.</para>
1097 <para>Your cell does not have to be invisible to be inaccessible,
1098 however. To make your cell completely inaccessible to foreign users,
1099 remove the <emphasis role="bold">system:anyuser</emphasis> group
1100 from all ACLs at the top three levels of your filespace; see <link
1101 linkend="HDRWQ40">Granting and Denying Foreign Users Access to Your
1105 <primary>cell</primary>
1107 <secondary>making foreign visible to local</secondary>
1111 <primary>local cell</primary>
1113 <secondary>making foreign cells visible in</secondary>
1117 <primary>foreign cell</primary>
1119 <secondary>making visible in local cell</secondary>
1123 <primary>client machine</primary>
1125 <secondary>making foreign cell visible</secondary>
1129 <sect2 id="HDRWQ39">
1130 <title>Making Other Cells Visible in Your Cell</title>
1132 <para>To make a foreign cell's filespace visible on a client machine
1133 in your cell that is not configured for <emphasis
1134 role="bold">Freelance Mode</emphasis> or <emphasis
1135 role="bold">Dynamic Root</emphasis> mode, perform the following
1139 <para>Mount the cell's <emphasis
1140 role="bold">root.cell</emphasis> volume at the second level in
1141 your cell's filespace just below the <emphasis
1142 role="bold">/afs</emphasis> directory. Use the <emphasis
1143 role="bold">fs mkmount</emphasis> command with the <emphasis
1144 role="bold">-cell</emphasis> argument as instructed in <link
1145 linkend="HDRWQ213">To create a cellular mount
1146 point</link>.</para>
1150 <para>Mount AFS at the <emphasis role="bold">/afs</emphasis>
1151 directory on the client machine. The <emphasis
1152 role="bold">afsd</emphasis> program, which initializes the
1153 Cache Manager, performs the mount automatically at the
1154 directory named in the first field of the local <emphasis
1155 role="bold">/usr/vice/etc/cacheinfo</emphasis> file or by the
1156 command's <emphasis role="bold">-mountdir</emphasis>
1157 argument. Mounting AFS at an alternate location makes it
1158 impossible to reach the filespace of any cell that mounts its
1159 <emphasis role="bold">root.afs</emphasis> and <emphasis
1160 role="bold">root.cell</emphasis> volumes at the conventional
1161 locations. See <link linkend="HDRWQ395">Displaying and Setting
1162 the Cache Size and Location</link>.</para>
1166 <para>Create an entry for the cell in the list of database
1167 server machines which the Cache Manager maintains in kernel
1171 role="bold">/usr/vice/etc/CellServDB</emphasis> file on every
1172 client machine's local disk lists the database server machines
1173 for the local and foreign cells. The <emphasis
1174 role="bold">afsd</emphasis> program reads the contents of the
1175 <emphasis role="bold">CellServDB</emphasis> file into kernel
1176 memory as it initializes the Cache Manager. You can also use
1177 the <emphasis role="bold">fs newcell</emphasis> command to add
1178 or alter entries in kernel memory directly between reboots of
1179 the machine. See <link linkend="HDRWQ406">Maintaining
1180 Knowledge of Database Server Machines</link>.</para>
1185 <para>Non-windows client machines may enable <emphasis
1186 role="bold">Dynamic Root Mode</emphasis> by using the <emphasis
1187 role="bold">-dynroot</emphasis> option to <emphasis
1188 role="bold">afsd</emphasis>. When this option is enabled, all cells
1189 listed in the <emphasis role="bold">CellServDB</emphasis> file will
1190 appear in the <emphasis role="bold">/afs</emphasis> directory. The
1191 contents of the <emphasis role="bold">root.afs</emphasis> volume
1192 will be ignored. </para>
1194 <para>Windows client machines may enable <emphasis
1195 role="bold">Freelance Mode</emphasis> during client installation or
1196 by setting the <emphasis role="bold">FreelanceClient</emphasis>
1197 setting under <emphasis role="bold">Service Parameters</emphasis> in
1198 the Windows Registry as mentioned in the <ulink
1199 url="http://docs.openafs.org/ReleaseNotesWindows/">Release
1200 Notes</ulink>. When this option is enabled, the <emphasis
1201 role="bold">root.afs</emphasis> volume is ignored and a mounpoint
1202 for each cell is automatically created in the the <emphasis
1203 role="bold">\\AFS</emphasis> directory when the folder <emphasis
1204 role="bold">\\AFS\<replaceable>cellname</replaceable></emphasis> is
1205 accessed and the foreign Volume Location servers can be reached.
1206 </para> <para>Note that making a foreign cell visible to client
1207 machines does not guarantee that your users can access its
1208 filespace. The ACLs in the foreign cell must also grant them the
1209 necessary permissions.</para>
1212 <primary>cell</primary>
1214 <secondary>granting local access to foreign users</secondary>
1218 <primary>local cell</primary>
1220 <secondary>granting foreign users access to</secondary>
1224 <sect2 id="HDRWQ40">
1225 <title>Granting and Denying Foreign Users Access to Your
1228 <para>Making your cell visible in the AFS global namespace does not
1229 take away your control over the way in which users from foreign
1230 cells access your file tree.</para>
1232 <para>By default, foreign users access your cell as the user
1233 <emphasis role="bold">anonymous</emphasis>, which means they have
1234 only the permissions granted to the <emphasis
1235 role="bold">system:anyuser</emphasis> group on each directory's
1236 ACL. Normally these permissions are limited to the <emphasis
1237 role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>)
1238 and <emphasis role="bold">r</emphasis> (<emphasis
1239 role="bold">read</emphasis>) permissions.</para>
1241 <para>There are three ways to grant wider access to foreign users:
1244 <para>Grant additional permissions to the <emphasis
1245 role="bold">system:anyuser</emphasis> group on certain
1246 ACLs. Keep in mind, however, that all users can then access
1247 that directory in the indicated way (not just specific foreign
1248 users you have in mind).</para>
1252 <para>Enable automatic registration for users in the foreign
1253 cell. This may be done by creating a cross-realm trust in the
1254 <emphasis role="bold">Kerberos Database</emphasis>. Then add a
1255 PTS group named <emphasis
1256 role="bold">system:authuser<replaceable>@FOREIGN.REALM</replaceable></emphasis>
1257 and give it a group quota greater than the number of foreign
1258 users expected to be registered. After the cross-realm trust
1259 and the PTS group are created, the <ulink
1260 url="http://docs.openafs.org/Reference/1/aklog.html">aklog</ulink>
1261 command will automatically register foreign users as
1262 needed. Consult the documentation for your <emphasis
1263 role="bold">Kerberos Server</emphasis> for instructions on how
1264 to establish a cross-realm trust. </para>
1268 <para>Create a local authentication account for specific
1269 foreign users, by creating entries in the Protection Database,
1270 the Kerberos Database, and the local password file.</para>
1276 <primary>cell</primary>
1278 <secondary>filespace configuration issues</secondary>
1282 <primary>configuring</primary>
1284 <secondary>filespace, issues</secondary>
1288 <primary>file tree</primary>
1290 <secondary>conventions</secondary>
1292 <tertiary>for configuring</tertiary>
1297 <sect1 id="HDRWQ41">
1298 <title>Configuring Your AFS Filespace</title>
1300 <para>This section summarizes the issues to consider when configuring
1301 your AFS filespace. For a discussion of creating volumes that
1302 correspond most efficiently to the filespace's directory structure,
1303 see <link linkend="HDRWQ44">Creating Volumes to Simplify
1304 Administration</link>.</para>
1307 <para><emphasis role="bold">For Windows users:</emphasis> Windows
1308 uses a backslash (<emphasis role="bold">\</emphasis>) rather than a
1309 forward slash (<emphasis role="bold">/</emphasis>) to separate the
1310 elements in a pathname. The hierarchical organization of the
1311 filespace is however the same as on a UNIX machine.</para>
1314 <para>AFS pathnames must follow a few conventions so the AFS global
1315 namespace looks the same from any AFS client machine. There are
1316 corresponding conventions to follow in building your file tree, not
1317 just because pathnames reflect the structure of a file tree, but also
1318 because the AFS Cache Manager expects a certain configuration.</para>
1321 <primary>AFS</primary>
1323 <secondary>root directory (/afs)</secondary>
1325 <tertiary>in cell filespace</tertiary>
1329 <primary>directories</primary>
1331 <secondary>/afs</secondary>
1334 <sect2 id="Header_51">
1335 <title>The Top /afs Level</title>
1337 <para>The first convention is that the top level in your file tree
1338 be called the <emphasis role="bold">/afs</emphasis> directory. If
1339 you name it something else, then you must use the <emphasis
1340 role="bold">-mountdir</emphasis> argument with the <emphasis
1341 role="bold">afsd</emphasis> program to get Cache Managers to mount
1342 AFS properly. You cannot participate in the AFS global namespace in
1346 <primary>cell</primary>
1348 <secondary>name</secondary>
1350 <tertiary>at second level in file tree</tertiary>
1354 <primary>directories</primary>
1356 <secondary>/afs/<emphasis>cellname</emphasis></secondary>
1360 <primary>symbolic link</primary>
1362 <secondary>at second level of AFS pathname</secondary>
1366 <sect2 id="HDRWQ42">
1367 <title>The Second (Cellname) Level</title>
1369 <para>The second convention is that just below the <emphasis
1370 role="bold">/afs</emphasis> directory you place directories
1371 corresponding to each cell whose file tree is visible and accessible
1372 from the local cell. Minimally, there must be a directory for the
1373 local cell. Each such directory is a mount point to the indicated
1374 cell's <emphasis role="bold">root.cell</emphasis> volume. For
1375 example, in the ABC Corporation cell, <emphasis
1376 role="bold">/afs/abc.com</emphasis> is a mount point for the cell's
1377 own <emphasis role="bold">root.cell</emphasis> volume and <emphasis
1378 role="bold">stateu.edu</emphasis> is a mount point for the State
1379 University cell's <emphasis role="bold">root.cell</emphasis>
1380 volume. The <emphasis role="bold">fs lsmount</emphasis> command
1381 displays the mount points.</para>
1384 % <emphasis role="bold">fs lsmount /afs/abc.com</emphasis>
1385 '/afs/abc.com' is a mount point for volume '#root.cell'
1386 % <emphasis role="bold">fs lsmount /afs/stateu.edu</emphasis>
1387 '/afs/stateu.edu' is a mount point for volume '#stateu.edu:root.cell'
1390 <para>To reduce the amount of typing necessary in pathnames, you can
1391 create a symbolic link with an abbreviated name to the mount point
1392 of each cell your users frequently access (particularly the home
1393 cell). In the ABC Corporation cell, for instance, <emphasis
1394 role="bold">/afs/abc</emphasis> is a symbolic link to the <emphasis
1395 role="bold">/afs/abc.com</emphasis> mount point, as the <emphasis
1396 role="bold">fs lsmount</emphasis> command reveals.</para>
1399 % <emphasis role="bold">fs lsmount /afs/abc</emphasis>
1400 '/afs/abc' is a symbolic link, leading to a mount point for volume
1401 '#root.cell' </programlisting>
1404 <primary>file tree</primary>
1406 <secondary>conventions</secondary>
1408 <tertiary>third level</tertiary>
1412 <primary>directories</primary>
1414 <secondary>conventional under /afs/cellname</secondary>
1418 <sect2 id="HDRWQ43">
1419 <title>The Third Level</title>
1421 <para>You can organize the third level of your cell's file tree any
1422 way you wish. The following list describes directories that appear
1423 at this level in the conventional configuration:
1426 <term><emphasis role="bold">common</emphasis></term>
1429 <para>This directory contains programs and files needed by
1430 users working on machines of all system types, such as text
1431 editors, online documentation files, and so on. Its
1432 <emphasis role="bold">/etc</emphasis> subdirectory is a
1433 logical place to keep the central update sources for files
1434 used on all of your cell's client machines, such as the
1435 <emphasis role="bold">ThisCell</emphasis> and <emphasis
1436 role="bold">CellServDB</emphasis> files.</para>
1441 <term><emphasis role="bold">public</emphasis></term>
1444 <para>A directory accessible to anyone who can access your
1445 filespace, because its ACL grants the <emphasis
1446 role="bold">l</emphasis> (<emphasis
1447 role="bold">lookup</emphasis>) and <emphasis
1448 role="bold">r</emphasis> (<emphasis
1449 role="bold">read</emphasis>) permissions to the <emphasis
1450 role="bold">system:anyuser</emphasis> group. It is useful if
1451 you want to enable your users to make selected information
1452 available to everyone, but do not want to grant foreign
1453 users access to the contents of the <emphasis
1454 role="bold">usr</emphasis> directory which houses user home
1455 directories (and is also at this level). It is conventional
1456 to create a subdirectory for each of your cell's
1462 <term><emphasis role="bold">service</emphasis></term>
1465 <para>This directory contains files and subdirectories that
1466 help cells coordinate resource sharing. For a list of the
1467 proposed standard files and subdirectories to create, call
1468 or write to AFS Product Support.</para>
1470 <para>As an example, files that other cells expect to find
1471 in this directory's <emphasis role="bold">etc</emphasis>
1472 subdirectory can include the following: <itemizedlist>
1475 role="bold">CellServDB.export</emphasis>, a list of
1476 database server machines for many cells</para>
1481 role="bold">CellServDB.local</emphasis>, a list of the
1482 cell's own database server machines</para>
1486 <para><emphasis role="bold">passwd</emphasis>, a copy
1487 of the local password file (<emphasis
1488 role="bold">/etc/passwd</emphasis> or equivalent) kept
1489 on the local disk of the cell's client machines</para>
1493 <para><emphasis role="bold">group</emphasis>, a copy
1494 of the local groups file (<emphasis
1495 role="bold">/etc/group</emphasis> or equivalent) kept
1496 on the local disk of the cell's client machines</para>
1504 <term><emphasis>sys_type</emphasis></term>
1507 <para>A separate directory for storing the server and client
1508 binaries for each system type you use in the cell.
1509 Configuration is simplest if you use the system type names
1510 assigned in the AFS distribution, particularly if you wish
1511 to use the <emphasis role="bold">@sys</emphasis> variable in
1512 pathnames (see <link linkend="HDRWQ56">Using the @sys
1513 Variable in Pathnames</link>). The <emphasis>OpenAFS Release
1514 Notes</emphasis> lists the conventional name for each
1515 supported system type.</para>
1517 <para>Within each such directory, create directories named
1518 <emphasis role="bold">bin</emphasis>, <emphasis
1519 role="bold">etc</emphasis>, <emphasis
1520 role="bold">usr</emphasis>, and so on, to store the programs
1521 normally kept in the <emphasis role="bold">/bin</emphasis>,
1522 <emphasis role="bold">/etc</emphasis> and <emphasis
1523 role="bold">/usr</emphasis> directories on a local
1524 disk. Then create symbolic links from the local directories
1525 on client machines into AFS; see <link
1526 linkend="HDRWQ55">Configuring the Local Disk</link>. Even if
1527 you do not choose to use symbolic links in this way, it can
1528 be convenient to have central copies of system binaries in
1529 AFS. If binaries are accidentally removed from a machine,
1530 you can recopy them onto the local disk from AFS rather than
1531 having to recover them from tape</para>
1536 <term><emphasis role="bold">usr</emphasis></term>
1539 <para>This directory contains home directories for your
1540 local users. As discussed in the previous entry for the
1541 <emphasis role="bold">public</emphasis> directory, it is
1542 often practical to protect this directory so that only
1543 locally authenticated users can access it. This keeps the
1544 contents of your user's home directories as secure as
1547 <para>If your cell is quite large, directory lookup can be
1548 slowed if you put all home directories in a single <emphasis
1549 role="bold">usr</emphasis> directory. For suggestions on
1550 distributing user home directories among multiple grouping
1551 directories, see <link linkend="HDRWQ59">Grouping Home
1552 Directories</link>.</para>
1553 </listitem> </varlistentry>
1556 <term><emphasis role="bold">wsadmin</emphasis></term>
1559 <para>This directory contains prototype, configuration and
1560 library files for use with the <emphasis
1561 role="bold">package</emphasis> program. See <link
1562 linkend="HDRWQ419">Configuring Client Machines with the
1563 package Program</link>.</para>
1570 <primary>volume name</primary>
1572 <secondary>conventions for</secondary>
1576 <primary>conventions</primary>
1578 <secondary>volume names</secondary>
1582 <primary>volume</primary>
1584 <secondary>separate for each top level directory</secondary>
1588 <primary>file tree</primary>
1590 <secondary>creating volumes to match top level
1591 directories</secondary>
1596 <sect1 id="HDRWQ44">
1597 <title>Creating Volumes to Simplify Administration</title>
1599 <para>This section discusses how to create volumes in ways that make
1600 administering your system easier.</para>
1602 <para>At the top levels of your file tree (at least through the third
1603 level), each directory generally corresponds to a separate
1604 volume. Some cells also configure the subdirectories of some third
1605 level directories as separate volumes. Common examples are the
1607 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1608 role="bold">/common</emphasis> and <emphasis
1609 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1610 role="bold">/usr</emphasis> directories.</para>
1612 <para>You do not have to create a separate volume for every directory
1613 level in a tree, but the advantage is that each volume tends to be
1614 smaller and easier to move for load balancing. The overhead for a
1615 mount point is no greater than for a standard directory, nor does the
1616 volume structure itself require much disk space. Most cells find that
1617 below the fourth level in the tree, using a separate volume for each
1618 directory is no longer efficient. For instance, while each user's home
1619 directory (at the fourth level in the tree) corresponds to a separate
1620 volume, all of the subdirectories in the home directory normally
1621 reside in the same volume.</para>
1623 <para>Keep in mind that only one volume can be mounted at a given
1624 directory location in the tree. In contrast, a volume can be mounted
1625 at several locations, though this is not recommended because it
1626 distorts the hierarchical nature of the file tree, potentially causing
1630 <primary>volume name</primary>
1632 <secondary>restrictions</secondary>
1636 <primary>restrictions</primary>
1638 <secondary>on volume names</secondary>
1642 <primary>volume name</primary>
1644 <secondary>two required</secondary>
1648 <primary>volume</primary>
1650 <secondary>root (root.afs and root.cell)</secondary>
1654 <primary>root volumes (root.afs and root.cell)</primary>
1657 <sect2 id="Header_55">
1658 <title>Assigning Volume Names</title>
1660 <para>You can name your volumes anything you choose, subject to a
1664 <para>Read/write volume names can be up to 22 characters in
1665 length. The maximum length for volume names is 31 characters,
1666 and there must be room to add the <emphasis
1667 role="bold">.readonly</emphasis> extension on read-only
1672 <para>Do not add the <emphasis
1673 role="bold">.readonly</emphasis> and <emphasis
1674 role="bold">.backup</emphasis> extensions to volume names
1675 yourself, even if they are appropriate. The Volume Server adds
1676 them automatically as it creates a read-only or backup version
1681 <para>There must be volumes named <emphasis
1682 role="bold">root.afs</emphasis> and <emphasis
1683 role="bold">root.cell</emphasis>, mounted respectively at the
1684 top (<emphasis role="bold">/afs</emphasis>) level in the
1685 filespace and just below that level, at the cell's name (for
1686 example, at <emphasis role="bold">/afs/abc.com</emphasis> in
1687 the ABC Corporation cell).</para>
1689 <para>Deviating from these names only creates confusion and
1690 extra work. Changing the name of the <emphasis
1691 role="bold">root.afs</emphasis> volume, for instance, means
1692 that you must use the <emphasis
1693 role="bold">-rootvol</emphasis> argument to the <emphasis
1694 role="bold">afsd</emphasis> program on every client machine,
1695 to name the alternate volume.</para>
1697 <para>Similarly, changing the <emphasis
1698 role="bold">root.cell</emphasis> volume name prevents users in
1699 foreign cells from accessing your filespace, if the mount
1700 point for your cell in their filespace refers to the
1701 conventional <emphasis role="bold">root.cell</emphasis>
1702 name. Of course, this is one way to make your cell invisible
1703 to other cells.</para>
1708 <para>It is best to assign volume names that indicate the type of
1709 data they contain, and to use similar names for volumes with similar
1710 contents. It is also helpful if the volume name is similar to (or at
1711 least has elements in common with) the name of the directory at
1712 which it is mounted. Understanding the pattern then enables you
1713 accurately to guess what a volume contains and where it is
1716 <para>Many cells find that the most effective volume naming scheme
1717 puts a common prefix on the names of all related volumes. <link
1718 linkend="TBLVOL-PREFIX">Table 1</link> describes the recommended
1719 prefixing scheme.</para>
1721 <table id="TBLVOL-PREFIX" label="1">
1722 <title>Suggested volume prefixes</title>
1725 <colspec colwidth="14*" />
1727 <colspec colwidth="28*" />
1729 <colspec colwidth="22*" />
1731 <colspec colwidth="36*" />
1735 <entry><emphasis role="bold">Prefix</emphasis></entry>
1737 <entry><emphasis role="bold">Contents</emphasis></entry>
1739 <entry><emphasis role="bold">Example Name</emphasis></entry>
1741 <entry><emphasis role="bold">Example Mount
1742 Point</emphasis></entry>
1748 <entry><emphasis role="bold">common.</emphasis></entry>
1750 <entry>popular programs and files</entry>
1752 <entry><emphasis role="bold">common.etc</emphasis></entry>
1755 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1756 role="bold">/common/etc</emphasis></entry>
1760 <entry><emphasis role="bold">src.</emphasis></entry>
1762 <entry>source code</entry>
1764 <entry><emphasis role="bold">src.afs</emphasis></entry>
1767 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1768 role="bold">/src/afs</emphasis></entry>
1772 <entry><emphasis role="bold">proj.</emphasis></entry>
1774 <entry>project data</entry>
1776 <entry><emphasis role="bold">proj.portafs</emphasis></entry>
1779 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1780 role="bold">/proj/portafs</emphasis></entry>
1784 <entry><emphasis role="bold">test.</emphasis></entry>
1786 <entry>testing or other temporary data</entry>
1788 <entry><emphasis role="bold">test.smith</emphasis></entry>
1791 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1792 role="bold">/usr/smith/test</emphasis></entry>
1796 <entry><emphasis role="bold">user.</emphasis></entry>
1798 <entry>user home directory data</entry>
1800 <entry><emphasis role="bold">user.terry</emphasis></entry>
1803 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1804 role="bold">/usr/terry</emphasis></entry>
1808 <entry>sys_type<emphasis role="bold">.</emphasis></entry>
1810 <entry>programs compiled for an operating system
1813 <entry><emphasis role="bold">rs_aix42.bin</emphasis></entry>
1816 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1817 role="bold">/rs_aix42/bin</emphasis></entry>
1823 <para><link linkend="TBLPREFIX-EXAMPLE">Table 2</link> is a more
1824 specific example for a cell's <emphasis
1825 role="bold">rs_aix42</emphasis> system volumes and
1828 <table id="TBLPREFIX-EXAMPLE" label="2">
1829 <title>Example volume-prefixing scheme</title>
1832 <colspec colwidth="14*" />
1834 <colspec colwidth="28*" />
1836 <colspec colwidth="22*" />
1838 <colspec colwidth="36*" />
1842 <entry><emphasis role="bold">Example Name</emphasis></entry>
1844 <entry><emphasis role="bold">Example Mount
1845 Point</emphasis></entry>
1851 <entry><emphasis role="bold">rs_aix42.bin</emphasis></entry>
1854 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1855 role="bold">/rs_aix42/bin</emphasis>, <emphasis
1856 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1857 role="bold">/rs_aix42/bin</emphasis></entry>
1861 <entry><emphasis role="bold">rs_aix42.etc</emphasis></entry>
1864 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1865 role="bold">/rs_aix42/etc</emphasis></entry>
1869 <entry><emphasis role="bold">rs_aix42.usr</emphasis></entry>
1872 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1873 role="bold">/rs_aix42/usr</emphasis></entry>
1878 role="bold">rs_aix42.usr.afsws</emphasis></entry>
1881 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1882 role="bold">/rs_aix42/usr/afsws</emphasis></entry>
1887 role="bold">rs_aix42.usr.lib</emphasis></entry>
1890 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1891 role="bold">/rs_aix42/usr/lib</emphasis></entry>
1896 role="bold">rs_aix42.usr.bin</emphasis></entry>
1899 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1900 role="bold">/rs_aix42/usr/bin</emphasis></entry>
1905 role="bold">rs_aix42.usr.etc</emphasis></entry>
1908 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1909 role="bold">/rs_aix42/usr/etc</emphasis></entry>
1914 role="bold">rs_aix42.usr.inc</emphasis></entry>
1917 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1918 role="bold">/rs_aix42/usr/inc</emphasis></entry>
1923 role="bold">rs_aix42.usr.man</emphasis></entry>
1926 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1927 role="bold">/rs_aix42/usr/man</emphasis></entry>
1932 role="bold">rs_aix42.usr.sys</emphasis></entry>
1935 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1936 role="bold">/rs_aix42/usr/sys</emphasis></entry>
1941 role="bold">rs_aix42.usr.local</emphasis></entry>
1944 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1945 role="bold">/rs_aix42/usr/local</emphasis></entry>
1951 <para>There are several advantages to this scheme:
1954 <para>The volume name is similar to the mount point name in
1955 the filespace. In all of the entries in <link
1956 linkend="TBLPREFIX-EXAMPLE">Table 2</link>, for example, the
1957 only difference between the volume and mount point name is
1958 that the former uses periods as separators and the latter uses
1959 slashes. Another advantage is that the volume name indicates
1960 the contents, or at least suggests the directory on which to
1961 issue the <emphasis role="bold">ls</emphasis> command to learn
1962 the contents.</para>
1966 <para>It makes it easy to manipulate groups of related volumes
1967 at one time. In particular, the <emphasis role="bold">vos
1968 backupsys</emphasis> command's <emphasis
1969 role="bold">-prefix</emphasis> argument enables you to create
1970 a backup version of every volume whose name starts with the
1971 same string of characters. Making a backup version of each
1972 volume is one of the first steps in backing up a volume with
1973 the AFS Backup System, and doing it for many volumes with one
1974 command saves you a good deal of typing. For instructions for
1975 creating backup volumes, see <link linkend="HDRWQ201">Creating
1976 Backup Volumes</link>, For information on the AFS Backup
1977 System, see <link linkend="HDRWQ248">Configuring the AFS
1978 Backup System</link> and <link linkend="HDRWQ283">Backing Up
1979 and Restoring AFS Data</link>.</para>
1983 <para>It makes it easy to group related volumes together on a
1984 partition. Grouping related volumes together has several
1985 advantages of its own, discussed in <link
1986 linkend="HDRWQ49">Grouping Related Volumes on a
1987 Partition</link>.</para>
1993 <primary>volume</primary>
1995 <secondary>grouping related on same partition</secondary>
1999 <primary>disk partition</primary>
2001 <secondary>grouping related volumes on</secondary>
2005 <sect2 id="HDRWQ49">
2006 <title>Grouping Related Volumes on a Partition</title>
2008 <para>If your cell is large enough to make it practical, consider
2009 grouping related volumes together on a partition. In general, you
2010 need at least three file server machines for volume grouping to be
2011 effective. Grouping has several advantages, which are most obvious
2012 when the file server machine becomes inaccessible:
2015 <para>If you keep a hardcopy record of the volumes on a
2016 partition, you know which volumes are unavailable. You can
2017 keep such a record without grouping related volumes, but a
2018 list composed of unrelated volumes is much harder to maintain.
2019 Note that the record must be on paper, because the outage can
2020 prevent you from accessing an online copy or from issuing the
2021 <emphasis role="bold">vos listvol</emphasis> command, which
2022 gives you the same information.</para>
2026 <para>The effect of an outage is more localized. For example,
2027 if all of the binaries for a given system type are on one
2028 partition, then only users of that system type are
2029 affected. If a partition houses binary volumes from several
2030 system types, then an outage can affect more people,
2031 particularly if the binaries that remain available are
2032 interdependent with those that are not available.</para>
2037 <para>The advantages of grouping related volumes on a partition do
2038 not necessarily extend to the grouping of all related volumes on one
2039 file server machine. For instance, it is probably unwise in a cell
2040 with two file server machines to put all system volumes on one
2041 machine and all user volumes on the other. An outage of either
2042 machine probably affects everyone.</para>
2044 <para>Admittedly, the need to move volumes for load balancing
2045 purposes can limit the practicality of grouping related volumes.
2046 You need to weigh the complementary advantages case by case.</para>
2049 <primary>replication</primary>
2051 <secondary>appropriate volumes</secondary>
2055 <primary>volume</primary>
2057 <secondary>type to replicate</secondary>
2061 <primary>volume</primary>
2063 <secondary>where to place replicated</secondary>
2067 <primary>read-only volume</primary>
2069 <secondary>selecting site</secondary>
2073 <sect2 id="HDRWQ50">
2074 <title>When to Replicate Volumes</title>
2076 <para>As discussed in <link linkend="HDRWQ15">Replication</link>,
2077 replication refers to making a copy, or clone, of a read/write
2078 source volume and then placing the copy on one or more additional
2079 file server machines. Replicating a volume can increase the
2080 availability of the contents. If one file server machine housing the
2081 volume becomes inaccessible, users can still access the copy of the
2082 volume stored on a different machine. No one machine is likely to
2083 become overburdened with requests for a popular file, either,
2084 because the file is available from several machines.</para>
2086 <para>However, replication is not appropriate for all cells. If a
2087 cell does not have much disk space, replication can be unduly
2088 expensive, because each clone not on the same partition as the
2089 read/write source takes up as much disk space as its source volume
2090 did at the time the clone was made. Also, if you have only one file
2091 server machine, replication uses up disk space without increasing
2092 availability.</para>
2094 <para>Replication is also not appropriate for volumes that change
2095 frequently. You must issue the <emphasis role="bold">vos
2096 release</emphasis> command every time you need to update a read-only
2097 volume to reflect changes in its read/write source.</para>
2099 <para>For both of these reasons, replication is appropriate only for
2100 popular volumes whose contents do not change very often, such as
2101 system binaries and other volumes mounted at the upper levels of
2102 your filespace. User volumes usually exist only in a read/write
2103 version since they change so often.</para>
2105 <para>If you are replicating any volumes, you must replicate the
2106 <emphasis role="bold">root.afs</emphasis> and <emphasis
2107 role="bold">root.cell</emphasis> volumes, preferably at two or three
2108 sites each (even if your cell only has two or three file server
2109 machines). The Cache Manager needs to pass through the directories
2110 corresponding to the <emphasis role="bold">root.afs</emphasis> and
2111 <emphasis role="bold">root.cell</emphasis> volumes as it interprets
2112 any pathname. The unavailability of these volumes makes all other
2113 volumes unavailable too, even if the file server machines storing
2114 the other volumes are still functioning.</para>
2116 <para>Another reason to replicate the <emphasis
2117 role="bold">root.afs</emphasis> volume is that it can lessen the
2118 load on the File Server machine. The Cache Manager has a bias to
2119 access a read-only version of the <emphasis
2120 role="bold">root.afs</emphasis> volume if it is replicate, which
2121 puts the Cache Manager onto the <emphasis>read-only path</emphasis>
2122 through the AFS filespace. While on the read-only path, the Cache
2123 Manager attempts to access a read-only copy of replicated
2124 volumes. The File Server needs to track only one callback per Cache
2125 Manager for all of the data in a read-only volume, rather than the
2126 one callback per file it must track for read/write volumes. Fewer
2127 callbacks translate into a smaller load on the File Server.</para>
2129 <para>If the <emphasis role="bold">root.afs</emphasis> volume is not
2130 replicated, the Cache Manager follows a read/write path through the
2131 filespace, accessing the read/write version of each volume. The File
2132 Server distributes and tracks a separate callback for each file in a
2133 read/write volume, imposing a greater load on it.</para>
2135 <para>For more on read/write and read-only paths, see <link
2136 linkend="HDRWQ209">The Rules of Mount Point Traversal</link>.</para>
2138 <para>It also makes sense to replicate system binary volumes in many
2139 cases, as well as the volume corresponding to the <emphasis
2140 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
2141 role="bold">/usr</emphasis> directory and the volumes corresponding
2143 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
2144 role="bold">/common</emphasis> directory and its
2145 subdirectories.</para>
2147 <para>It is a good idea to place a replica on the same partition as
2148 the read/write source. In this case, the read-only volume is a clone
2149 (like a backup volume): it is a copy of the source volume's vnode
2150 index, rather than a full copy of the volume contents. Only if the
2151 read/write volume moves to another partition or changes
2152 substantially does the read-only volume consume significant disk
2153 space. Read-only volumes kept on other partitions always consume the
2154 full amount of disk space that the read/write source consumed when
2155 the read-only volume was created.</para>
2158 <sect2 id="Header_58">
2159 <title>The Default Quota and ACL on a New Volume</title>
2161 <para>Every AFS volume has associated with it a quota that limits
2162 the amount of disk space the volume is allowed to use. To set and
2163 change quota, use the commands described in <link
2164 linkend="HDRWQ234">Setting and Displaying Volume Quota and Current
2167 <para>By default, every new volume is assigned a space quota of 5000
2168 KB blocks unless you include the <emphasis
2169 role="bold">-maxquota</emphasis> argument to the <emphasis
2170 role="bold">vos create</emphasis> command. Also by default, the ACL
2171 on the root directory of every new volume grants all permissions to
2172 the members of the <emphasis
2173 role="bold">system:administrators</emphasis> group. To learn how to
2174 change these values when creating an account with individual
2175 commands, see <link linkend="HDRWQ503">To create one user account
2176 with individual commands</link>. When using <emphasis
2177 role="bold">uss</emphasis> commands to create accounts, you can
2178 specify alternate ACL and quota values in the template file's
2179 <emphasis role="bold">V</emphasis> instruction; see <link
2180 linkend="HDRWQ473">Creating a Volume with the V
2181 Instruction</link>.</para>
2184 <primary>server machine</primary>
2186 <secondary>configuration issues</secondary>
2190 <primary>configuring</primary>
2192 <secondary>file server machine, issues</secondary>
2196 <primary>roles for server machine</primary>
2198 <secondary>summary</secondary>
2202 <primary>server machine</primary>
2204 <secondary>roles for</secondary>
2206 <tertiary>summary</tertiary>
2210 <primary>server machine</primary>
2212 <secondary>first installed</secondary>
2217 <sect1 id="HDRWQ51">
2218 <title>Configuring Server Machines</title>
2220 <para>This section discusses some issues to consider when configuring
2221 server machines, which store AFS data, transfer it to client machines
2222 on request, and house the AFS administrative databases. To learn about
2223 client machines, see <link linkend="HDRWQ54">Configuring Client
2224 Machines</link>.</para>
2226 <para>If your cell has more than one AFS server machine, you can
2227 configure them to perform specialized functions. A machine can assume
2228 one or more of the roles described in the following list. For more
2229 details, see <link linkend="HDRWQ90">The Four Roles for File Server
2233 <para>A <emphasis>simple file server</emphasis> machine runs
2234 only the processes that store and deliver AFS files to client
2235 machines. You can run as many simple file server machines as you
2236 need to satisfy your cell's performance and disk space
2237 requirements.</para>
2241 <para>A <emphasis>database server machine</emphasis> runs the
2242 four database server processes that maintain AFS's replicated
2243 administrative databases: the Authentication, Backup,
2244 Protection, and Volume Location (VL) Server processes.</para>
2248 <para>A <emphasis>binary distribution machine</emphasis>
2249 distributes the AFS server binaries for its system type to all
2250 other server machines of that system type.</para>
2254 <para>The single <emphasis>system control machine</emphasis>
2255 distributes common server configuration files to all other
2256 server machines in the cell, in a cell that runs the United
2257 States edition of AFS (cells that use the international edition
2258 of AFS must not use the system control machine for this
2259 purpose). The machine conventionally also serves as the time
2260 synchronization source for the cell, adjusting its clock
2261 according to a time source outside the cell.</para>
2266 <para>The <emphasis>OpenAFS Quick Beginnings</emphasis> explains how
2267 to configure your cell's first file server machine to assume all four
2268 roles. The <emphasis>OpenAFS Quick Beginnings</emphasis> chapter on
2269 installing additional server machines also explains how to configure
2270 them to perform one or more roles.</para>
2273 <primary>database server machine</primary>
2275 <secondary>reason to run three</secondary>
2279 <primary>distribution</primary>
2281 <secondary>of databases</secondary>
2285 <primary>databases, distributed</primary>
2289 <primary>distributed databases</primary>
2292 <sect2 id="HDRWQ52">
2293 <title>Replicating the OpenAFS Administrative Databases</title>
2295 <para>The AFS administrative databases are housed on database server
2296 machines and store information that is crucial for correct cell
2297 functioning. Both server processes and Cache Managers access the
2298 information frequently:
2301 <para>Every time a Cache Manager fetches a file from a
2302 directory that it has not previously accessed, it must look up
2303 the file's location in the Volume Location Database
2308 <para>Every time a user obtains an AFS token from the
2309 Authentication Server, the server looks up the user's password
2310 in the Authentication Database.</para>
2314 <para>The first time that a user accesses a volume housed on a
2315 specific file server machine, the File Server contacts the
2316 Protection Server for a list of the user's group memberships
2317 as recorded in the Protection Database.</para>
2321 <para>Every time you back up a volume using the AFS Backup
2322 System, the Backup Server creates records for it in the Backup
2328 <para>Maintaining your cell is simplest if the first machine has the
2329 lowest IP address of any machine you plan to use as a database
2330 server machine. If you later decide to use a machine with a lower IP
2331 address as a database server machine, you must update the <emphasis
2332 role="bold">CellServDB</emphasis> file on all clients before
2333 introducing the new machine.</para>
2335 <para>If your cell has more than one server machine, it is best to
2336 run more than one as a database server machine (but more than three
2337 are rarely necessary). Replicating the administrative databases in
2338 this way yields the same benefits as replicating volumes: increased
2339 availability and reliability. If one database server machine or
2340 process stops functioning, the information in the database is still
2341 available from others. The load of requests for database information
2342 is spread across multiple machines, preventing any one from becoming
2345 <para>Unlike replicated volumes, however, replicated databases do
2346 change frequently. Consistent system performance demands that all
2347 copies of the database always be identical, so it is not acceptable
2348 to record changes in only some of them. To synchronize the copies of
2349 a database, the database server processes use AFS's distributed
2350 database technology, Ubik. See <link linkend="HDRWQ102">Replicating
2351 the OpenAFS Administrative Databases</link>.</para>
2353 <para>If your cell has only one file server machine, it must also
2354 serve as a database server machine. If you cell has two file server
2355 machines, it is not always advantageous to run both as database
2356 server machines. If a server, process, or network failure interrupts
2357 communications between the database server processes on the two
2358 machines, it can become impossible to update the information in the
2359 database because neither of them can alone elect itself as the
2360 synchronization site.</para>
2363 <primary>server machine</primary>
2365 <secondary>protecting directories on local disk</secondary>
2369 <primary>local disk</primary>
2371 <secondary>protecting on file server machine</secondary>
2375 <sect2 id="HDRWQ53">
2376 <title>AFS Files on the Local Disk</title>
2378 <para>It is generally simplest to store the binaries for all AFS
2379 server processes in the <emphasis
2380 role="bold">/usr/afs/bin</emphasis> directory on every file server
2381 machine, even if some processes do not actively run on the
2382 machine. This makes it easier to reconfigure a machine to fill a new
2385 <para>For security reasons, the <emphasis
2386 role="bold">/usr/afs</emphasis> directory on a file server machine
2387 and all of its subdirectories and files must be owned by the local
2388 superuser <emphasis role="bold">root</emphasis> and have only the
2389 first <emphasis role="bold">w</emphasis> (<emphasis
2390 role="bold">write</emphasis>) mode bit turned on. Some files even
2391 have only the first <emphasis role="bold">r</emphasis> (<emphasis
2392 role="bold">read</emphasis>) mode bit turned on (for example, the
2393 <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis> file, which
2394 lists the AFS server encryption keys). Each time the BOS Server
2395 starts, it checks that the mode bits on certain files and
2396 directories match the expected values. For a list, see the
2397 <emphasis>OpenAFS Quick Beginnings</emphasis> section about
2398 protecting sensitive AFS directories, or the discussion of the
2399 output from the <emphasis role="bold">bos status</emphasis> command
2400 in <link linkend="HDRWQ159">To display the status of server
2401 processes and their BosConfig entries</link>.</para>
2403 <para>For a description of the contents of all AFS directories on a
2404 file server machine's local disk, see <link
2405 linkend="HDRWQ80">Administering Server Machines</link>.</para>
2408 <sect2 id="Header_62">
2409 <title>Configuring Partitions to Store AFS Data</title>
2411 <para>The partitions that house AFS volumes on a file server machine
2412 must be mounted at directories named</para>
2415 role="bold">/vicep</emphasis><emphasis>index</emphasis></para>
2417 <para>where <emphasis>index</emphasis> is one or two lowercase
2418 letters. By convention, the first AFS partition created is mounted
2419 at the <emphasis role="bold">/vicepa</emphasis> directory, the
2420 second at the <emphasis role="bold">/vicepb</emphasis> directory,
2421 and so on through the <emphasis role="bold">/vicepz</emphasis>
2422 directory. The names then continue with <emphasis
2423 role="bold">/vicepaa</emphasis> through <emphasis
2424 role="bold">/vicepaz</emphasis>, <emphasis
2425 role="bold">/vicepba</emphasis> through <emphasis
2426 role="bold">/vicepbz</emphasis>, and so on, up to the maximum
2427 supported number of server partitions, which is specified in the
2428 OpenAFS Release Notes.</para>
2430 <para>Each <emphasis role="bold">/vicep</emphasis>x directory must
2431 correspond to an entire partition or logical volume, and must be a
2432 subdirectory of the root directory (/). It is not acceptable to
2433 configure part of (for example) the <emphasis
2434 role="bold">/usr</emphasis> partition as an AFS server partition and
2435 mount it on a directory called <emphasis
2436 role="bold">/usr/vicepa</emphasis>.</para>
2438 <para>Also, do not store non-AFS files on AFS server partitions. The
2439 File Server and Volume Server expect to have available all of the
2440 space on the partition. Sharing space also creates competition
2441 between AFS and the local UNIX file system for access to the
2442 partition, particularly if the UNIX files are frequently
2446 <primary>server machine</primary>
2448 <secondary>monitoring</secondary>
2452 <primary>file server machine</primary>
2454 <secondary>rebooting, about</secondary>
2458 <primary>rebooting</primary>
2460 <secondary>file server machine, limiting</secondary>
2464 <primary>weekly restart of BOS Server (automatic)</primary>
2466 <secondary>about</secondary>
2470 <primary>restart times for BOS Server</primary>
2472 <secondary>about</secondary>
2476 <sect2 id="Header_63">
2477 <title>Monitoring, Rebooting and Automatic Process Restarts</title>
2479 <para>AFS provides several tools for monitoring the File Server,
2480 including the <emphasis role="bold">scout</emphasis> and <emphasis
2481 role="bold">afsmonitor</emphasis> programs. You can configure them
2482 to alert you when certain threshold values are exceeded, for example
2483 when a server partition is more than 95% full. See <link
2484 linkend="HDRWQ323">Monitoring and Auditing AFS
2485 Performance</link>.</para>
2487 <para>Rebooting a file server machine requires shutting down the AFS
2488 processes and so inevitably causes a service outage. Reboot file
2489 server machines as infrequently as possible. For instructions, see
2490 <link linkend="HDRWQ139">Rebooting a Server Machine</link>.</para>
2492 <para>The BOS Server checks each morning at 5:00 a.m. for any newly
2493 installed binary files in the <emphasis
2494 role="bold">/usr/afs/bin</emphasis> directory. It compares the
2495 timestamp on each binary file to the time at which the corresponding
2496 process last restarted. If the timestamp on the binary is later, the
2497 BOS Server restarts the corresponding process to start using
2500 <para>The BOS server also supports performing a weekly restart of
2501 all AFS server processes, including itself. This functionality is
2502 disabled on new installs, but historically it was set to 4:00am on
2503 Sunday. Administrators may find that installations predating OpenAFS
2504 1.6.0 have weekly restarts enabled.</para>
2506 <para>The default times are in the early morning hours when the
2507 outage that results from restarting a process is likely to disturb
2508 the fewest number of people. You can display the restart times for
2509 each machine with the <emphasis role="bold">bos
2510 getrestart</emphasis> command, and set them with the <emphasis
2511 role="bold">bos setrestart</emphasis> command. The latter command
2512 enables you to disable automatic restarts entirely, by setting the
2513 time to <emphasis role="bold">never</emphasis>. See <link
2514 linkend="HDRWQ171">Setting the BOS Server's Restart
2515 Times</link>.</para>
2518 <primary>client machine</primary>
2520 <secondary>configuration issues</secondary>
2524 <primary>configuring</primary>
2526 <secondary>client machine, issues</secondary>
2531 <sect1 id="HDRWQ54">
2532 <title>Configuring Client Machines</title>
2534 <para>This section summarizes issues to consider as you install and
2535 configure client machines in your cell.</para>
2538 <primary>client machine</primary>
2540 <secondary>files required on local disk</secondary>
2544 <primary>local disk</primary>
2546 <secondary>files required on client machine</secondary>
2550 <primary>file</primary>
2552 <secondary>required on client machine local disk</secondary>
2555 <sect2 id="HDRWQ55">
2556 <title>Configuring the Local Disk</title>
2558 <para>You can often free up significant amounts of local disk space
2559 on AFS client machines by storing standard UNIX files in AFS and
2560 creating symbolic links to them from the local disk. The <emphasis
2561 role="bold">@sys</emphasis> pathname variable can be useful in links
2562 to system-specific files; see <link linkend="HDRWQ56">Using the @sys
2563 Variable in Pathnames</link>.</para>
2565 <para>There are two types of files that must actually reside on the
2566 local disk: boot sequence files needed before the <emphasis
2567 role="bold">afsd</emphasis> program is invoked, and files that can
2568 be helpful during file server machine outages.</para>
2570 <para>During a reboot, AFS is inaccessible until the <emphasis
2571 role="bold">afsd</emphasis> program executes and initializes the
2572 Cache Manager. (In the conventional configuration, the AFS
2573 initialization file is included in the machine's initialization
2574 sequence and invokes the <emphasis role="bold">afsd</emphasis>
2575 program.) Files needed during reboot prior to that point must reside
2576 on the local disk. They include the following, but this list is not
2577 necessarily exhaustive.
2580 <para>Standard UNIX utilities including the following or their
2584 <para>Machine initialization files (stored in the
2585 <emphasis role="bold">/etc</emphasis> or <emphasis
2586 role="bold">/sbin</emphasis> directory on many system
2591 <para>The <emphasis role="bold">fstab</emphasis>
2596 <para>The <emphasis role="bold">mount</emphasis> command
2601 <para>The <emphasis role="bold">umount</emphasis>
2602 command binary</para>
2609 <para>All subdirectories and files in the <emphasis
2610 role="bold">/usr/vice</emphasis> directory, including the
2615 role="bold">/usr/vice/cache</emphasis> directory</para>
2620 role="bold">/usr/vice/etc/afsd</emphasis> command
2626 role="bold">/usr/vice/etc/cacheinfo</emphasis> file</para>
2631 role="bold">/usr/vice/etc/CellServDB</emphasis>
2637 role="bold">/usr/vice/etc/ThisCell</emphasis> file</para>
2642 <para>For more information on these files, see <link
2643 linkend="HDRWQ391">Configuration and Cache-Related Files on
2644 the Local Disk</link>.</para>
2649 <para>The other type of files and programs to retain on the local
2650 disk are those you need when diagnosing and fixing problems caused
2651 by a file server outage, because the outage can make inaccessible
2652 the copies stored in AFS. Examples include the binaries for a text
2653 editor (such as <emphasis role="bold">ed</emphasis> or <emphasis
2654 role="bold">vi</emphasis>) and for the <emphasis
2655 role="bold">fs</emphasis> and <emphasis role="bold">bos</emphasis>
2656 commands. Store copies of AFS command binaries in the <emphasis
2657 role="bold">/usr/vice/etc</emphasis> directory as well as including
2658 them in the <emphasis role="bold">/usr/afsws</emphasis> directory,
2659 which is normally a link into AFS. Then place the <emphasis
2660 role="bold">/usr/afsws</emphasis> directory before the <emphasis
2661 role="bold">/usr/vice/etc</emphasis> directory in users'
2662 <envar>PATH</envar> environment variable definition. When AFS is
2663 functioning normally, users access the copy in the <emphasis
2664 role="bold">/usr/afsws</emphasis> directory, which is more likely to
2665 be current than a local copy.</para>
2667 <para>You can automate the configuration of client machine local
2668 disks by using the <emphasis role="bold">package</emphasis> program,
2669 which updates the contents of the local disk to match a
2670 configuration file. See <link linkend="HDRWQ419">Configuring Client
2671 Machines with the package Program</link>.</para>
2674 <sect2 id="Header_66">
2675 <title>Enabling Access to Foreign Cells</title>
2678 <primary>client machine</primary>
2680 <secondary>enabling access to foreign cell</secondary>
2683 <para>As detailed in <link linkend="HDRWQ39">Making Other Cells
2684 Visible in Your Cell</link>, you enable the Cache Manager to access
2685 a cell's AFS filespace by storing a list of the cell's database
2686 server machines in the local <emphasis
2687 role="bold">/usr/vice/etc/CellServDB</emphasis> file. The Cache
2688 Manager reads the list into kernel memory at reboot for faster
2689 retrieval. You can change the list in kernel memory between reboots
2690 by using the <emphasis role="bold">fs newcell</emphasis> command. It
2691 is often practical to store a central version of the <emphasis
2692 role="bold">CellServDB</emphasis> file in AFS and use the <emphasis
2693 role="bold">package</emphasis> program periodically to update each
2694 client's version with the source copy. See <link
2695 linkend="HDRWQ406">Maintaining Knowledge of Database Server
2696 Machines</link>.</para>
2698 <para>Because each client machine maintains its own copy of the
2699 <emphasis role="bold">CellServDB</emphasis> file, you can in theory
2700 enable access to different foreign cells on different client
2701 machines. This is not usually practical, however, especially if
2702 users do not always work on the same machine.</para>
2705 <primary>at-sys (@sys) variable in pathnames</primary>
2709 <primary>sys (@sys) variable in pathnames</primary>
2713 <primary>variables</primary>
2715 <secondary>@sys in pathnames</secondary>
2719 <sect2 id="HDRWQ56">
2720 <title>Using the @sys Variable in Pathnames</title>
2722 <para>When creating symbolic links into AFS on the local disk, it is
2723 often practical to use the @sys variable in pathnames. The Cache
2724 Manager automatically substitutes the local machine's AFS system
2725 name (CPU/operating system type) for the @sys variable. This means
2726 you can place the same links on machines of various system types and
2727 still have each machine access the binaries for its system type. For
2728 example, the Cache Manager on a machine running AIX 4.2 converts
2729 <emphasis role="bold">/afs/abc.com/@sys</emphasis> to <emphasis
2730 role="bold">/afs/abc.com/rs_aix42</emphasis>, whereas a machine
2731 running Solaris 7 converts it to <emphasis
2732 role="bold">/afs/abc.com/sun4x_57</emphasis>.</para>
2734 <para>If you want to use the @sys variable, it is simplest to use
2735 the conventional AFS system type names as specified in the OpenAFS
2736 Release Notes. The Cache Manager records the local machine's system
2737 type name in kernel memory during initialization. If you do not use
2738 the conventional names, you must use the <emphasis role="bold">fs
2739 sysname</emphasis> command to change the value in kernel memory from
2740 its default just after Cache Manager initialization, on every client
2741 machine of the relevant system type. The <emphasis role="bold">fs
2742 sysname</emphasis> command also displays the current value; see
2743 <link linkend="HDRWQ417">Displaying and Setting the System Type
2746 <para>In pathnames in the AFS filespace itself, use the @sys
2747 variable carefully and sparingly, because it can lead to unexpected
2748 results. It is generally best to restrict its use to only one level
2749 in the filespace. The third level is a common choice, because that
2750 is where many cells store the binaries for different machine
2753 <para>Multiple instances of the @sys variable in a pathname are
2754 especially dangerous to people who must explicitly change
2755 directories (with the <emphasis role="bold">cd</emphasis> command,
2756 for example) into directories that store binaries for system types
2757 other than the machine on which they are working, such as
2758 administrators or developers who maintain those directories. After
2759 changing directories, it is recommended that such people verify they
2760 are in the desired directory.</para>
2763 <sect2 id="Header_68">
2764 <title>Setting Server Preferences</title>
2766 <para>The Cache Manager stores a table of preferences for file
2767 server machines in kernel memory. A preference rank pairs a file
2768 server machine interface's IP address with an integer in the range
2769 from 1 to 65,534. When it needs to access a file, the Cache Manager
2770 compares the ranks for the interfaces of all machines that house the
2771 file, and first attempts to access the file via the interface with
2772 the best rank. As it initializes, the Cache Manager sets default
2773 ranks that bias it to access files via interfaces that are close to
2774 it in terms of network topology. You can adjust the preference ranks
2775 to improve performance if you wish.</para>
2777 <para>The Cache Manager also uses similar preferences for Volume
2778 Location (VL) Server machines. Use the <emphasis role="bold">fs
2779 getserverprefs</emphasis> command to display preference ranks and
2780 the <emphasis role="bold">fs setserverprefs</emphasis> command to
2781 set them. See <link linkend="HDRWQ414">Maintaining Server Preference
2782 Ranks</link>.</para>
2785 <primary>user account</primary>
2787 <secondary>configuration issues</secondary>
2791 <sect1 id="HDRWQ57">
2792 <title>Configuring AFS User Accounts</title>
2794 <para>This section discusses some of the issues to consider when
2795 configuring AFS user accounts. Because AFS is separate from the UNIX
2796 file system, a user's AFS account is separate from her UNIX
2799 <para>The preferred method for creating a user account is with the
2800 <emphasis role="bold">uss</emphasis> suite of commands. With a single
2801 command, you can create all the components of one or many accounts,
2802 after you have prepared a template file that guides the account
2803 creation. See <link linkend="HDRWQ449">Creating and Deleting User
2804 Accounts with the uss Command Suite</link>.</para>
2806 <para>Alternatively, you can issue the individual commands that create
2807 each component of an account. For instructions, along with
2808 instructions for removing user accounts and changing user passwords,
2809 user volume quotas and usernames, see <link
2810 linkend="HDRWQ491">Administering User Accounts</link>.</para>
2812 <para>When users leave your system, it is often good policy to remove
2813 their accounts. Instructions appear in <link
2814 linkend="HDRWQ486">Deleting Individual Accounts with the uss delete
2815 Command</link> and <link linkend="HDRWQ524">Removing a User
2816 Account</link>.</para>
2818 <para>An AFS user account consists of the following components, which
2819 are described in greater detail in <link linkend="HDRWQ494">The
2820 Components of an AFS User Account</link>.
2823 <para>A Protection Database entry</para>
2827 <para>An Authentication Database entry</para>
2831 <para>A volume</para>
2835 <para>A home directory at which the volume is mounted</para>
2839 <para>Ownership of the home directory and full permissions on
2844 <para>An entry in the local password file (<emphasis
2845 role="bold">/etc/passwd</emphasis> or equivalent) of each
2846 machine the user needs to log into</para>
2850 <para>Optionally, standard files and subdirectories that make
2851 the account more useful</para>
2856 <para>By creating some components but not others, you can create
2857 accounts at different levels of functionality, using either <emphasis
2858 role="bold">uss</emphasis> commands as described in <link
2859 linkend="HDRWQ449">Creating and Deleting User Accounts with the uss
2860 Command Suite</link> or individual commands as described in <link
2861 linkend="HDRWQ491">Administering User Accounts</link>. The levels of
2862 functionality include the following
2865 <para>An authentication-only account enables the user to obtain
2866 AFS tokens and so to access protected AFS data and to issue
2867 privileged commands. It consists only of entries in the
2868 Authentication and Protection Database. This type of account is
2869 suitable for administrative accounts and for users from foreign
2870 cells who need to access protected data. Local users generally
2871 also need a volume and home directory.</para>
2875 <para>A basic user account includes a volume for the user, in
2876 addition to Authentication and Protection Database entries. The
2877 volume is mounted in the AFS filespace as the user's home
2878 directory, and provides a repository for the user's personal
2883 <para>A full account adds configuration files for basic
2884 functions such as logging in, printing, and mail delivery to a
2885 basic account, making it more convenient and useful. For a
2886 discussion of some useful types of configuration files, see
2887 <link linkend="HDRWQ60">Creating Standard Files in New AFS
2888 Accounts</link>.</para>
2893 <para>If your users have UNIX user accounts that predate the
2894 introduction of AFS in the cell, you possibly want to convert them
2895 into AFS accounts. There are three main issues to consider:
2898 <para>Making UNIX and AFS UIDs match</para> </listitem>
2901 <para>Setting the password field in the local password file
2902 appropriately</para>
2906 <para>Moving files from the UNIX file system into AFS</para>
2911 <para>For further discussion, see <link linkend="HDRWQ459">Converting
2912 Existing UNIX Accounts with uss</link> or <link
2913 linkend="HDRWQ498">Converting Existing UNIX Accounts</link>.</para>
2916 <primary>username</primary>
2918 <secondary>choosing</secondary>
2922 <primary>user</primary>
2924 <secondary>name</secondary>
2930 <primary>choosing</primary>
2932 <secondary>name</secondary>
2934 <tertiary>user</tertiary>
2938 <primary>anonymous user</primary>
2940 <secondary>AFS UID reserved</secondary>
2944 <primary>AFS UID</primary>
2946 <secondary>reserved</secondary>
2948 <tertiary>anonymous user</tertiary>
2951 <sect2 id="HDRWQ58">
2952 <title>Choosing Usernames and Naming Other Account
2955 <para>This section suggests schemes for choosing usernames, AFS
2956 UIDs, user volume names and mount point names, and also outlines
2957 some restrictions on your choices.</para>
2960 <title>Usernames</title>
2962 <para>AFS imposes very few restrictions on the form of
2963 usernames. It is best to keep usernames short, both because many
2964 utilities and applications can handle usernames of no more than
2965 eight characters and because by convention many components of and
2966 AFS account incorporate the name. These include the entries in the
2967 Protection and Authentication Databases, the volume, and the mount
2968 point. Depending on your electronic mail delivery system, the
2969 username can become part of the user's mailing address. The
2970 username is also the string that the user types when logging in to
2971 a client machine.</para>
2974 <para>Some common choices for usernames are last names, first names,
2975 initials, or a combination, with numbers sometimes added. It is
2976 also best to avoid using the following characters, many of which
2977 have special meanings to the command shell.
2980 <para>The comma (<emphasis role="bold">,</emphasis>)</para>
2984 <para>The colon (<emphasis role="bold">:</emphasis>), because
2985 AFS reserves it as a field separator in protection group
2986 names; see <link linkend="HDRWQ62">The Two Types of
2987 User-Defined Groups</link></para>
2991 <para>The semicolon (<emphasis
2992 role="bold">;</emphasis>)</para>
2996 <para>The "at-sign" (<emphasis role="bold">@</emphasis>); this
2997 character is reserved for Internet mailing addresses</para>
3005 <para>The newline character</para>
3009 <para>The period (<emphasis role="bold">.</emphasis>); it is
3010 conventional to use this character only in the special
3011 username that an administrator adopts while performing
3012 privileged tasks, such as <emphasis
3013 role="bold">pat.admin</emphasis></para>
3019 <title>AFS UIDs and UNIX UIDs</title>
3021 <para>AFS associates a unique identification number, the AFS UID,
3022 with every username, recording the mapping in the user's
3023 Protection Database entry. The AFS UID functions within AFS much
3024 as the UNIX UID does in the local file system: the AFS server
3025 processes and the Cache Manager use it internally to identify a
3026 user, rather than the username.</para>
3029 <para>Every AFS user also must have a UNIX UID recorded in the local
3030 password file (<emphasis role="bold">/etc/passwd</emphasis> or
3031 equivalent) of each client machine they log onto. Both
3032 administration and a user's AFS access are simplest if the AFS UID
3033 and UNIX UID match. One important consequence of matching UIDs is
3034 that the owner reported by the <emphasis role="bold">ls
3035 -l</emphasis> command matches the AFS username.</para>
3037 <para>It is usually best to allow the Protection Server to allocate
3038 the AFS UID as it creates the Protection Database entry. However,
3039 both the <emphasis role="bold">pts createuser</emphasis> command and
3040 the <emphasis role="bold">uss</emphasis> commands that create user
3041 accounts enable you to assign AFS UIDs explicitly. This is
3042 appropriate in two cases:
3045 <para>You wish to group together the AFS UIDs of related
3050 <para>You are converting an existing UNIX account into an AFS
3051 account and want to make the AFS UID match the existing UNIX
3057 <para>After the Protection Server initializes for the first time on
3058 a cell's first file server machine, it starts assigning AFS UIDs at
3059 a default value. To change the default before creating any user
3060 accounts, or at any time, use the <emphasis role="bold">pts
3061 setmax</emphasis> command to reset the <computeroutput>max user id
3062 counter</computeroutput>. To display the counter, use the <emphasis
3063 role="bold">pts listmax</emphasis> command. See <link
3064 linkend="HDRWQ560">Displaying and Setting the AFS UID and GID
3065 Counters</link>.</para>
3067 <para>AFS reserves one AFS UID, 32766, for the user <emphasis
3068 role="bold">anonymous</emphasis>. The AFS server processes assign
3069 this identity and AFS UID to any user who does not possess a token
3070 for the local cell. Do not assign this AFS UID to any other user or
3071 hardcode its current value into any programs or a file's owner
3072 field, because it is subject to change in future releases.</para>
3075 <primary>username</primary>
3077 <secondary>part of volume name</secondary>
3081 <primary>choosing</primary>
3083 <secondary>name</secondary>
3085 <tertiary>user volume</tertiary>
3089 <title>User Volume Names</title>
3091 <para>Like any volume name, a user volume's base (read/write) name
3092 cannot exceed 22 characters in length or include the <emphasis
3093 role="bold">.readonly</emphasis> or <emphasis
3094 role="bold">.backup</emphasis> extension. See <link
3095 linkend="HDRWQ44">Creating Volumes to Simplify
3096 Administration</link>. By convention, user volume names have the
3097 format <emphasis role="bold">user.</emphasis>username. Using the
3098 <emphasis role="bold">user.</emphasis> prefix not only makes it
3099 easy to identify the volume's contents, but also to create a
3100 backup version of all user volumes by issuing a single <emphasis
3101 role="bold">vos backupsys</emphasis> command.</para>
3105 <primary>mount point</primary>
3107 <secondary>choosing name for user volume</secondary>
3111 <primary>choosing</primary>
3113 <secondary>name</secondary>
3115 <tertiary>user volume mount point</tertiary>
3119 <title>Mount Point Names</title>
3121 <para>By convention, the mount point for a user's volume is named
3122 after the username. Many cells follow the convention of mounting
3123 user volumes in the <emphasis
3124 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3125 role="bold">/usr</emphasis> directory, as discussed in <link
3126 linkend="HDRWQ43">The Third Level</link>. Very large cells
3127 sometimes find that mounting all user volumes in the same
3128 directory slows directory lookup, however; for suggested
3129 alternatives, see the following section.</para>
3133 <primary>directories</primary>
3135 <secondary>for grouping user home directories</secondary>
3139 <primary>user account</primary>
3141 <secondary>suggestions for grouping home directories</secondary>
3145 <sect2 id="HDRWQ59">
3146 <title>Grouping Home Directories</title>
3148 <para>Mounting user volumes in the <emphasis
3149 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3150 role="bold">/usr</emphasis> directory is an AFS-appropriate
3151 variation on the standard UNIX practice of putting user home
3152 directories under the <emphasis role="bold">/usr</emphasis>
3153 subdirectory. However, cells with more than a few hundred users
3154 sometimes find that mounting all user volumes in a single directory
3155 results in slow directory lookup. The solution is to distribute user
3156 volume mount points into several directories; there are a number of
3157 alternative methods to accomplish this.
3160 <para>Distribute user home directories into multiple
3161 directories that reflect organizational divisions, such as
3162 academic or corporate departments. For example, a company can
3163 create group directories called <emphasis
3164 role="bold">usr/marketing</emphasis>, <emphasis
3165 role="bold">usr/research</emphasis>, <emphasis
3166 role="bold">usr/finance</emphasis>. A good feature of this
3167 scheme is that knowing a user's department is enough to find
3168 the user's home directory. Also, it makes it easy to set the
3169 ACL to limit access to members of the department only. A
3170 potential drawback arises if departments are of sufficiently
3171 unequal size that users in large departments experience slower
3172 lookup than users in small departments. This scheme is also
3173 not appropriate in cells where users frequently change between
3178 <para>Distribute home directories into alphabetic
3179 subdirectories of the <emphasis role="bold">usr</emphasis>
3180 directory (the <emphasis role="bold">usr/a</emphasis>
3181 subdirectory, the <emphasis role="bold">usr/b</emphasis>
3182 subdirectory, and so on), based on the first letter of the
3183 username. If the cell is very large, create subdirectories
3184 under each letter that correspond to the second letter in the
3185 user name. This scheme has the same advantages and
3186 disadvantages of a department-based scheme. Anyone who knows
3187 the user's username can find the user's home directory, but
3188 users with names that begin with popular letters sometimes
3189 experience slower lookup.</para>
3193 <para>Distribute home directories randomly but evenly into
3194 more than one grouping directory. One cell that uses this
3195 scheme has over twenty such directories called the <emphasis
3196 role="bold">usr1</emphasis> directory, the <emphasis
3197 role="bold">usr2</emphasis> directory, and so on. This scheme
3198 is especially appropriate in cells where the other two schemes
3199 do not seem feasible. It eliminates the potential problem of
3200 differences in lookup speed, because all directories are about
3201 the same size. Its disadvantage is that there is no way to
3202 guess which directory a given user's volume is mounted in, but
3203 a solution is to create a symbolic link in the regular
3204 <emphasis role="bold">usr</emphasis> directory that references
3205 the actual mount point. For example, if user <emphasis
3206 role="bold">smith</emphasis>'s volume is mounted at the
3207 <emphasis role="bold">/afs/bigcell.com/usr17/smith</emphasis>
3208 directory, then the <emphasis
3209 role="bold">/afs/bigcell.com/usr/smith</emphasis> directory is
3210 a symbolic link to the <emphasis
3211 role="bold">../usr17/smith</emphasis> directory. This way, if
3212 someone does not know which directory the user <emphasis
3213 role="bold">smith</emphasis> is in, he or she can access it
3214 through the link called <emphasis
3215 role="bold">usr/smith</emphasis>; people who do know the
3216 appropriate directory save lookup time by specifying
3222 <para>For instructions on how to implement the various schemes when
3223 using the <emphasis role="bold">uss</emphasis> program to create
3224 user accounts, see <link linkend="HDRWQ472">Evenly Distributing User
3225 Home Directories with the G Instruction</link> and <link
3226 linkend="HDRWQ473">Creating a Volume with the V
3227 Instruction</link>.</para>
3230 <sect2 id="Header_72">
3231 <title>Making a Backup Version of User Volumes Available</title>
3233 <para>Mounting the backup version of a user's volume is a simple way
3234 to enable users themselves to restore data they have accidentally
3235 removed or deleted. It is conventional to mount the backup version
3236 at a subdirectory of the user's home directory (called perhaps the
3237 <emphasis role="bold">OldFiles</emphasis> subdirectory), but other
3238 schemes are possible. Once per day you create a new backup version
3239 to capture the changes made that day, overwriting the previous day's
3240 backup version with the new one. Users can always retrieve the
3241 previous day's copy of a file without your assistance, freeing you
3242 to deal with more pressing tasks.</para>
3244 <para>Users sometimes want to delete the mount point to their backup
3245 volume, because they erroneously believe that the backup volume's
3246 contents count against their quota. Remind them that the backup
3247 volume is separate, so the only space it uses in the user volume is
3248 the amount needed for the mount point.</para>
3250 <para>For further discussion of backup volumes, see <link
3251 linkend="HDRWQ77">Backing Up AFS Data</link> and <link
3252 linkend="HDRWQ201">Creating Backup Volumes</link>.</para>
3255 <primary>file</primary>
3257 <secondary>creating standard ones in new user account</secondary>
3261 <primary>user account</primary>
3263 <secondary>creating</secondary>
3265 <tertiary>standard files in</tertiary>
3269 <primary>creating</primary>
3271 <secondary>standard files in new user account</secondary>
3275 <sect2 id="HDRWQ60">
3276 <title>Creating Standard Files in New AFS Accounts</title>
3278 <para>From your experience as a UNIX administrator, you are probably
3279 familiar with the use of login and shell initialization files (such
3280 as the <emphasis role="bold">.login</emphasis> and <emphasis
3281 role="bold">.cshrc</emphasis> files) to make an account easier to
3284 <para>It is often practical to add some AFS-specific directories to
3285 the definition of the user's <envar>PATH</envar> environment
3286 variable, including the following:
3289 <para>The path to a <emphasis role="bold">bin</emphasis>
3290 subdirectory in the user's home directory for binaries the
3291 user has created (that is, <emphasis
3292 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3293 role="bold">/usr/</emphasis><replaceable>username</replaceable><emphasis
3294 role="bold">/bin</emphasis>)</para>
3298 <para>The <emphasis role="bold">/usr/afsws/bin</emphasis>
3299 path, which conventionally includes programs like <emphasis
3300 role="bold">fs</emphasis>, <emphasis
3301 role="bold">klog</emphasis>, <emphasis
3302 role="bold">kpasswd</emphasis>, <emphasis
3303 role="bold">pts</emphasis>, <emphasis
3304 role="bold">tokens</emphasis>, and <emphasis
3305 role="bold">unlog</emphasis></para>
3309 <para>The <emphasis role="bold">/usr/afsws/etc</emphasis>
3310 path, if the user is an administrator; it usually houses the
3311 AFS command suites that require privilege (the <emphasis
3312 role="bold">backup</emphasis>, <emphasis
3313 role="bold">butc</emphasis>, <emphasis
3314 role="bold">kas</emphasis>, <emphasis
3315 role="bold">uss</emphasis>, <emphasis
3316 role="bold">vos</emphasis> commands), the <emphasis
3317 role="bold">package</emphasis> program, and others</para>
3322 <para>If you are not using an AFS-modified login utility, it can be
3323 helpful to users to invoke the <emphasis role="bold">klog</emphasis>
3324 command in their <emphasis role="bold">.login</emphasis> file so
3325 that they obtain AFS tokens as part of logging in. In the following
3326 example command sequence, the first line echoes the string
3327 <computeroutput>klog</computeroutput> to the standard output stream,
3328 so that the user understands the purpose of the
3329 <computeroutput>Password:</computeroutput> prompt that appears when
3330 the second line is executed. The <emphasis
3331 role="bold">-setpag</emphasis> flag associates the new tokens with a
3332 process authentication group (PAG), which is discussed further in
3333 <link linkend="HDRWQ64">Identifying AFS Tokens by PAG</link>.</para>
3336 echo -n "klog " klog -setpag
3339 <para>The following sequence of commands has a similar effect,
3340 except that the <emphasis role="bold">pagsh</emphasis> command forks
3341 a new shell with which the PAG and tokens are associated.</para>
3344 pagsh echo -n "klog " klog
3347 <para>If you use an AFS-modified login utility, this sequence is not
3348 necessary, because such utilities both log a user in locally and
3349 obtain AFS tokens.</para>
3352 <primary>group</primary>
3354 <secondary>AFS GID</secondary>
3358 <primary>group</primary>
3360 <secondary>restrictions</secondary>
3364 <primary>group</primary>
3366 <secondary>privacy flags</secondary>
3370 <primary>privacy flags on Protection Database entry</primary>
3375 <sect1 id="HDRWQ61">
3376 <title>Using AFS Protection Groups</title>
3378 <para>AFS enables users to define their own groups of other users or
3379 machines. The groups are placed on ACLs to grant the same permissions
3380 to many users without listing each user individually. For group
3381 creation instructions, see <link linkend="HDRWQ531">Administering the
3382 Protection Database</link>.</para>
3384 <para>Groups have AFS ID numbers, just as users do, but an AFS group
3385 ID (GID) is a negative integer whereas a user's AFS UID is a positive
3386 integer. By default, the Protection Server allocates a new group's AFS
3387 GID automatically, but members of the <emphasis
3388 role="bold">system:administrators</emphasis> group can assign a GID
3389 when issuing the <emphasis role="bold">pts creategroup</emphasis>
3390 command. Before explicitly assigning a GID, it is best to verify that
3391 it is not already in use.</para>
3393 <para>A group cannot belong to another group, but it can own another
3394 group or even itself as long as it (the owning group) has at least one
3395 member. The current owner of a group can transfer ownership of the
3396 group to another user or group, even without the new owner's
3397 permission. At that point the former owner loses administrative
3398 control over the group.</para>
3400 <para>By default, each user can create 20 groups. A system
3401 administrator can increase or decrease this group creation quota with
3402 the <emphasis role="bold">pts setfields</emphasis> command.</para>
3404 <para>Each Protection Database entry (group or user) is protected by a
3405 set of five privacy flagswhich limit who can administer the entry and
3406 what they can do. The default privacy flags are fairly restrictive,
3407 especially for user entries. See <link linkend="HDRWQ559">Setting the
3408 Privacy Flags on Database Entries</link>.</para>
3411 <primary>system:administrators group</primary>
3413 <secondary>about</secondary>
3417 <primary>system:anyuser group</primary>
3419 <secondary>about</secondary>
3423 <primary>system:authuser group</primary>
3425 <secondary>about</secondary>
3429 <primary>group</primary>
3431 <secondary>system-defined</secondary>
3434 <sect2 id="Header_75">
3435 <title>The Three System Groups</title>
3437 <para>As the Protection Server initializes for the first time on a
3438 cell's first database server machine, it automatically creates three
3439 group entries: the <emphasis role="bold">system:anyuser</emphasis>,
3440 <emphasis role="bold">system:authuser</emphasis>, and <emphasis
3441 role="bold">system:administrators</emphasis> groups.</para>
3444 <primary>AFS UID</primary>
3446 <secondary>reserved</secondary>
3448 <tertiary>system-defined groups</tertiary>
3451 <para>The first two system groups are unlike any other groups in the
3452 Protection Database in that they do not have a stable membership:
3455 <para>The <emphasis role="bold">system:anyuser</emphasis>
3456 group includes everyone who can access a cell's AFS filespace:
3457 users who have tokens for the local cell, users who have
3458 logged in on a local AFS client machine but not obtained
3459 tokens (such as the local superuser <emphasis
3460 role="bold">root</emphasis>), and users who have connected to
3461 a local machine from outside the cell. Placing the <emphasis
3462 role="bold">system:anyuser</emphasis> group on an ACL grants
3463 access to the widest possible range of users. It is the only
3464 way to extend access to users from foreign AFS cells that do
3465 not have local accounts.</para>
3469 <para>The <emphasis role="bold">system:authuser</emphasis>
3470 group includes everyone who has a valid token obtained from
3471 the cell's AFS authentication service.</para>
3476 <para>Because the groups do not have a stable membership, the
3477 <emphasis role="bold">pts membership</emphasis> command produces no
3478 output for them. Similarly, they do not appear in the list of groups
3479 to which a user belongs.</para>
3481 <para>The <emphasis role="bold">system:administrators</emphasis>
3482 group does have a stable membership, consisting of the cell's
3483 privileged administrators. Members of this group can issue any
3484 <emphasis role="bold">pts</emphasis> command, and are the only ones
3485 who can issue several other restricted commands (such as the
3486 <emphasis role="bold">chown</emphasis> command on AFS files). By
3487 default, they also implicitly have the <emphasis
3488 role="bold">a</emphasis> (<emphasis
3489 role="bold">administer</emphasis>) and <emphasis
3490 role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>)
3491 permissions on every ACL in the filespace. For information about
3492 changing this default, see <link linkend="HDRWQ586">Administering
3493 the system:administrators Group</link>.</para>
3495 <para>For a discussion of how to use system groups effectively on
3496 ACLs, see <link linkend="HDRWQ571">Using Groups on
3500 <sect2 id="HDRWQ62">
3501 <title>The Two Types of User-Defined Groups</title>
3503 <para>All users can create regular groups. A regular group name has
3504 two fields separated by a colon, the first of which must indicate
3505 the group's ownership. The Protection Server refuses to create or
3506 change the name of a group if the result does not accurately
3507 indicate the ownership.</para>
3509 <para>Members of the <emphasis
3510 role="bold">system:administrators</emphasis> group can create
3511 prefix-less groups whose names do not have the first field that
3512 indicates ownership. For suggestions on using the two types of
3513 groups effectively, see <link linkend="HDRWQ545">Using Groups
3514 Effectively</link>.</para>
3517 <primary>authentication</primary>
3519 <secondary>AFS separate from UNIX</secondary>
3523 <primary>AFS</primary>
3525 <secondary>authentication separate from UNIX</secondary>
3530 <sect1 id="HDRWQ63">
3531 <title>Login and Authentication in AFS</title>
3533 <para>As explained in <link linkend="HDRWQ31">Differences in
3534 Authentication</link>, AFS authentication is separate from UNIX
3535 authentication because the two file systems are separate. The
3536 separation has two practical implications:
3539 <para>To access AFS files, users must both log into the local
3540 file system and authenticate with the AFS authentication
3541 service. (Logging into the local file system is necessary
3542 because the only way to access the AFS filespace is through a
3543 Cache Manager, which resides in the local machine's
3548 <para>Passwords are stored in two separate places: in the
3549 Kerberos Database for AFS and in the each machine's local
3550 password file (the <emphasis role="bold">/etc/passwd</emphasis>
3551 file or equivalent) for the local file system.</para>
3556 <para>When a user successfully authenticates, the AFS authentication
3557 service passes a token to the user's Cache Manager. The token is a
3558 small collection of data that certifies that the user has correctly
3559 provided the password associated with a particular AFS identity. The
3560 Cache Manager presents the token to AFS server processes along with
3561 service requests, as proof that the user is genuine. To learn about
3562 the mutual authentication procedure they use to establish identity,
3563 see <link linkend="HDRWQ75">A More Detailed Look at Mutual
3564 Authentication</link>.</para>
3566 <para>The Cache Manager stores tokens in the user's credential
3567 structure in kernel memory. To distinguish one user's credential
3568 structure from another's, the Cache Manager identifies each one either
3569 by the user's UNIX UID or by a process authentication group (PAG),
3570 which is an identification number guaranteed to be unique in the
3571 cell. For further discussion, see <link linkend="HDRWQ64">Identifying
3572 AFS Tokens by PAG</link>.</para>
3575 <primary>tokens</primary>
3577 <secondary>one-per-cell rule</secondary>
3580 <para>A user can have only one token per cell in each separately
3581 identified credential structure. To obtain a second token for the same
3582 cell, the user must either log into a different machine or obtain
3583 another credential structure with a different identifier than any
3584 existing credential structure, which is most easily accomplished by
3585 issuing the <emphasis role="bold">pagsh</emphasis> command (see <link
3586 linkend="HDRWQ64">Identifying AFS Tokens by PAG</link>). In a single
3587 credential structure, a user can have one token for each of many cells
3588 at the same time. As this implies, authentication status on one
3589 machine or PAG is independent of authentication status on another
3590 machine or PAG, which can be very useful to a user or system
3591 administrator.</para>
3593 <para>The AFS distribution includes library files that enable each
3594 system type's login utility to authenticate users with AFS and log
3595 them into the local file system in one step. If you do not configure
3596 an AFS-modified login utility on a client machine, its users must
3597 issue the <emphasis role="bold">klog</emphasis> command to
3598 authenticate with AFS after logging in.</para>
3601 <para>The AFS-modified libraries do not necessarily support all
3602 features available in an operating system's proprietary login
3603 utility. In some cases, it is not possible to support a utility at
3604 all. For more information about the supported utilities in each AFS
3605 version, see the OpenAFS Release Notes.</para>
3609 <primary>commands</primary>
3611 <secondary>pagsh</secondary>
3615 <primary>pagsh command</primary>
3619 <primary>commands</primary>
3621 <secondary>klog with -setpag flag</secondary>
3625 <primary>klog command</primary>
3627 <secondary>with -setpag flag</secondary>
3631 <primary>PAG</primary>
3633 <secondary>creating with klog or pagsh command</secondary>
3637 <primary>creating</primary>
3639 <secondary>PAG with klog or pagsh command</secondary>
3643 <primary>process authentication group</primary>
3645 <secondary></secondary>
3650 <sect2 id="HDRWQ64">
3651 <title>Identifying AFS Tokens by PAG</title>
3653 <para>As noted, the Cache Manager identifies user credential
3654 structures either by UNIX UID or by PAG. Using a PAG is preferable
3655 because it guaranteed to be unique: the Cache Manager allocates it
3656 based on a counter that increments with each use. In contrast,
3657 multiple users on a machine can share or assume the same UNIX UID,
3658 which creates potential security problems. The following are two
3659 common such situations:
3662 <para>The local superuser <emphasis
3663 role="bold">root</emphasis> can always assume any other user's
3664 UNIX UID simply by issuing the <emphasis
3665 role="bold">su</emphasis> command, without providing the
3666 user's password. If the credential structure is associated
3667 with the user's UNIX UID, then assuming the UID means
3668 inheriting the AFS tokens.</para>
3672 <para>Two users working on different NFS client machines can
3673 have the same UNIX UID in their respective local file
3674 systems. If they both access the same NFS/AFS Translator
3675 machine, and the Cache Manager there identifies them by their
3676 UNIX UID, they become indistinguishable. To eliminate this
3677 problem, the Cache Manager on a translator machine
3678 automatically generates a PAG for each user and uses it,
3679 rather than the UNIX UID, to tell users apart.</para>
3684 <para>Yet another advantage of PAGs over UIDs is that processes
3685 spawned by the user inherit the PAG and so share the token; thus
3686 they gain access to AFS as the authenticated user. In many
3687 environments, for example, printer and other daemons run under
3688 identities (such as the local superuser <emphasis
3689 role="bold">root</emphasis>) that the AFS server processes recognize
3690 only as the <emphasis role="bold">anonymous</emphasis> user. Unless
3691 PAGs are used, such daemons cannot access files for which the
3692 <emphasis role="bold">system:anyuser</emphasis> group does not have
3693 the necessary ACL permissions.</para>
3695 <para>Once a user has a PAG, any new tokens the user obtains are
3696 associated with the PAG. The PAG expires two hours after any
3697 associated tokens expire or are discarded. If the user issues the
3698 <emphasis role="bold">klog</emphasis> command before the PAG
3699 expires, the new token is associated with the existing PAG (the PAG
3700 is said to be recycled in this case).</para>
3702 <para>AFS-modified login utilities automatically generate a PAG, as
3703 described in the following section. If you use a standard login
3704 utility, your users must issue the <emphasis
3705 role="bold">pagsh</emphasis> command before the <emphasis
3706 role="bold">klog</emphasis> command, or include the latter command's
3707 <emphasis role="bold">-setpag</emphasis> flag. For instructions, see
3708 <link linkend="HDRWQ69">Using Two-Step Login and
3709 Authentication</link>.</para>
3711 <para>Users can also use either command at any time to create a new
3712 PAG. The difference between the two commands is that the <emphasis
3713 role="bold">klog</emphasis> command replaces the PAG associated with
3714 the current command shell and tokens. The <emphasis
3715 role="bold">pagsh</emphasis> command initializes a new command shell
3716 before creating a new PAG. If the user already had a PAG, any
3717 running processes or jobs continue to use the tokens associated with
3718 the old PAG whereas any new jobs or processes use the new PAG and
3719 its associated tokens. When you exit the new shell (by pressing
3720 <<emphasis role="bold">Ctrl-d</emphasis>>, for example), you
3721 return to the original PAG and shell. By default, the <emphasis
3722 role="bold">pagsh</emphasis> command initializes a Bourne shell, but
3723 you can include the <emphasis role="bold">-c</emphasis> argument to
3724 initialize a C shell (the <emphasis role="bold">/bin/csh</emphasis>
3725 program on many system types) or Korn shell (the <emphasis
3726 role="bold">/bin/ksh</emphasis> program) instead.</para>
3729 <primary>login utility</primary>
3731 <secondary>AFS version</secondary>
3735 <sect2 id="HDRWQ65">
3736 <title>Using an AFS-modified login Utility</title>
3738 <para>As previously mentioned, an AFS-modified login utility
3739 simultaneously obtains an AFS token and logs the user into the local
3740 file system. This section outlines the login and authentication
3741 process and its interaction with the value in the password field of
3742 the local password file.</para>
3744 <para>An AFS-modified login utility performs a sequence of steps
3745 similar to the following; details can vary for different operating
3749 <para>It checks the user's entry in the local password file
3750 (the <emphasis role="bold">/etc/passwd</emphasis> file or
3755 <para>If no entry exists, or if an asterisk
3756 (<computeroutput>*</computeroutput>) appears in the entry's
3757 password field, the login attempt fails. If the entry exists,
3758 the attempt proceeds to the next step.</para>
3762 <para><anchor id="LIWQ66" />The utility obtains a PAG.</para>
3766 <para><anchor id="LIWQ67" />The utility converts the password
3767 provided by the user into an encryption key and encrypts a
3768 packet of data with the key. It sends the packet to the AFS
3769 authentication service (the AFS Authentication Server in the
3770 conventional configuration).</para>
3774 <para>The authentication service decrypts the packet and,
3775 depending on the success of the decryption, judges the
3776 password to be correct or incorrect. (For more details, see
3777 <link linkend="HDRWQ75">A More Detailed Look at Mutual
3778 Authentication</link>.)
3781 <para>If the authentication service judges the password
3782 incorrect, the user does not receive an AFS token. The
3783 PAG is retained, ready to be associated with any tokens
3784 obtained later. The attempt proceeds to Step <link
3785 linkend="LIWQ68">6</link>.</para>
3789 <para>If the authentication service judges the password
3790 correct, it issues a token to the user as proof of AFS
3791 authentication. The login utility logs the user into the
3792 local UNIX file system. Some login utilities echo the
3793 following banner to the screen to alert the user to
3794 authentication with AFS. Step <link
3795 linkend="LIWQ68">6</link> is skipped.
3797 AFS(R) version Login
3806 <para><anchor id="LIWQ68" />If no AFS token was granted in
3807 Step <link linkend="LIWQ67">4</link>, the login utility
3808 attempts to log the user into the local file system, by
3809 comparing the password provided to the local password file.
3812 <para>If the password is incorrect or any value other
3813 than an encrypted 13-character string appears in the
3814 password field, the login attempt fails.</para>
3818 <para>If the password is correct, the user is logged
3819 into the local file system only.</para> </listitem>
3827 <primary>local password file</primary>
3829 <secondary>when using AFS--modified login utility</secondary>
3833 <primary>login utility</primary>
3835 <secondary>AFS version's interaction with local password
3840 <primary>password</primary>
3842 <secondary>local password file</secondary>
3845 <para>As indicated, when you use an AFS-modified login utility, the
3846 password field in the local password file is no longer the primary
3847 gate for access to your system. If the user provides the correct AFS
3848 password, then the program never consults the local password
3849 file. However, you can still use the password field to control
3850 access, in the following way:
3853 <para>To prevent both local login and AFS authentication,
3854 place an asterisk (<emphasis role="bold">*</emphasis>) in the
3855 field. This is useful mainly in emergencies, when you want to
3856 prevent a certain user from logging into the machine.</para>
3860 <para>To prevent login to the local file system if the user
3861 does not provide the correct AFS password, place a character
3862 string of any length other than the standard thirteen
3863 characters in the field. This is appropriate if you want to
3864 permit only people with local AFS accounts to login on your
3865 machines. A single <emphasis role="bold">X</emphasis> or other
3866 character is the most easily recognizable way to do
3871 <para>To enable a user to log into the local file system even
3872 after providing an incorrect AFS password, record a standard
3873 UNIX encrypted password in the field by issuing the standard
3874 UNIX password-setting command (<emphasis
3875 role="bold">passwd</emphasis> or equivalent).</para>
3880 <para>Systems that use a Pluggable Authentication Module (PAM) for
3881 login and AFS authentication do not necessarily consult the local
3882 password file at all, in which case they do not use the password
3883 field to control authentication and login attempts. Instead,
3884 instructions in the PAM configuration file (on many system types,
3885 <emphasis role="bold">/etc/pam.conf</emphasis>) fill the same
3886 function. See the instructions in the OpenAFS Quick Beginnings for
3887 installing AFS-modified login utilities.</para>
3890 <primary>local password file</primary>
3892 <secondary>when not using AFS-modified login utility</secondary>
3896 <sect2 id="HDRWQ69">
3897 <title>Using Two-Step Login and Authentication</title>
3899 <para>In cells that do not use an AFS-modified login utility, users
3900 must issue separate commands to login and authenticate, as detailed
3901 in the OpenAFS User Guide:
3904 <para>They use the standard <emphasis
3905 role="bold">login</emphasis> program to login to the local
3906 file system, providing the password listed in the local
3907 password file (the <emphasis
3908 role="bold">/etc/passwd</emphasis> file or equivalent).</para>
3912 <para>They must issue the <emphasis
3913 role="bold">klog</emphasis> command to authenticate with the
3914 AFS authentication service, including its <emphasis
3915 role="bold">-setpag</emphasis> flag to associate the new
3916 tokens with a process authentication group (PAG).</para>
3921 <para>As mentioned in <link linkend="HDRWQ60">Creating Standard
3922 Files in New AFS Accounts</link>, you can invoke the <emphasis
3923 role="bold">klog -setpag</emphasis> command in a user's <emphasis
3924 role="bold">.login</emphasis> file (or equivalent) so that the user
3925 does not have to remember to issue the command after logging in. The
3926 user still must type a password twice, once at the prompt generated
3927 by the login utility and once at the <emphasis
3928 role="bold">klog</emphasis> command's prompt. This implies that the
3929 two passwords can differ, but it is less confusing if they do
3932 <para>Another effect of not using an AFS-modified login utility is
3933 that the AFS servers recognize the standard <emphasis
3934 role="bold">login</emphasis> program as the <emphasis
3935 role="bold">anonymous</emphasis> user. If the <emphasis
3936 role="bold">login</emphasis> program needs to access any AFS files
3937 (such as the <emphasis role="bold">.login</emphasis> file in a
3938 user's home directory), then the ACL that protects the file must
3939 include an entry granting the <emphasis role="bold">l</emphasis>
3940 (<emphasis role="bold">lookup</emphasis>) and <emphasis
3941 role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>)
3942 permissions to the <emphasis role="bold">system:anyuser</emphasis>
3945 <para>When you do not use an AFS-modified login utility, an actual
3946 (scrambled) password must appear in the local password file for each
3947 user. Use the <emphasis role="bold">/bin/passwd</emphasis> file to
3948 insert or change these passwords. It is simpler if the password in
3949 the local password file matches the AFS password, but it is not
3953 <primary>tokens</primary>
3955 <secondary>displaying for user</secondary>
3959 <primary>tokens</primary>
3961 <secondary>command</secondary>
3965 <primary>commands</primary>
3967 <secondary>tokens</secondary>
3971 <primary>listing</primary>
3973 <secondary>tokens held by issuer</secondary>
3977 <primary>commands</primary>
3979 <secondary>klog</secondary>
3983 <primary>klog command</primary>
3987 <primary>server process</primary>
3989 <secondary>creating ticket (tokens) for</secondary>
3993 <primary>tickets</primary>
3995 <secondary></secondary>
4001 <primary>tokens</primary>
4003 <secondary>creating for server process</secondary>
4007 <primary>authenticated identity</primary>
4009 <secondary>acquiring with klog command</secondary>
4013 <primary>unlog command</primary>
4017 <primary>commands</primary>
4019 <secondary>unlog</secondary>
4023 <primary>discarding</primary>
4025 <secondary>tokens</secondary>
4029 <primary>tokens</primary>
4031 <secondary>discarding with unlog command</secondary>
4035 <sect2 id="Header_81">
4036 <title>Obtaining, Displaying, and Discarding Tokens</title>
4038 <para>Once logged in, a user can obtain a token at any time with the
4039 <emphasis role="bold">klog</emphasis> command. If a valid token
4040 already exists, the new one overwrites it. If a PAG already exists,
4041 the new token is associated with it.</para>
4043 <para>By default, the <emphasis role="bold">klog</emphasis> command
4044 authenticates the issuer using the identity currently logged in to
4045 the local file system. To authenticate as a different identity, use
4046 the <emphasis role="bold">-principal</emphasis> argument. To obtain
4047 a token for a foreign cell, use the <emphasis
4048 role="bold">-cell</emphasis> argument (it can be combined with the
4049 <emphasis role="bold">-principal</emphasis> argument). See the
4050 OpenAFS User Guide and the entry for the <emphasis
4051 role="bold">klog</emphasis> command in the OpenAFS Administration
4054 <para>To discard either all tokens or the token for a particular
4055 cell, issue the <emphasis role="bold">unlog</emphasis> command. The
4056 command affects only the tokens associated with the current command
4057 shell. See the OpenAFS User Guideand the entry for the <emphasis
4058 role="bold">unlog</emphasis> command in the OpenAFS Administration
4061 <para>To display the tokens associated with the current command
4062 shell, issue the <emphasis role="bold">tokens</emphasis>
4063 command. The following examples illustrate its output in various
4066 <para>If the issuer is not authenticated in any cell:</para>
4069 % <emphasis role="bold">tokens</emphasis>
4070 Tokens held by the Cache Manager:
4074 <para>The following shows the output for a user with AFS UID 1000 in
4075 the ABC Corporation cell:</para>
4078 % <emphasis role="bold">tokens</emphasis>
4079 Tokens held by the Cache Manager:
4080 User's (AFS ID 1000) tokens for afs@abc.com [Expires Jun 2 10:00]
4084 <para>The following shows the output for a user who is authenticated
4085 in ABC Corporation cell, the State University cell and the DEF
4086 Company cell. The user has different AFS UIDs in the three
4087 cells. Tokens for the last cell are expired:</para>
4090 % <emphasis role="bold">tokens</emphasis>
4091 Tokens held by the Cache Manager:
4092 User's (AFS ID 1000) tokens for afs@abc.com [Expires Jun 2 10:00]
4093 User's (AFS ID 4286) tokens for afs@stateu.edu [Expires Jun 3 1:34]
4094 User's (AFS ID 22) tokens for afs@def.com [>>Expired<<]
4098 <para>The Kerberos version of the <emphasis
4099 role="bold">tokens</emphasis> command (the <emphasis
4100 role="bold">tokens.krb</emphasis> command), also reports information
4101 on the ticket-granting ticket, including the ticket's owner, the
4102 ticket-granting service, and the expiration date, as in the
4103 following example. Also see <link linkend="HDRWQ70">Support for
4104 Kerberos Authentication</link>.</para>
4107 % <emphasis role="bold">tokens.krb</emphasis>
4108 Tokens held by the Cache Manager:
4109 User's (AFS ID 1000) tokens for afs@abc.com [Expires Jun 2 10:00]
4110 User smith's tokens for krbtgt.ABC.COM@abc.com [Expires Jun 2 10:00]
4115 <sect2 id="Header_82">
4116 <title>Setting Default Token Lifetimes for Users</title>
4119 <primary>tokens</primary>
4121 <secondary>setting default lifetimes for users</secondary>
4124 <para>The maximum lifetime of a user token is the smallest of the
4125 ticket lifetimes recorded in the following three Authentication
4126 Database entries. The <emphasis role="bold">kas examine</emphasis>
4127 command reports the lifetime as <computeroutput>Max ticket
4128 lifetime</computeroutput>. Administrators who have the
4129 <computeroutput>ADMIN</computeroutput> flag on their Authentication
4130 Database entry can use the <emphasis
4131 role="bold">-lifetime</emphasis> argument to the <emphasis
4132 role="bold">kas setfields</emphasis> command to set an entry's
4136 <para>The <emphasis role="bold">afs</emphasis> entry, which
4137 corresponds to the AFS server processes. The default is 100
4142 <para>The <emphasis role="bold">krbtgt</emphasis>.cellname
4143 entry, which corresponds to the ticket-granting ticket used
4144 internally in generating the token. The default is 720 hours
4149 <para>The entry for the user of the AFS-modified login utility
4150 or issuer of the <emphasis role="bold">klog</emphasis>
4151 command. The default is 25 hours for user entries created
4152 using the AFS 3.1 or later version of the Authentication
4153 Server, and 100 hours for user entries created using the AFS
4154 3.0 version of the Authentication Server. A user can use the
4155 <emphasis role="bold">kas examine</emphasis> command to
4156 display his or her own Authentication Database entry.</para>
4162 <para>An AFS-modified login utility always grants a token with a
4163 lifetime calculated from the previously described three
4164 values. When issuing the <emphasis role="bold">klog</emphasis>
4165 command, a user can request a lifetime shorter than the default by
4166 using the <emphasis role="bold">-lifetime</emphasis> argument. For
4167 further information, see the OpenAFS User Guide and the <emphasis
4168 role="bold">klog</emphasis> reference page in the OpenAFS
4169 Administration Reference.</para>
4173 <sect2 id="Header_83">
4174 <title>Changing Passwords</title>
4177 <primary>password</primary>
4179 <secondary>changing in AFS</secondary>
4183 <primary>kpasswd command</primary>
4187 <primary>commands</primary>
4189 <secondary>kpasswd</secondary>
4193 <primary>kas commands</primary>
4195 <secondary>setpassword</secondary>
4199 <primary>commands</primary>
4201 <secondary>kas setpassword</secondary>
4204 <para>Regular AFS users can change their own passwords by using
4205 either the <emphasis role="bold">kpasswd</emphasis> or <emphasis
4206 role="bold">kas setpassword</emphasis> command. The commands prompt
4207 for the current password and then twice for the new password, to
4208 screen out typing errors.</para>
4210 <para>Administrators who have the
4211 <computeroutput>ADMIN</computeroutput> flag on their Authentication
4212 Database entries can change any user's password, either by using the
4213 <emphasis role="bold">kpasswd</emphasis> command (which requires
4214 knowing the current password) or the <emphasis role="bold">kas
4215 setpassword</emphasis> command.</para>
4217 <para>If your cell does not use an AFS-modified login utility,
4218 remember also to change the local password, using the operating
4219 system's password-changing command. For more instructions on
4220 changing passwords, see <link linkend="HDRWQ516">Changing AFS
4221 Passwords</link>.</para>
4224 <sect2 id="Header_84">
4225 <title>Imposing Restrictions on Passwords and Authentication
4228 <para>You can help to make your cell more secure by imposing
4229 restrictions on user passwords and authentication attempts. To
4230 impose the restrictions as you create an account, use the <emphasis
4231 role="bold">A</emphasis> instruction in the <emphasis
4232 role="bold">uss</emphasis> template file as described in <link
4233 linkend="HDRWQ478">Increasing Account Security with the A
4234 Instruction</link>. To set or change the values on an existing
4235 account, use the <emphasis role="bold">kas setfields</emphasis>
4236 command as described in <link linkend="HDRWQ515">Improving Password
4237 and Authentication Security</link>.</para>
4240 <primary>password</primary>
4242 <secondary>expiration</secondary>
4246 <primary>password</primary>
4248 <secondary>lifetime</secondary>
4252 <primary>kas commands</primary>
4254 <secondary>setfields</secondary>
4258 <primary>commands</primary>
4260 <secondary>kas setfields</secondary>
4264 <primary>Authentication Database</primary>
4266 <secondary>password lifetime, setting</secondary>
4270 <primary>password</primary>
4272 <secondary>restricting reuse</secondary>
4275 <para>By default, AFS passwords never expire. Limiting password
4276 lifetime can help improve security by decreasing the time the
4277 password is subject to cracking attempts. You can choose an lifetime
4278 from 1 to 254 days after the password was last changed. It
4279 automatically applies to each new password as it is set. When the
4280 user changes passwords, you can also insist that the new password is
4281 not similar to any of the 20 passwords previously used.</para>
4284 <primary>password</primary>
4286 <secondary>consequences of multiple failed authentication
4287 attempts</secondary>
4291 <primary>kas commands</primary>
4293 <secondary>setfields</secondary>
4297 <primary>commands</primary>
4299 <secondary>kas setfields</secondary>
4303 <primary>authentication</primary>
4305 <secondary>consequences of multiple failures</secondary>
4308 <para>Unscrupulous users can try to gain access to your AFS cell by
4309 guessing an authorized user's password. To protect against this type
4310 of attack, you can limit the number of times that a user can
4311 consecutively fail to provide the correct password. When the limit
4312 is exceeded, the authentication service refuses further
4313 authentication attempts for a specified period of time (the lockout
4314 time). To reenable authentication attempts before the lockout time
4315 expires, an administrator must issue the <emphasis role="bold">kas
4316 unlock</emphasis> command.</para>
4319 <primary>password</primary>
4321 <secondary>checking quality of</secondary>
4325 <primary>kpasswd command</primary>
4329 <primary>commands</primary>
4331 <secondary>kpasswd</secondary>
4335 <primary>kas commands</primary>
4337 <secondary>setpassword</secondary>
4341 <primary>kpwvalid program</primary>
4344 <para>In addition to settings on user's authentication accounts, you
4345 can improve security by automatically checking the quality of new
4346 user passwords. The <emphasis role="bold">kpasswd</emphasis> and
4347 <emphasis role="bold">kas setpassword</emphasis> commands pass the
4348 proposed password to a program or script called <emphasis
4349 role="bold">kpwvalid</emphasis>, if it exists. The <emphasis
4350 role="bold">kpwvalid</emphasis> performs quality checks and returns
4351 a code to indicate whether the password is acceptable. You can
4352 create your own program or modified the sample program included in
4353 the AFS distribution. See the <emphasis
4354 role="bold">kpwvalid</emphasis> reference page in the OpenAFS
4355 Administration Reference.</para>
4357 <para>There are several types of quality checks that can improve
4361 <para>The password is a minimum length</para>
4365 <para>The password is not a word</para>
4369 <para>The password contains both numbers and letters</para>
4375 <sect2 id="HDRWQ70">
4376 <title>Support for Kerberos Authentication</title>
4379 <primary>Kerberos</primary>
4381 <secondary>support for in AFS</secondary>
4385 <primary>commands</primary>
4387 <secondary>klog.krb</secondary>
4391 <primary>commands</primary>
4393 <secondary>pagsh.krb</secondary>
4397 <primary>commands</primary>
4399 <secondary>tokens.krb</secondary>
4403 <primary>klog.krb command</primary>
4407 <primary>pagsh.krb command</primary>
4411 <primary>tokens.krb command</primary>
4414 <para>If your site is using standard Kerberos authentication rather
4415 than the AFS Authentication Server, use the modified versions of the
4416 <emphasis role="bold">klog</emphasis>, <emphasis
4417 role="bold">pagsh</emphasis>, and <emphasis
4418 role="bold">tokens</emphasis> commands that support Kerberos
4419 authentication. The binaries for the modified version of these
4420 commands have the same name as the standard binaries with the
4421 addition of a <emphasis role="bold">.krb</emphasis>
4424 <para>Use either the Kerberos version or the standard command
4425 throughout the cell; do not mix the two versions. AFS Product
4426 Support can provide instructions on installing the Kerberos version
4427 of these four commands. For information on the differences between
4428 the two versions of these commands, see the OpenAFS Administration
4432 <sect1 id="HDRWQ71">
4433 <title>Security and Authorization in AFS</title>
4435 <para>AFS incorporates several features to ensure that only authorized
4436 users gain access to data. This section summarizes the most important
4437 of them and suggests methods for improving security in your
4440 <sect2 id="HDRWQ72">
4441 <title>Some Important Security Features</title>
4444 <primary>security</primary>
4446 <secondary>AFS features</secondary>
4450 <primary>AFS</primary>
4452 <secondary>security features</secondary>
4456 <title>ACLs on Directories</title>
4458 <para>Files in AFS are protected by the access control list (ACL)
4459 associated with their parent directory. The ACL defines which
4460 users or groups can access the data in the directory, and in what
4461 way. See <link linkend="HDRWQ562">Managing Access Control
4462 Lists</link>.</para>
4466 <title>Mutual Authentication Between Client and Server</title>
4468 <para>When an AFS client and server process communicate, each
4469 requires the other to prove its identity during mutual
4470 authentication, which involves the exchange of encrypted
4471 information that only valid parties can decrypt and respond
4472 to. For a detailed description of the mutual authentication
4473 process, see <link linkend="HDRWQ75">A More Detailed Look at
4474 Mutual Authentication</link>.</para>
4477 <para>AFS server processes mutually authenticate both with one
4478 another and with processes that represent human users. After mutual
4479 authentication is complete, the server and client have established
4480 an authenticated connection, across which they can communicate
4481 repeatedly without having to authenticate again until the connection
4482 expires or one of the parties closes it. Authenticated connections
4483 have varying lifetimes.</para>
4486 <title>Tokens</title>
4488 <para>In order to access AFS files, users must prove their
4489 identities to the AFS authentication service by providing the
4490 correct AFS password. If the password is correct, the
4491 authentication service sends the user a token as evidence of
4492 authenticated status. See <link linkend="HDRWQ63">Login and
4493 Authentication in AFS</link>.</para>
4496 <para>Servers assign the user identity <emphasis
4497 role="bold">anonymous</emphasis> to users and processes that do not
4498 have a valid token. The <emphasis role="bold">anonymous</emphasis>
4499 identity has only the access granted to the <emphasis
4500 role="bold">system:anyuser</emphasis> group on ACLs.</para>
4503 <title>Authorization Checking</title>
4505 <para>Mutual authentication establishes that two parties
4506 communicating with one another are actually who they claim to be.
4507 For many functions, AFS server processes also check that the
4508 client whose identity they have verified is also authorized to
4509 make the request. Different requests require different kinds of
4510 privilege. See <link linkend="HDRWQ73">Three Types of
4511 Privilege</link>.</para>
4515 <title>Encrypted Network Communications</title>
4518 <primary>network</primary>
4520 <secondary>encrypted communication in AFS</secondary>
4524 <primary>encrypted network communication</primary>
4528 <primary>security</primary>
4530 <secondary>encrypted network communication</secondary>
4533 <para>The AFS server processes encrypt particularly sensitive
4534 information before sending it back to clients. Even if an
4535 unauthorized party is able to eavesdrop on an authenticated
4536 connection, they cannot decipher encrypted data without the proper
4540 <para>The following AFS commands encrypt data because they involve
4541 server encryption keys and passwords:
4544 <para>The <emphasis role="bold">bos addkey</emphasis> command,
4545 which adds a server encryption key to the <emphasis
4546 role="bold">/usr/afs/etc/KeyFile</emphasis> file</para>
4550 <para>The <emphasis role="bold">bos listkeys</emphasis>
4551 command, which lists the server encryption keys from the
4552 <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis>
4557 <para>The <emphasis role="bold">kpasswd</emphasis> command,
4558 which changes a password in the Authentication Database</para>
4562 <para>Most commands in the <emphasis
4563 role="bold">kas</emphasis> command suite</para>
4568 <para>In addition, the United States edition of the Update Server
4569 encrypts sensitive information (such as the contents of <emphasis
4570 role="bold">KeyFile</emphasis>) when distributing it. Other commands
4571 in the <emphasis role="bold">bos</emphasis> suite and the commands
4572 in the <emphasis role="bold">fs</emphasis>, <emphasis
4573 role="bold">pts</emphasis> and <emphasis role="bold">vos</emphasis>
4574 suites do not encrypt data before transmitting it.</para>
4577 <sect2 id="HDRWQ73">
4578 <title>Three Types of Privilege</title>
4580 <para>AFS uses three separate types of privilege for the reasons
4581 discussed in <link linkend="HDRWQ585">The Reason for Separate
4585 <para>Membership in the <emphasis
4586 role="bold">system:administrators</emphasis> group. Members
4587 are entitled to issue any <emphasis role="bold">pts</emphasis>
4588 command and those <emphasis role="bold">fs</emphasis> commands
4589 that set volume quota. By default, they also implicitly have
4590 the <emphasis role="bold">a</emphasis> (<emphasis
4591 role="bold">administer</emphasis>) and <emphasis
4592 role="bold">l</emphasis> (<emphasis
4593 role="bold">lookup</emphasis>) permissions on every ACL in the
4594 file tree even if the ACL does not include an entry for
4599 <para>The <computeroutput>ADMIN</computeroutput> flag on the
4600 Authentication Database entry. An administrator with this flag
4601 can issue any <emphasis role="bold">kas</emphasis>
4606 <para>Inclusion in the <emphasis
4607 role="bold">/usr/afs/etc/UserList</emphasis> file. An
4608 administrator whose username appears in this file can issue
4609 any <emphasis role="bold">bos</emphasis>, <emphasis
4610 role="bold">vos</emphasis>, or <emphasis
4611 role="bold">backup</emphasis> command (although some <emphasis
4612 role="bold">backup</emphasis> commands require additional
4613 privilege as described in <link linkend="HDRWQ260">Granting
4614 Administrative Privilege to Backup Operators</link>).</para>
4620 <sect2 id="Header_89">
4621 <title>Authorization Checking versus Authentication</title>
4623 <para>AFS distinguishes between authentication and authorization
4624 checking. Authentication refers to the process of proving
4625 identity. Authorization checking refers to the process of verifying
4626 that an authenticated identity is allowed to perform a certain
4629 <para>AFS implements authentication at the level of
4630 connections. Each time two parties establish a new connection, they
4631 mutually authenticate. In general, each issue of an AFS command
4632 establishes a new connection between AFS server process and
4635 <para>AFS implements authorization checking at the level of server
4636 machines. If authorization checking is enabled on a server machine,
4637 then all of the server processes running on it provide services only
4638 to authorized users. If authorization checking is disabled on a
4639 server machine, then all of the server processes perform any action
4640 for anyone. Obviously, disabling authorization checking is an
4641 extreme security exposure. For more information, see <link
4642 linkend="HDRWQ123">Managing Authentication and Authorization
4643 Requirements</link>.</para>
4646 <sect2 id="HDRWQ74">
4647 <title>Improving Security in Your Cell</title>
4650 <primary>security</primary>
4652 <secondary>suggestions for improving</secondary>
4655 <para>You can improve the level of security in your cell by
4656 configuring user accounts, server machines, and system administrator
4657 accounts in the indicated way.</para>
4660 <title>User Accounts</title>
4665 <para>Use an AFS-modified login utility, or include the
4666 <emphasis role="bold">-setpag</emphasis> flag to the
4667 <emphasis role="bold">klog</emphasis> command, to associate
4668 the credential structure that houses tokens with a PAG
4669 rather than a UNIX UID. This prevents users from inheriting
4670 someone else's tokens by assuming their UNIX identity. For
4671 further discussion, see <link linkend="HDRWQ64">Identifying
4672 AFS Tokens by PAG</link>.</para>
4676 <para>Encourage users to issue the <emphasis
4677 role="bold">unlog</emphasis> command to destroy their tokens
4678 before logging out. This forestalls attempts to access
4679 tokens left behind kernel memory. Consider including the
4680 <emphasis role="bold">unlog</emphasis> command in every
4681 user's <emphasis role="bold">.logout</emphasis> file or
4689 <title>Server Machines</title>
4694 <para>Disable authorization checking only in emergencies or
4695 for very brief periods of time. It is best to work at the
4696 console of the affected machine during this time, to prevent
4697 anyone else from accessing the machine through the
4702 <para>Change the AFS server encryption key on a frequent and
4703 regular schedule. Make it difficult to guess (a long string
4704 including nonalphabetic characters, for instance). Unlike
4705 user passwords, the password from which the AFS key is
4706 derived can be longer than eight characters, because it is
4707 never used during login. The <emphasis role="bold">kas
4708 setpassword</emphasis> command accepts a password hundreds
4709 of characters long. For instructions, see <link
4710 linkend="HDRWQ355">Managing Server Encryption
4715 <para>As much as possible, limit the number of people who
4716 can login at a server machine's console or remotely.
4717 Imposing this limit is an extra security precaution rather
4718 than a necessity. The machine cannot serve as an AFS client
4719 in this case.</para>
4723 <para>Particularly limit access to the local superuser
4724 <emphasis role="bold">root</emphasis> account on a server
4725 machine. The local superuser <emphasis
4726 role="bold">root</emphasis> has free access to important
4727 administrative subdirectories of the <emphasis
4728 role="bold">/usr/afs</emphasis> directory, as described in
4729 <link linkend="HDRWQ53">AFS Files on the Local
4733 <primary>root superuser</primary>
4735 <secondary>limiting logins</secondary>
4740 <para>As in any computing environment, server machines must
4741 be located in a secured area. Any other security measures
4742 are effectively worthless if unauthorized people can access
4743 the computer hardware.</para>
4750 <title>System Administrators</title>
4755 <para>Limit the number of system administrators in your
4756 cell. Limit the use of system administrator accounts on
4757 publicly accessible workstations. Such machines are not
4758 secure, so unscrupulous users can install programs that try
4759 to steal tokens or passwords. If administrators must use
4760 publicly accessible workstations at times, they must issue
4761 the <emphasis role="bold">unlog</emphasis> command before
4762 leaving the machine.</para>
4766 <para>Create an administrative account for each
4767 administrator separate from the personal account, and assign
4768 AFS privileges only to the administrative account. The
4769 administrators must authenticate to the administrative
4770 accounts to perform duties that require privilege, which
4771 provides a useful audit trail as well.</para>
4775 <para>Administrators must not leave a machine unattended
4776 while they have valid tokens. Issue the <emphasis
4777 role="bold">unlog</emphasis> command before leaving.</para>
4781 <para>Use the <emphasis role="bold">-lifetime</emphasis>
4782 argument to the <emphasis role="bold">kas
4783 setfields</emphasis> command to set the token lifetime for
4784 administrative accounts to a fairly short amount of time.
4785 The default lifetime for AFS tokens is 25 hours, but 30 or
4786 60 minutes is possibly a more reasonable lifetime for
4787 administrative tokens. The tokens for administrators who
4788 initiate AFS Backup System operations must last somewhat
4789 longer, because it can take several hours to complete some
4790 dump operations, depending on the speed of the tape device
4791 and the network connecting it to the file server machines
4792 that house the volumes is it accessing.</para>
4796 <para>Limit administrators' use of the <emphasis
4797 role="bold">telnet</emphasis> program. It sends unencrypted
4798 passwords across the network. Similarly, limit use of other
4799 remote programs such as <emphasis role="bold">rsh</emphasis>
4800 and <emphasis role="bold">rcp</emphasis>, which send
4801 unencrypted tokens across the network.</para>
4808 <sect2 id="HDRWQ75">
4809 <title>A More Detailed Look at Mutual Authentication</title>
4812 <primary>mutual authentication</primary>
4816 <primary>distributed file system</primary>
4818 <secondary>security issues</secondary>
4822 <primary>shared secret</primary>
4826 <primary>server encryption key</primary>
4828 <secondary>defined</secondary>
4831 <para>As in any file system, security is a prime concern in AFS. A
4832 file system that makes file sharing easy is not useful if it makes
4833 file sharing mandatory, so AFS incorporates several features that
4834 prevent unauthorized users from accessing data. Security in a
4835 networked environment is difficult because almost all procedures
4836 require transmission of information across wires that almost anyone
4837 can tap into. Also, many machines on networks are powerful enough
4838 that unscrupulous users can monitor transactions or even intercept
4839 transmissions and fake the identity of one of the
4840 participants.</para>
4842 <para>The most effective precaution against eavesdropping and
4843 information theft or fakery is for servers and clients to accept the
4844 claimed identity of the other party only with sufficient proof. In
4845 other words, the nature of the network forces all parties on the
4846 network to assume that the other party in a transaction is not
4847 genuine until proven so. Mutual authentication is the means through
4848 which parties prove their genuineness.</para>
4850 <para>Because the measures needed to prevent fakery must be quite
4851 sophisticated, the implementation of mutual authentication
4852 procedures is complex. The underlying concept is simple, however:
4853 parties prove their identities by demonstrating knowledge of a
4854 shared secret. A shared secret is a piece of information known only
4855 to the parties who are mutually authenticating (they can sometimes
4856 learn it in the first place from a trusted third party or some other
4857 source). The party who originates the transaction presents the
4858 shared secret and refuses to accept the other party as valid until
4859 it shows that it knows the secret too.</para>
4861 <para>The most common form of shared secret in AFS transactions is
4862 the encryption key, also referred to simply as a key. The two
4863 parties use their shared key to encrypt the packets of information
4864 they send and to decrypt the ones they receive. Encryption using
4865 keys actually serves two related purposes. First, it protects
4866 messages as they cross the network, preventing anyone who does not
4867 know the key from eavesdropping. Second, ability to encrypt and
4868 decrypt messages successfully indicates that the parties are using
4869 the key (it is their shared secret). If they are using different
4870 keys, messages remain scrambled and unintelligible after
4873 <para>The following sections describe AFS's mutual authentication
4874 procedures in more detail. Feel free to skip these sections if you
4875 are not interested in the mutual authentication process.</para>
4877 <sect3 id="Header_92">
4878 <title>Simple Mutual Authentication</title>
4880 <para>Simple mutual authentication involves only one encryption
4881 key and two parties, generally a client and server. The client
4882 contacts the server by sending a challenge message encrypted with
4883 a key known only to the two of them. The server decrypts the
4884 message using its key, which is the same as the client's if they
4885 really do share the same secret. The server responds to the
4886 challenge and uses its key to encrypt its response. The client
4887 uses its key to decrypt the server's response, and if it is
4888 correct, then the client can be sure that the server is genuine:
4889 only someone who knows the same key as the client can decrypt the
4890 challenge and answer it correctly. On its side, the server
4891 concludes that the client is genuine because the challenge message
4892 made sense when the server decrypted it.</para>
4894 <para>AFS uses simple mutual authentication to verify user
4895 identities during the first part of the login procedure. In that
4896 case, the key is based on the user's password.</para>
4899 <sect3 id="HDRWQ76">
4900 <title>Complex Mutual Authentication</title>
4902 <para>Complex mutual authentication involves three encryption keys
4903 and three parties. All secure AFS transactions (except the first
4904 part of the login process) employ complex mutual
4905 authentication.</para>
4908 <primary>ticket-granter</primary>
4912 <primary>server encryption key</primary>
4916 <primary>tokens</primary>
4918 <secondary>data in</secondary>
4921 <para>When a client wishes to communicate with a server, it first
4922 contacts a third party called a ticket-granter. The ticket-granter
4923 and the client mutually authenticate using the simple
4924 procedure. When they finish, the ticket-granter gives the client a
4925 server ticket (or simply ticket) as proof that it (the
4926 ticket-granter) has preverified the identity of the client. The
4927 ticket-granter encrypts the ticket with the first of the three
4928 keys, called the server encryption key because it is known only to
4929 the ticket-granter and the server the client wants to contact. The
4930 client does not know this key.</para>
4932 <para>The ticket-granter sends several other pieces of information
4933 along with the ticket. They enable the client to use the ticket
4934 effectively despite being unable to decrypt the ticket
4935 itself. Along with the ticket, the items constitute a token:
4938 <para>A session key, which is the second encryption key
4939 involved in mutual authentication. The ticket-granter
4940 invents the session key at random as the shared secret
4941 between client and server. For reasons explained further
4942 below, the ticket-granter also puts a copy of the session
4943 key inside the ticket. The client and server use the session
4944 key to encrypt messages they send to one another during
4945 their transactions. The ticket-granter invents a different
4946 session key for each connection between a client and a
4947 server (there can be several transactions during a single
4951 <primary>session key</primary>
4956 <para>The name of the server for which the ticket is valid
4957 (and so which server encryption key encrypts the ticket
4962 <para>A ticket lifetime indicator. The default lifetime of
4963 AFS server tickets is 100 hours. If the client wants to
4964 contact the server again after the ticket expires, it must
4965 contact the ticket-granter to get a new ticket.</para>
4970 <para>The ticket-granter seals the entire token with the third key
4971 involved in complex mutual authentication--the key known only to
4972 it (the ticket-granter) and the client. In some cases, this third
4973 key is derived from the password of the human user whom the client
4976 <para>Now that the client has a valid server ticket, it is ready
4977 to contact the server. It sends the server two things:
4980 <para>The server ticket. This is encrypted with the server
4981 encryption key.</para>
4985 <para>Its request message, encrypted with the session
4986 key. Encrypting the message protects it as it crosses the
4987 network, since only the server/client pair for whom the
4988 ticket-granter invented the session key know it.</para>
4993 <para>At this point, the server does not know the session key,
4994 because the ticket-granter just created it. However, the
4995 ticket-granter put a copy of the session key inside the
4996 ticket. The server uses the server encryption key to decrypts the
4997 ticket and learns the session key. It then uses the session key to
4998 decrypt the client's request message. It generates a response and
4999 sends it to the client. It encrypts the response with the session
5000 key to protect it as it crosses the network.</para>
5002 <para>This step is the heart of mutual authentication between
5003 client and server, because it proves to both parties that they
5004 know the same secret:
5007 <para>The server concludes that the client is authorized to
5008 make a request because the request message makes sense when
5009 the server decrypts it using the session key. If the client
5010 uses a different session key than the one the server finds
5011 inside the ticket, then the request message remains
5012 unintelligible even after decryption. The two copies of the
5013 session key (the one inside the ticket and the one the
5014 client used) can only be the same if they both came from the
5015 ticket-granter. The client cannot fake knowledge of the
5016 session key because it cannot look inside the ticket, sealed
5017 as it is with the server encryption key known only to the
5018 server and the ticket-granter. The server trusts the
5019 ticket-granter to give tokens only to clients with whom it
5020 (the ticket-granter) has authenticated, so the server
5021 decides the client is legitimate.</para>
5023 <para>(Note that there is no direct communication between
5024 the ticket-granter and the server, even though their
5025 relationship is central to ticket-based mutual
5026 authentication. They interact only indirectly, via the
5027 client's possession of a ticket sealed with their shared
5032 <para>The client concludes that the server is genuine and
5033 trusts the response it gets back from the server, because
5034 the response makes sense after the client decrypts it using
5035 the session key. This indicates that the server encrypted
5036 the response with the same session key as the client
5037 knows. The only way for the server to learn that matching
5038 session key is to decrypt the ticket first. The server can
5039 only decrypt the ticket because it shares the secret of the
5040 server encryption key with the ticket-granter. The client
5041 trusts the ticket-granter to give out tickets only for
5042 legitimate servers, so the client accepts a server that can
5043 decrypt the ticket as genuine, and accepts its
5052 <sect1 id="HDRWQ77">
5053 <title>Backing Up AFS Data</title>
5055 <para>AFS provides two related facilities that help the administrator
5056 back up AFS data: backup volumes and the AFS Backup System.</para>
5058 <sect2 id="Header_95">
5059 <title>Backup Volumes</title>
5061 <para>The first facility is the backup volume, which you create by
5062 cloning a read/write volume. The backup volume is read-only and so
5063 preserves the state of the read/write volume at the time the clone
5066 <para>Backup volumes can ease administration if you mount them in
5067 the file system and make their contents available to users. For
5068 example, it often makes sense to mount the backup version of each
5069 user volume as a subdirectory of the user's home directory. A
5070 conventional name for this mount point is <emphasis
5071 role="bold">OldFiles</emphasis>. Create a new version of the backup
5072 volume (that is, reclone the read/write) once a day to capture any
5073 changes that were made since the previous backup. If a user
5074 accidentally removes or changes data, the user can restore it from
5075 the backup volume, rather than having to ask you to restore
5078 <para>The OpenAFS User Guide does not mention backup volumes, so
5079 regular users do not know about them if you decide not to use
5080 them. This implies that if you <emphasis role="bold">do</emphasis>
5081 make backup versions of user volumes, you need to tell your users
5082 about how the backup works and where you have mounted it.</para>
5084 <para>Users are often concerned that the data in a backup volume
5085 counts against their volume quota and some of them even want to
5086 remove the <emphasis role="bold">OldFiles</emphasis> mount point. It
5087 does not, because the backup volume is a separate volume. The only
5088 amount of space it uses in the user's volume is the amount needed
5089 for the mount point, which is about the same as the amount needed
5090 for a standard directory element.</para>
5092 <para>Backup volumes are discussed in detail in <link
5093 linkend="HDRWQ201">Creating Backup Volumes</link>.</para>
5096 <sect2 id="Header_96">
5097 <title>The AFS Backup System</title>
5099 <para>Backup volumes can reduce restoration requests, but they
5100 reside on disk and so do not protect data from loss due to hardware
5101 failure. Like any file system, AFS is vulnerable to this sort of
5104 <para>To protect your cell's users from permanent loss of data, you
5105 are strongly urged to back up your file system to tape on a regular
5106 and frequent schedule. The AFS Backup System is available to ease
5107 the administration and performance of backups. For detailed
5108 information about the AFS Backup System, see <link
5109 linkend="HDRWQ248">Configuring the AFS Backup System</link> and
5110 <link linkend="HDRWQ283">Backing Up and Restoring AFS
5115 <sect1 id="HDRWQ79">
5116 <title>Accessing AFS through NFS</title>
5118 <para>Users of NFS client machines can access the AFS filespace by
5119 mounting the <emphasis role="bold">/afs</emphasis> directory of an AFS
5120 client machine that is running the NFS/AFS Translator. This is a
5121 particular advantage in cells already running NFS who want to access
5122 AFS using client machines for which AFS is not available. See <link
5123 linkend="HDRWQ595">Appendix A, Managing the NFS/AFS
5124 Translator</link>.</para>