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. If a directory must contain files with
82 different permissions, use symbolic links to point to files
83 stored in directories with different ACLs.</para>
87 <para>Moving a file to a different directory changes its
88 protection. See <link linkend="HDRWQ566">Differences Between
89 UFS and AFS Data Protection</link>.</para>
93 <para>An ACL can include about 20 entries granting different
94 combinations of permissions to different users or groups,
95 rather than only the three UNIX entities represented by the
96 three sets of mode bits. See <link
97 linkend="HDRWQ566">Differences Between UFS and AFS Data
98 Protection</link>.</para>
102 <para>You can designate an AFS file as write-only as in the
103 UNIX file system, by setting only the <emphasis
104 role="bold">w</emphasis> (<emphasis
105 role="bold">write</emphasis>) mode bit. You cannot designate
106 an AFS directory as write-only, because AFS ignores the mode
107 bits on a directory. See <link linkend="HDRWQ580">How AFS
108 Interprets the UNIX Mode Bits</link>.</para>
113 <para>AFS enables users to create groups and add other users to
114 those groups. Placing these groups on ACLs extends the same
115 permissions to a number of exactly specified users at the same time,
116 which is much more convenient than placing the individuals on the
117 ACLs directly. See <link linkend="HDRWQ531">Administering the
118 Protection Database</link>.</para>
120 <para>There are also system-defined groups, <emphasis
121 role="bold">system:anyuser</emphasis> and <emphasis
122 role="bold">system:authuser</emphasis>, whose presence on an ACL
123 extends access to a wide range of users at once. See <link
124 linkend="HDRWQ535">The System Groups</link> and <link
125 linkend="HDRWQ571">Using Groups on ACLs</link>.</para>
128 <primary>authentication</primary>
130 <secondary>AFS compared to UNIX</secondary>
134 <primary>password</primary>
136 <secondary>AFS compared to UNIX</secondary>
141 <title>Differences in Authentication</title>
143 <para>Just as the AFS filespace is distinct from each machine's
144 local file system, AFS authentication is separate from local
145 login. This has two practical implications, which will already be
146 familiar to users and system administrators who use Kerberos for
150 <para>To access AFS files, users must log into the local
151 machine as normal, obtain Kerberos tickets, and then obtain
152 AFS tokens. This process can often be automated through the
153 system authentication configuration so that the user logs into
154 the system as normal and obtains Kerberos tickets and AFS
155 tokens transparently. If you cannot or chose not to configure
156 the system this way, your users must login and authenticate in
157 separate steps, as detailed in the <emphasis>OpenAFS User
158 Guide</emphasis>.</para>
162 <para>Passwords may be stored in two separate places: the
163 Kerberos KDC and, optionally, each machine's local user
164 database (<emphasis role="bold">/etc/passwd</emphasis> or
165 equivalent) for the local system. A user's passwords in the
166 two places can differ if desired.</para>
172 <sect2 id="Header_37">
173 <title>Differences in the Semantics of Standard UNIX
176 <para>This section summarizes how AFS modifies the functionality of
180 <primary>chmod command</primary>
182 <secondary>AFS compared to UNIX</secondary>
186 <primary>commands</primary>
188 <secondary>chmod (AFS compared to UNIX)</secondary>
192 <primary>setuid programs</primary>
194 <secondary>setting mode bits</secondary>
198 <term><emphasis role="bold">The chmod
199 command</emphasis></term>
202 <para>Only members of the <emphasis
203 role="bold">system:administrators</emphasis> group can use
204 this command to turn on the setuid, setgid or sticky mode
205 bits on AFS files. For more information, see <link
206 linkend="HDRWQ409">Determining if a Client Can Run Setuid
207 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>
224 <term><emphasis role="bold">The chown
225 command</emphasis></term>
228 <para>Only members of the <emphasis
229 role="bold">system:administrators</emphasis> group can issue
230 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>
247 <term><emphasis role="bold">The chgrp
248 command</emphasis></term>
251 <para>Only members of the <emphasis
252 role="bold">system:administrators</emphasis> can issue this
253 command on AFS files and directories.</para>
258 <primary>groups command</primary>
259 <secondary>AFS compared to UNIX</secondary>
263 <primary>id command</primary>
264 <secondary>AFS compared to UNIX</secondary>
268 <primary>commands</primary>
269 <secondary>groups (AFS compared to UNIX)</secondary>
273 <primary>commands</primary>
274 <secondary>id (AFS compared to UNIX)</secondary>
278 <term><emphasis role="bold">The groups and id
279 commands</emphasis></term>
282 <para>If the user's AFS tokens are associated with a process
283 authentication group (PAG), the output of these commands may
284 include one or two large numbers. These are artificial
285 groups used by the OpenAFS Cache Manager to track the PAG on
286 some platforms. Other platforms may use other methods, such
287 as native kernel support for a PAG or a similar concept, in
288 which case the large GIDs may not appear. To learn about
289 PAGs, see <link linkend="HDRWQ64">Identifying AFS Tokens by
295 <primary>ln command</primary>
297 <secondary>AFS compared to UNIX</secondary>
301 <primary>commands</primary>
303 <secondary>ln (AFS compared to UNIX)</secondary>
307 <term><emphasis role="bold">The ln command</emphasis></term>
310 <para>This command cannot create hard links between files in
311 different AFS directories. See <link
312 linkend="HDRWQ32">Creating Hard Links</link>.</para>
317 <primary>sshd command</primary>
319 <secondary>AFS compared to UNIX</secondary>
323 <primary>commands</primary>
325 <secondary>sshd (AFS compared to UNIX)</secondary>
329 <primary>ssh command</primary>
331 <secondary>AFS compared to UNIX</secondary>
335 <primary>commands</primary>
337 <secondary>ssh (AFS compared to UNIX)</secondary>
341 <term><emphasis role="bold">The sshd daemon and ssh
342 command</emphasis></term>
345 <para>In order for a user to have access to files stored in
346 AFS, that user needs to have Kerberos tickets and an AFS token
347 on the system from which they're accessing AFS. This has an
348 implication for users who log in remotely via protocols such
349 as Secure Shell (SSH): that log-in process must create local
350 Kerberos tickets and an AFS token on the system, or the user
351 will have to separately authenticate to Kerberos and AFS
352 after logging in.</para>
354 <para>The <ulink url="http://www.openssh.org/">OpenSSH
355 project</ulink> provides an SSH client and server that uses
356 the GSS-API protocol to pass Kerberos tickets between
357 machines. With a suitable SSH client, this allows users to
358 delegate their Kerberos tickets to the remote machine, and
359 that machine to store those tickets and obtain AFS tokens as
360 part of the log-in process.</para>
367 <primary>fsck command</primary>
369 <secondary>AFS compared to UNIX</secondary>
373 <primary>file server machine</primary>
374 <secondary>inode-based</secondary>
378 <primary>file server machine</primary>
379 <secondary>namei-based</secondary>
383 <primary>namei</primary>
384 <secondary>definition</secondary>
388 <primary>commands</primary>
390 <secondary>fsck (AFS compared to UNIX)</secondary>
394 <primary>fsck command</primary>
396 <secondary>AFS version</secondary>
400 <primary>commands</primary>
402 <secondary>fsck (AFS version)</secondary>
406 <primary>directories</primary>
408 <secondary>lost+found</secondary>
412 <primary>lost+found directory</primary>
416 <sect2 id="Header_38">
417 <title>The AFS version of the fsck Command and inode-based
421 <para>The fileserver uses either of two formats for storing data
422 on disk. The inode-based format uses a combination of regular
423 files and extra fields stored in the inode data structures that
424 are normally reserved for use by the operating system. The namei
425 format uses normal file storage and does not use special
426 structures. The choice of storage formats is chosen at compile
427 time and the two formats are incompatible. The inode format is
428 only available on certain platforms. The storage format must be
429 consistent for the fileserver binaries and all vice partitions on
430 a given file server machine.</para>
434 <para>This section on fsck advice only applies to the inode-based
435 fileserver binaries. On servers using namei-based binaries, the
436 vendor-supplied fsck can be used as normal.</para>
439 <para>If you are using AFS fileserver binaries compiled with the
440 inode-based format, never run the standard UNIX <emphasis
441 role="bold">fsck</emphasis> command on an AFS file server
442 machine. It does not understand how the File Server organizes volume
443 data on disk, and so moves all AFS data into the <emphasis
444 role="bold">lost+found</emphasis> directory on the partition.</para>
446 <para>Instead, use the version of the <emphasis
447 role="bold">fsck</emphasis> program that is included in the AFS
448 distribution. The <emphasis>OpenAFS Quick Start Guide</emphasis>
449 explains how to replace the vendor-supplied <emphasis
450 role="bold">fsck</emphasis> program with the AFS version as you
451 install each server machine.</para>
453 <para>The AFS version functions like the standard <emphasis
454 role="bold">fsck</emphasis> program on data stored on both UFS and
455 AFS partitions. The appearance of a banner like the following as the
456 <emphasis role="bold">fsck</emphasis> program initializes confirms
457 that you are running the correct one:</para>
460 --- AFS (R) version fsck---
463 <para>where <emphasis>version</emphasis> is the AFS version. For
464 correct results, it must match the AFS version of the server
465 binaries in use on the machine.</para>
467 <para>If you ever accidentally run the standard version of the
468 program, contact your AFS support provider, contact the OpenAFS
469 mailing lists, or refer to the <ulink
470 url="http://www.openafs.org/support.html">OpenAFS support web
471 page</ulink> for support options. It is sometimes possible to
472 recover volume data from the <emphasis
473 role="bold">lost+found</emphasis> directory. If the data is not
474 recoverabled, then restoring from backup is recommended.</para>
477 <para>Running the fsck binary supplied by the operating system
478 vendor on an fileserver using inode-based file storage will result
479 in data corruption!</para>
484 <title>Creating Hard Links</title>
487 <primary>hard link</primary>
489 <secondary>AFS restrictions on</secondary>
493 <primary>restrictions</primary>
495 <secondary>on hard links in AFS</secondary>
498 <para>AFS does not allow hard links (created with the UNIX <emphasis
499 role="bold">ln</emphasis> command) between files that reside in
500 different directories, because in that case it is unclear which of
501 the directory's ACLs to associate with the link.</para>
503 <para>AFS also does not allow hard links to directories, in order to
504 keep the file system organized as a tree.</para>
506 <para>It is possible to create symbolic links (with the UNIX
507 <emphasis role="bold">ln -s</emphasis> command) between elements in
508 two different AFS directories, or even between an element in AFS and
509 one in a machine's local UNIX file system. Do not create a symbolic
510 link in AFS to a file whose name begins with either a number sign
511 (<emphasis role="bold">#</emphasis>) or a percent sign (<emphasis
512 role="bold">%</emphasis>), however. The Cache Manager interprets
513 such links as a mount point to a regular or read/write volume,
518 <title>AFS Implements Save on Close</title>
521 <primary>fsync system call</primary>
523 <secondary>for files saved on AFS client</secondary>
527 <primary>close system call</primary>
529 <secondary>for files saved on AFS client</secondary>
533 <primary>write</primary>
535 <secondary>system call for files saved on AFS client</secondary>
538 <para>When an application issues the UNIX <emphasis
539 role="bold">close</emphasis> system call on a file, the Cache
540 Manager performs a synchronous write of the data to the File Server
541 that maintains the central copy of the file. It does not return
542 control to the application until the File Server has acknowledged
543 receipt of the data. For the <emphasis role="bold">fsync</emphasis>
544 system call, control does not return to the application until the
545 File Server indicates that it has written the data to non-volatile
546 storage on the file server machine.</para>
548 <para>When an application issues the UNIX <emphasis
549 role="bold">write</emphasis> system call, the Cache Manager writes
550 modifications to the local AFS client cache only. If the local
551 machine crashes or an application program exits without issuing the
552 <emphasis role="bold">close</emphasis> system call, it is possible
553 that the modifications are not recorded in the central copy of the
554 file maintained by the File Server. The Cache Manager does sometimes
555 write this type of modified data from the cache to the File Server
556 without receiving the <emphasis role="bold">close</emphasis> or
557 <emphasis role="bold">fsync</emphasis> system call, such as when it
558 needs to free cache chunks for new data. However, it is not
559 generally possible to predict when the Cache Manager transfers
560 modified data to the File Server in this way.</para>
562 <para>The implication is that if an application's <emphasis
563 role="bold">Save</emphasis> option invokes the <emphasis
564 role="bold">write</emphasis> system call rather than <emphasis
565 role="bold">close</emphasis> or <emphasis
566 role="bold">fsync</emphasis>, the changes are not necessarily stored
567 permanently on the File Server machine. Most application programs
568 issue the <emphasis role="bold">close</emphasis> system call for
569 save operations, as well as when they finish handling a file and
570 when they exit.</para>
573 <sect2 id="Header_41">
574 <title>Setuid Programs</title>
577 <primary>setuid programs</primary>
579 <secondary>restrictions on</secondary>
582 <para>The UNIX setuid bit is ignored by default for programs run
583 from AFS, but can be enabled by the system administrator on a client
584 machine. The <emphasis role="bold">fs setcell</emphasis> command
585 determines whether setuid programs that originate in a particular
586 cell can run on a given client machine. Running setuid binaries from
587 AFS poses a security risk due to weaknesses in the integrity checks
588 of the AFS protocol and should normally not be permitted. See <link
589 linkend="HDRWQ409">Determining if a Client Can Run Setuid
590 Programs</link>.</para>
592 <para>Set the UNIX setuid bit only for files whose owner is UID 0
593 (the local superuser <emphasis role="bold">root</emphasis>). This
594 does not present an automatic security risk: the local superuser has
595 no special privilege in AFS, but only in the local machine's UNIX
596 file system and kernel. Setting the UNIX setuid bit for files owned
597 with a different UID will have unpredictable resuilts, since that
598 UID will be interpreted as possibly different users on each AFS
599 client machine.</para>
601 <para>Any file can be marked with the setuid bit, but only members
602 of the <emphasis role="bold">system:administrators</emphasis> group
603 can issue the <emphasis role="bold">chown</emphasis> system call or
604 the <emphasis role="bold">chown</emphasis> command, or issue the
605 <emphasis role="bold">chmod</emphasis> system call or the <emphasis
606 role="bold">chmod</emphasis> command to set the setuid bit.</para>
611 <title>Choosing a Cell Name</title>
614 <primary>cell</primary>
616 <secondary>name</secondary>
618 <tertiary>choosing</tertiary>
622 <primary>choosing</primary>
624 <secondary>name</secondary>
626 <tertiary>cell</tertiary>
630 <primary>conventions</primary>
632 <secondary>cell name</secondary>
636 <primary>Internet</primary>
638 <secondary>conventions for cell name</secondary>
641 <para>This section explains how to choose a cell name and explains why
642 choosing an appropriate cell name is important.</para>
644 <para>Your cell name must distinguish your cell from all others in the
645 AFS global namespace. By convention, the cell name is the second
646 element in any AFS pathname; therefore, a unique cell name guarantees
647 that every AFS pathname uniquely identifies a file, even if cells use
648 the same directory names at lower levels in their local AFS
649 filespace. For example, both the ABC Corporation cell and the State
650 University cell can have a home directory for the user <emphasis
651 role="bold">pat</emphasis>, because the pathnames are distinct:
652 <emphasis role="bold">/afs/abc.com/usr/pat</emphasis> and <emphasis
653 role="bold">/afs/stateu.edu/usr/pat</emphasis>.</para>
655 <para>By convention, cell names follow the Domain Name System (DNS)
656 conventions for domain names. If you are already an Internet site,
657 then it is simplest and strongly recommended to choose your Internet
658 domain name as the cell name.</para>
660 <para>If you are not an Internet site, it is best to choose a unique
661 DNS-style name, particularly if you plan to connect to the Internet in
662 the future. There are a few constraints on AFS cell names:
665 <para>It can contain as many as 64 characters, but shorter names
666 are better because the cell name frequently is part of machine
667 and file names. If your cell name is long, you can reduce
668 pathname length either by creating a symbolic link to the
669 complete cell name, at the second level in your file tree or by
670 using the <emphasis role="bold">CellAlias</emphasis>
671 configuration file on a client machine. See <link
672 linkend="HDRWQ42">The Second (Cellname) Level</link>.</para>
676 <para>To guarantee it is suitable for different operating system
677 types, the cell name can contain only lowercase characters,
678 numbers, underscores, dashes, and periods. Do not include
679 command shell metacharacters.</para>
683 <para>It can include any number of fields, which are
684 conventionally separated by periods (see the examples
690 <sect2 id="Header_43">
691 <title>How to Set the Cell Name</title>
694 <primary>setting</primary>
695 <secondary>cell name</secondary>
699 <primary>cell</primary>
700 <secondary>name</secondary>
701 <tertiary>setting</tertiary>
705 <primary>server machine</primary>
706 <secondary>setting home cell</secondary>
710 <primary>client machine</primary>
711 <secondary>setting home cell</secondary>
714 <para>The cell name is recorded in two files on the local disk of
715 each file server and client machine. Among other functions, these
716 files define the machine's cell membership and so affect how
717 programs and processes run on the machine; see <link
718 linkend="HDRWQ35">Why Choosing the Appropriate Cell Name is
719 Important</link>. The procedure for setting the cell name is
720 different for the two types of machines.</para>
722 <para>For file server machines, the two files that record the cell
723 name are the <emphasis role="bold">/usr/afs/etc/ThisCell</emphasis>
724 and <emphasis role="bold">/usr/afs/etc/CellServDB</emphasis>
725 files. As described more explicitly in the <emphasis>OpenAFS Quick
726 Start Guide</emphasis>, you set the cell name in both by issuing the
727 <emphasis role="bold">bos setcellname</emphasis> command on the
728 first file server machine you install in your cell. It is not
729 usually necessary to issue the command again. If you use the Update
730 Server, it distributes its copy of the <emphasis
731 role="bold">ThisCell</emphasis> and <emphasis
732 role="bold">CellServDB</emphasis> files to additional server
733 machines that you install. If you do not use the Update Server, the
734 <emphasis>OpenAFS Quick Start Guide</emphasis> explains how to copy
735 the files manually.</para>
737 <para>For client machines, the two files that record the cell name
738 are the <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and
739 <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> files. You
740 create these files on a per-client basis, either with a text editor
741 or by copying them onto the machine from a central source in AFS.
742 See <link linkend="HDRWQ406">Maintaining Knowledge of Database
743 Server Machines</link> for details.</para>
745 <para>Change the cell name in these files only when you want to
746 transfer the machine to a different cell (client machines can only
747 have one default cell at a time and server machines can only belong
748 to one cell at a time). If the machine is a file server, follow the
749 complete set of instructions in the <emphasis>OpenAFS Quick Start
750 Guide</emphasis> for configuring a new cell. If the machine is a
751 client, all you need to do is change the files appropriately and
752 reboot the machine. The next section explains further the negative
753 consequences of changing the name of an existing cell.</para>
755 <para>To set the default cell name used by most AFS commands without
756 changing the local <emphasis
757 role="bold">/usr/vice/etc/ThisCell</emphasis> file, set the AFSCELL
758 environment variable in the command shell. It is worth setting this
759 variable if you need to complete significant administrative work in
760 a foreign cell.</para>
763 <para>The <emphasis role="bold">fs checkservers</emphasis> and
764 <emphasis role="bold">fs mkmount</emphasis> commands do not use
765 the AFSCELL variable. The <emphasis role="bold">fs
766 checkservers</emphasis> command always defaults to the cell named
767 in the <emphasis role="bold">ThisCell</emphasis> file, unless the
768 <emphasis role="bold">-cell</emphasis> argument is used. The
769 <emphasis role="bold">fs mkmount</emphasis> command defaults to
770 the cell in which the parent directory of the new mount point
776 <title>Why Choosing the Appropriate Cell Name is Important</title>
779 <primary>ThisCell file (client)</primary>
780 <secondary>how used by programs</secondary>
783 <para>Take care to select a cell name that is suitable for long-term
784 use. Changing a cell name later is complicated. An appropriate cell
785 name is important because it is the second element in the pathname
786 of all files in a cell's file tree. Because each cell name is
787 unique, its presence in an AFS pathname makes the pathname unique in
788 the AFS global namespace, even if multiple cells use similar
789 filespace organization at lower levels. For instance, it means that
790 every cell can have a home directory called <emphasis
791 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
792 role="bold">/usr/pat</emphasis> without causing a conflict. The
793 presence of the cell name in pathnames also means that users in
794 every cell use the same pathname to access a file, whether the file
795 resides in their local cell or in a foreign cell.</para>
797 <para>Another reason to choose the correct cell name early in the
798 process of installing your cell is that the cell membership defined
799 in each machine's <emphasis role="bold">ThisCell</emphasis> file
800 affects the performance of many programs and processes running on
801 the machine. For instance, AFS commands (<emphasis
802 role="bold">fs</emphasis>, <emphasis role="bold">pts</emphasis>, and
803 <emphasis role="bold">vos</emphasis> commands, for example) by
804 default execute in the cell of the machine on which they are
805 issued. The command interpreters check the <emphasis
806 role="bold">ThisCell</emphasis> file on the local disk and then
807 contact the database server machines listed in the <emphasis
808 role="bold">CellServDB</emphasis> file or configured in DNS for the
809 indicated cell. (The <emphasis role="bold">bos</emphasis> commands
810 work differently because the issuer always has to name of the
811 machine on which to run the command.)</para>
813 <para>The <emphasis role="bold">ThisCell</emphasis> file also
814 normally determines the cell for which a user receives an AFS token
815 when he or she logs in to a machine.</para>
817 <para>If you change the cell name, you must change the <emphasis
818 role="bold">ThisCell</emphasis> and <emphasis
819 role="bold">CellServDB</emphasis> files on every server and client
820 machine. Failure to change them all will cause many commands from
821 the AFS suites to not work as expected.</para>
826 <title>Participating in the AFS Global Namespace</title>
829 <primary>participation</primary>
830 <secondary>in AFS global namespace</secondary>
834 <primary>AFS</primary>
835 <secondary>global namespace</secondary>
839 <primary>global namespace</primary>
842 <para>Participating in the AFS global namespace makes your cell's
843 local file tree visible to AFS users in foreign cells and makes other
844 cells' file trees visible to your local users. It makes file sharing
845 across cells just as easy as sharing within a cell. This section
846 outlines the procedures necessary for participating in the global
850 <para>Participation in the global namespace is not
851 mandatory. Some cells use AFS primarily to facilitate file
852 sharing within the cell, and are not interested in providing
853 their users with access to foreign cells.</para>
857 <para>Making your file tree visible does not mean making it
858 vulnerable. You control how foreign users access your cell using
859 the same protection mechanisms that control local users'
860 access. See <link linkend="HDRWQ40">Granting and Denying Foreign
861 Users Access to Your Cell</link>.</para>
865 <para>The two aspects of participation are independent. A cell
866 can make its file tree visible without allowing its users to see
867 foreign cells' file trees, or can enable its users to see other
868 file trees without advertising its own.</para>
872 <para>You make your cell visible to others by advertising your
873 database server machines and allowing users at other sites to
874 access your database server and file server machines. See <link
875 linkend="HDRWQ38">Making Your Cell Visible to
876 Others</link>.</para>
880 <para>You control access to foreign cells on a per-client
881 machine basis. In other words, it is possible to make a foreign
882 cell accessible from one client machine in your cell but not
883 another. See <link linkend="HDRWQ39">Making Other Cells Visible
884 in Your Cell</link>.</para>
890 <title>What the Global Namespace Looks Like</title>
893 <primary>conventions</primary>
894 <secondary>AFS pathnames</secondary>
898 <primary>AFS</primary>
899 <secondary>root directory (/afs)</secondary>
900 <tertiary>on client machine</tertiary>
904 <primary>directories</primary>
905 <secondary>/afs</secondary>
909 <primary>directories</primary>
910 <secondary>/afs/<emphasis>cellname</emphasis></secondary>
914 <primary>cell</primary>
915 <secondary>name</secondary>
916 <tertiary>at second level in file tree</tertiary>
919 <para>The AFS global namespace appears the same to all AFS cells
920 that participate in it, because they all agree to follow a small set
921 of conventions in constructing pathnames.</para>
923 <para>The first convention is that all AFS pathnames begin with the
924 string <emphasis role="bold">/afs</emphasis> to indicate that they
925 belong to the AFS global namespace.</para>
927 <para>The second convention is that the cell name is the second
928 element in an AFS pathname; it indicates where the file resides
929 (that is, the cell in which a file server machine houses the
930 file). As noted, the presence of a cell name in pathnames makes the
931 global namespace possible, because it guarantees that all AFS
932 pathnames are unique even if cells use the same directory names at
933 lower levels in their AFS filespace.</para>
935 <para>What appears at the third and lower levels in an AFS pathname
936 depends on how a cell has chosen to arrange its filespace. There
937 are some suggested conventional directories at the third level; see
938 <link linkend="HDRWQ43">The Third Level</link>.</para>
942 <title>Making Your Cell Visible to Others</title>
945 <primary>cell</primary>
946 <secondary>making local visible to foreign</secondary>
950 <primary>local cell</primary>
951 <secondary>making visible to foreign cells</secondary>
955 <primary>foreign cell</primary>
956 <secondary>making local cell visible</secondary>
959 <para>You make your cell visible to others by advertising your cell
960 name and database server machines. Just like client machines in the
961 local cell, the Cache Manager on machines in foreign cells use the
962 information to reach your cell's Volume Location (VL) Servers when
963 they need volume and file location information. For authenticated
964 access, foreign clients must be configured with the necessary
965 Kerberos version 5 domain-to-realm mappings and Key Distribution
966 Center (KDC) location information for both the local and remote
967 Kerberos version 5 realms.</para>
969 <para>There are two places you can make this information available:
972 <primary>files</primary>
974 <secondary>global CellServDB</secondary>
978 <primary>CellServDB file maintained by the AFS
981 <secondary>as global update source</secondary>
985 <para>In the global <emphasis
986 role="bold">CellServDB</emphasis> file maintained by the AFS
987 Registrar. This file lists the name and database server
988 machines of every cell that has agreed to make this
989 information available to other cells. This file is available
991 url="http://grand.central.org/csdb.html">http://grand.central.org/csdb.html</ulink></para>
993 <para>To add or change your cell's listing in this file,
994 follow the instructions at <ulink
995 url="http://grand.central.org/csdb.html">http://grand.central.org/csdb.html</ulink>.
996 It is a good policy to check the file for changes on a
997 regular schedule. An updated copy of this file is included
998 with new releases of OpenAFS.</para>
1001 <primary>files</primary>
1003 <secondary>CellServDB.local</secondary>
1007 <primary>CellServDB.local file</primary>
1012 <para>A file called <emphasis
1013 role="bold">CellServDB.local</emphasis> in the <emphasis
1014 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1015 role="bold">/service/etc</emphasis> directory of your cell's
1016 filespace. List only your cell's database server
1022 <para>Update the files whenever you change the identity of your
1023 cell's database server machines. Also update the copies of the
1024 <emphasis role="bold">CellServDB</emphasis> files on all of your
1025 server machines (in the <emphasis
1026 role="bold">/usr/afs/etc</emphasis> directory) and client machines
1027 (in the <emphasis role="bold">/usr/vice/etc</emphasis>
1028 directory). For instructions, see <link
1029 linkend="HDRWQ118">Maintaining the Server CellServDB File</link> and
1030 <link linkend="HDRWQ406">Maintaining Knowledge of Database Server
1031 Machines</link>.</para>
1033 <para>Once you have advertised your database server machines, it can
1034 be difficult to make your cell invisible again. You can remove the
1035 <emphasis role="bold">CellServDB.local</emphasis> file and ask the
1036 AFS Registrar to remove your entry from the global <emphasis
1037 role="bold">CellServDB</emphasis> file, but other cells probably
1038 have an entry for your cell in their local <emphasis
1039 role="bold">CellServDB</emphasis> files already. To make those
1040 entries invalid, you must change the names or IP addresses of your
1041 database server machines.</para>
1043 <para>Your cell does not have to be invisible to be inaccessible,
1044 however. To make your cell completely inaccessible to foreign users,
1045 remove the <emphasis role="bold">system:anyuser</emphasis> group
1046 from all ACLs at the top three levels of your filespace; see <link
1047 linkend="HDRWQ40">Granting and Denying Foreign Users Access to Your
1051 <primary>cell</primary>
1053 <secondary>making foreign visible to local</secondary>
1057 <primary>local cell</primary>
1059 <secondary>making foreign cells visible in</secondary>
1063 <primary>foreign cell</primary>
1065 <secondary>making visible in local cell</secondary>
1069 <primary>client machine</primary>
1071 <secondary>making foreign cell visible</secondary>
1075 <sect2 id="HDRWQ39">
1076 <title>Making Other Cells Visible in Your Cell</title>
1078 <para>To make a foreign cell's filespace visible on a client machine
1079 in your cell that is not configured for <emphasis
1080 role="bold">Freelance Mode</emphasis> or <emphasis
1081 role="bold">Dynamic Root</emphasis> mode, perform the following
1085 <para>Mount the cell's <emphasis
1086 role="bold">root.cell</emphasis> volume at the second level in
1087 your cell's filespace just below the <emphasis
1088 role="bold">/afs</emphasis> directory. Use the <emphasis
1089 role="bold">fs mkmount</emphasis> command with the <emphasis
1090 role="bold">-cell</emphasis> argument as instructed in <link
1091 linkend="HDRWQ213">To create a cellular mount
1092 point</link>.</para>
1096 <para>Mount AFS at the <emphasis role="bold">/afs</emphasis>
1097 directory on the client machine. The <emphasis
1098 role="bold">afsd</emphasis> program, which initializes the
1099 Cache Manager, performs the mount automatically at the
1100 directory named in the first field of the local <emphasis
1101 role="bold">/usr/vice/etc/cacheinfo</emphasis> file or by the
1102 command's <emphasis role="bold">-mountdir</emphasis>
1103 argument. Mounting AFS at an alternate location makes it
1104 impossible to reach the filespace of any cell that mounts its
1105 <emphasis role="bold">root.afs</emphasis> and <emphasis
1106 role="bold">root.cell</emphasis> volumes at the conventional
1107 locations. See <link linkend="HDRWQ395">Displaying and Setting
1108 the Cache Size and Location</link>.</para>
1112 <para>Create an entry for the cell in the list of database
1113 server machines which the Cache Manager maintains in kernel
1117 role="bold">/usr/vice/etc/CellServDB</emphasis> file on every
1118 client machine's local disk lists the database server machines
1119 for the local and foreign cells. The <emphasis
1120 role="bold">afsd</emphasis> program reads the contents of the
1121 <emphasis role="bold">CellServDB</emphasis> file into kernel
1122 memory as it initializes the Cache Manager. You can also use
1123 the <emphasis role="bold">fs newcell</emphasis> command to add
1124 or alter entries in kernel memory directly between reboots of
1125 the machine. See <link linkend="HDRWQ406">Maintaining
1126 Knowledge of Database Server Machines</link>.</para>
1131 <para>Non-windows client machines may enable <emphasis
1132 role="bold">Dynamic Root Mode</emphasis> by using the <emphasis
1133 role="bold">-dynroot</emphasis> option to <emphasis
1134 role="bold">afsd</emphasis>. When this option is enabled, all cells
1135 listed in the <emphasis role="bold">CellServDB</emphasis> file will
1136 appear in the <emphasis role="bold">/afs</emphasis> directory. The
1137 contents of the <emphasis role="bold">root.afs</emphasis> volume
1138 will be ignored. </para>
1140 <para>Windows client machines may enable <emphasis
1141 role="bold">Freelance Mode</emphasis> during client installation or
1142 by setting the <emphasis role="bold">FreelanceClient</emphasis>
1143 setting under <emphasis role="bold">Service Parameters</emphasis> in
1144 the Windows Registry as mentioned in the <ulink
1145 url="http://docs.openafs.org/ReleaseNotesWindows/">Release
1146 Notes</ulink>. When this option is enabled, the <emphasis
1147 role="bold">root.afs</emphasis> volume is ignored and a mounpoint
1148 for each cell is automatically created in the the <emphasis
1149 role="bold">\\AFS</emphasis> directory when the folder <emphasis
1150 role="bold">\\AFS\<replaceable>cellname</replaceable></emphasis> is
1151 accessed and the foreign Volume Location servers can be reached.
1152 </para> <para>Note that making a foreign cell visible to client
1153 machines does not guarantee that your users can access its
1154 filespace. The ACLs in the foreign cell must also grant them the
1155 necessary permissions.</para>
1158 <primary>cell</primary>
1160 <secondary>granting local access to foreign users</secondary>
1164 <primary>local cell</primary>
1166 <secondary>granting foreign users access to</secondary>
1170 <sect2 id="HDRWQ40">
1171 <title>Granting and Denying Foreign Users Access to Your
1174 <para>Making your cell visible in the AFS global namespace does not
1175 take away your control over the way in which users from foreign
1176 cells access your file tree.</para>
1178 <para>By default, foreign users access your cell as the user
1179 <emphasis role="bold">anonymous</emphasis>, which means they have
1180 only the permissions granted to the <emphasis
1181 role="bold">system:anyuser</emphasis> group on each directory's
1182 ACL. Normally these permissions are limited to the <emphasis
1183 role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>)
1184 and <emphasis role="bold">r</emphasis> (<emphasis
1185 role="bold">read</emphasis>) permissions.</para>
1187 <para>There are three ways to grant wider access to foreign users:
1190 <para>Grant additional permissions to the <emphasis
1191 role="bold">system:anyuser</emphasis> group on certain
1192 ACLs. Keep in mind, however, that all users can then access
1193 that directory in the indicated way (not just specific foreign
1194 users you have in mind).</para>
1198 <para>Enable automatic registration for users in the foreign
1199 cell. This may be done by creating a cross-realm trust in the
1200 <emphasis role="bold">Kerberos Database</emphasis>. Then add a
1201 PTS group named <emphasis
1202 role="bold">system:authuser<replaceable>@FOREIGN.REALM</replaceable></emphasis>
1203 and give it a group quota greater than the number of foreign
1204 users expected to be registered. After the cross-realm trust
1205 and the PTS group are created, the <ulink
1206 url="http://docs.openafs.org/Reference/1/aklog.html">aklog</ulink>
1207 command will automatically register foreign users as
1208 needed. Consult the documentation for your <emphasis
1209 role="bold">Kerberos Server</emphasis> for instructions on how
1210 to establish a cross-realm trust. </para>
1214 <para>Create a local authentication account for specific
1215 foreign users, by creating entries in the Protection Database,
1216 the Kerberos Database, and the local password file.</para>
1222 <primary>cell</primary>
1224 <secondary>filespace configuration issues</secondary>
1228 <primary>configuring</primary>
1230 <secondary>filespace, issues</secondary>
1234 <primary>file tree</primary>
1236 <secondary>conventions</secondary>
1238 <tertiary>for configuring</tertiary>
1243 <sect1 id="HDRWQ41">
1244 <title>Configuring Your AFS Filespace</title>
1246 <para>This section summarizes the issues to consider when configuring
1247 your AFS filespace. For a discussion of creating volumes that
1248 correspond most efficiently to the filespace's directory structure,
1249 see <link linkend="HDRWQ44">Creating Volumes to Simplify
1250 Administration</link>.</para>
1253 <para><emphasis role="bold">For Windows users:</emphasis> Windows
1254 uses a backslash (<emphasis role="bold">\</emphasis>) rather than a
1255 forward slash (<emphasis role="bold">/</emphasis>) to separate the
1256 elements in a pathname. The hierarchical organization of the
1257 filespace is however the same as on a UNIX machine.</para>
1260 <para>AFS pathnames must follow a few conventions so the AFS global
1261 namespace looks the same from any AFS client machine. There are
1262 corresponding conventions to follow in building your file tree, not
1263 just because pathnames reflect the structure of a file tree, but also
1264 because the AFS Cache Manager expects a certain configuration.</para>
1267 <primary>AFS</primary>
1269 <secondary>root directory (/afs)</secondary>
1271 <tertiary>in cell filespace</tertiary>
1275 <primary>directories</primary>
1277 <secondary>/afs</secondary>
1280 <sect2 id="Header_51">
1281 <title>The Top /afs Level</title>
1283 <para>The first convention is that the top level in your file tree
1284 be called the <emphasis role="bold">/afs</emphasis> directory. If
1285 you name it something else, then you must use the <emphasis
1286 role="bold">-mountdir</emphasis> argument with the <emphasis
1287 role="bold">afsd</emphasis> program to get Cache Managers to mount
1288 AFS properly. You cannot participate in the AFS global namespace in
1292 <primary>cell</primary>
1294 <secondary>name</secondary>
1296 <tertiary>at second level in file tree</tertiary>
1300 <primary>directories</primary>
1302 <secondary>/afs/<emphasis>cellname</emphasis></secondary>
1306 <primary>symbolic link</primary>
1308 <secondary>at second level of AFS pathname</secondary>
1312 <sect2 id="HDRWQ42">
1313 <title>The Second (Cellname) Level</title>
1315 <para>The second convention is that just below the <emphasis
1316 role="bold">/afs</emphasis> directory you place directories
1317 corresponding to each cell whose file tree is visible and accessible
1318 from the local cell. Minimally, there must be a directory for the
1319 local cell. Each such directory is a mount point to the indicated
1320 cell's <emphasis role="bold">root.cell</emphasis> volume. For
1321 example, in the ABC Corporation cell, <emphasis
1322 role="bold">/afs/abc.com</emphasis> is a mount point for the cell's
1323 own <emphasis role="bold">root.cell</emphasis> volume and <emphasis
1324 role="bold">stateu.edu</emphasis> is a mount point for the State
1325 University cell's <emphasis role="bold">root.cell</emphasis>
1326 volume. The <emphasis role="bold">fs lsmount</emphasis> command
1327 displays the mount points.</para>
1330 % <emphasis role="bold">fs lsmount /afs/abc.com</emphasis>
1331 '/afs/abc.com' is a mount point for volume '#root.cell'
1332 % <emphasis role="bold">fs lsmount /afs/stateu.edu</emphasis>
1333 '/afs/stateu.edu' is a mount point for volume '#stateu.edu:root.cell'
1336 <para>To reduce the amount of typing necessary in pathnames, you can
1337 create a symbolic link with an abbreviated name to the mount point
1338 of each cell your users frequently access (particularly the home
1339 cell). In the ABC Corporation cell, for instance, <emphasis
1340 role="bold">/afs/abc</emphasis> is a symbolic link to the <emphasis
1341 role="bold">/afs/abc.com</emphasis> mount point, as the <emphasis
1342 role="bold">fs lsmount</emphasis> command reveals.</para>
1345 % <emphasis role="bold">fs lsmount /afs/abc</emphasis>
1346 '/afs/abc' is a symbolic link, leading to a mount point for volume
1347 '#root.cell' </programlisting>
1350 <primary>file tree</primary>
1352 <secondary>conventions</secondary>
1354 <tertiary>third level</tertiary>
1358 <primary>directories</primary>
1360 <secondary>conventional under /afs/cellname</secondary>
1364 <sect2 id="HDRWQ43">
1365 <title>The Third Level</title>
1367 <para>You can organize the third level of your cell's file tree any
1368 way you wish. The following list describes directories that appear
1369 at this level in the conventional configuration:
1372 <term><emphasis role="bold">common</emphasis></term>
1375 <para>This directory contains programs and files needed by
1376 users working on machines of all system types, such as text
1377 editors, online documentation files, and so on. Its
1378 <emphasis role="bold">/etc</emphasis> subdirectory is a
1379 logical place to keep the central update sources for files
1380 used on all of your cell's client machines, such as the
1381 <emphasis role="bold">ThisCell</emphasis> and <emphasis
1382 role="bold">CellServDB</emphasis> files.</para>
1387 <term><emphasis role="bold">public</emphasis></term>
1390 <para>A directory accessible to anyone who can access your
1391 filespace, because its ACL grants the <emphasis
1392 role="bold">l</emphasis> (<emphasis
1393 role="bold">lookup</emphasis>) and <emphasis
1394 role="bold">r</emphasis> (<emphasis
1395 role="bold">read</emphasis>) permissions to the <emphasis
1396 role="bold">system:anyuser</emphasis> group. It is useful if
1397 you want to enable your users to make selected information
1398 available to everyone, but do not want to grant foreign
1399 users access to the contents of the <emphasis
1400 role="bold">usr</emphasis> directory which houses user home
1401 directories (and is also at this level). It is conventional
1402 to create a subdirectory for each of your cell's
1408 <term><emphasis role="bold">service</emphasis></term>
1411 <para>This directory contains files and subdirectories that
1412 help cells coordinate resource sharing. For a list of the
1413 proposed standard files and subdirectories to create, call
1414 or write to AFS Product Support.</para>
1416 <para>As an example, files that other cells expect to find
1417 in this directory's <emphasis role="bold">etc</emphasis>
1418 subdirectory can include the following: <itemizedlist>
1421 role="bold">CellServDB.export</emphasis>, a list of
1422 database server machines for many cells</para>
1427 role="bold">CellServDB.local</emphasis>, a list of the
1428 cell's own database server machines</para>
1432 <para><emphasis role="bold">passwd</emphasis>, a copy
1433 of the local password file (<emphasis
1434 role="bold">/etc/passwd</emphasis> or equivalent) kept
1435 on the local disk of the cell's client machines</para>
1439 <para><emphasis role="bold">group</emphasis>, a copy
1440 of the local groups file (<emphasis
1441 role="bold">/etc/group</emphasis> or equivalent) kept
1442 on the local disk of the cell's client machines</para>
1450 <term><emphasis>sys_type</emphasis></term>
1453 <para>A separate directory for storing the server and client
1454 binaries for each system type you use in the cell.
1455 Configuration is simplest if you use the system type names
1456 assigned in the AFS distribution, particularly if you wish
1457 to use the <emphasis role="bold">@sys</emphasis> variable in
1458 pathnames (see <link linkend="HDRWQ56">Using the @sys
1459 Variable in Pathnames</link>). The <emphasis>OpenAFS Release
1460 Notes</emphasis> lists the conventional name for each
1461 supported system type.</para>
1463 <para>Within each such directory, create directories named
1464 <emphasis role="bold">bin</emphasis>, <emphasis
1465 role="bold">etc</emphasis>, <emphasis
1466 role="bold">usr</emphasis>, and so on, to store the programs
1467 normally kept in the <emphasis role="bold">/bin</emphasis>,
1468 <emphasis role="bold">/etc</emphasis> and <emphasis
1469 role="bold">/usr</emphasis> directories on a local
1470 disk. Then create symbolic links from the local directories
1471 on client machines into AFS; see <link
1472 linkend="HDRWQ55">Configuring the Local Disk</link>. Even if
1473 you do not choose to use symbolic links in this way, it can
1474 be convenient to have central copies of system binaries in
1475 AFS. If binaries are accidentally removed from a machine,
1476 you can recopy them onto the local disk from AFS rather than
1477 having to recover them from tape</para>
1482 <term><emphasis role="bold">usr</emphasis></term>
1485 <para>This directory contains home directories for your
1486 local users. As discussed in the previous entry for the
1487 <emphasis role="bold">public</emphasis> directory, it is
1488 often practical to protect this directory so that only
1489 locally authenticated users can access it. This keeps the
1490 contents of your user's home directories as secure as
1493 <para>If your cell is quite large, directory lookup can be
1494 slowed if you put all home directories in a single <emphasis
1495 role="bold">usr</emphasis> directory. For suggestions on
1496 distributing user home directories among multiple grouping
1497 directories, see <link linkend="HDRWQ59">Grouping Home
1498 Directories</link>.</para>
1499 </listitem> </varlistentry>
1502 <term><emphasis role="bold">wsadmin</emphasis></term>
1505 <para>This directory contains prototype, configuration and
1506 library files for use with the <emphasis
1507 role="bold">package</emphasis> program. See <link
1508 linkend="HDRWQ419">Configuring Client Machines with the
1509 package Program</link>.</para>
1516 <primary>volume name</primary>
1518 <secondary>conventions for</secondary>
1522 <primary>conventions</primary>
1524 <secondary>volume names</secondary>
1528 <primary>volume</primary>
1530 <secondary>separate for each top level directory</secondary>
1534 <primary>file tree</primary>
1536 <secondary>creating volumes to match top level
1537 directories</secondary>
1542 <sect1 id="HDRWQ44">
1543 <title>Creating Volumes to Simplify Administration</title>
1545 <para>This section discusses how to create volumes in ways that make
1546 administering your system easier.</para>
1548 <para>At the top levels of your file tree (at least through the third
1549 level), each directory generally corresponds to a separate
1550 volume. Some cells also configure the subdirectories of some third
1551 level directories as separate volumes. Common examples are the
1553 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1554 role="bold">/common</emphasis> and <emphasis
1555 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1556 role="bold">/usr</emphasis> directories.</para>
1558 <para>You do not have to create a separate volume for every directory
1559 level in a tree, but the advantage is that each volume tends to be
1560 smaller and easier to move for load balancing. The overhead for a
1561 mount point is no greater than for a standard directory, nor does the
1562 volume structure itself require much disk space. Most cells find that
1563 below the fourth level in the tree, using a separate volume for each
1564 directory is no longer efficient. For instance, while each user's home
1565 directory (at the fourth level in the tree) corresponds to a separate
1566 volume, all of the subdirectories in the home directory normally
1567 reside in the same volume.</para>
1569 <para>Keep in mind that only one volume can be mounted at a given
1570 directory location in the tree. In contrast, a volume can be mounted
1571 at several locations, though this is not recommended because it
1572 distorts the hierarchical nature of the file tree, potentially causing
1576 <primary>volume name</primary>
1578 <secondary>restrictions</secondary>
1582 <primary>restrictions</primary>
1584 <secondary>on volume names</secondary>
1588 <primary>volume name</primary>
1590 <secondary>two required</secondary>
1594 <primary>volume</primary>
1596 <secondary>root (root.afs and root.cell)</secondary>
1600 <primary>root volumes (root.afs and root.cell)</primary>
1603 <sect2 id="Header_55">
1604 <title>Assigning Volume Names</title>
1606 <para>You can name your volumes anything you choose, subject to a
1610 <para>Read/write volume names can be up to 22 characters in
1611 length. The maximum length for volume names is 31 characters,
1612 and there must be room to add the <emphasis
1613 role="bold">.readonly</emphasis> extension on read-only
1618 <para>Do not add the <emphasis
1619 role="bold">.readonly</emphasis> and <emphasis
1620 role="bold">.backup</emphasis> extensions to volume names
1621 yourself, even if they are appropriate. The Volume Server adds
1622 them automatically as it creates a read-only or backup version
1627 <para>There must be volumes named <emphasis
1628 role="bold">root.afs</emphasis> and <emphasis
1629 role="bold">root.cell</emphasis>, mounted respectively at the
1630 top (<emphasis role="bold">/afs</emphasis>) level in the
1631 filespace and just below that level, at the cell's name (for
1632 example, at <emphasis role="bold">/afs/abc.com</emphasis> in
1633 the ABC Corporation cell).</para>
1635 <para>Deviating from these names only creates confusion and
1636 extra work. Changing the name of the <emphasis
1637 role="bold">root.afs</emphasis> volume, for instance, means
1638 that you must use the <emphasis
1639 role="bold">-rootvol</emphasis> argument to the <emphasis
1640 role="bold">afsd</emphasis> program on every client machine,
1641 to name the alternate volume.</para>
1643 <para>Similarly, changing the <emphasis
1644 role="bold">root.cell</emphasis> volume name prevents users in
1645 foreign cells from accessing your filespace, if the mount
1646 point for your cell in their filespace refers to the
1647 conventional <emphasis role="bold">root.cell</emphasis>
1648 name. Of course, this is one way to make your cell invisible
1649 to other cells.</para>
1654 <para>It is best to assign volume names that indicate the type of
1655 data they contain, and to use similar names for volumes with similar
1656 contents. It is also helpful if the volume name is similar to (or at
1657 least has elements in common with) the name of the directory at
1658 which it is mounted. Understanding the pattern then enables you
1659 accurately to guess what a volume contains and where it is
1662 <para>Many cells find that the most effective volume naming scheme
1663 puts a common prefix on the names of all related volumes. <link
1664 linkend="TBLVOL-PREFIX">Table 1</link> describes the recommended
1665 prefixing scheme.</para>
1667 <table id="TBLVOL-PREFIX" label="1">
1668 <title>Suggested volume prefixes</title>
1671 <colspec colwidth="14*" />
1673 <colspec colwidth="28*" />
1675 <colspec colwidth="22*" />
1677 <colspec colwidth="36*" />
1681 <entry><emphasis role="bold">Prefix</emphasis></entry>
1683 <entry><emphasis role="bold">Contents</emphasis></entry>
1685 <entry><emphasis role="bold">Example Name</emphasis></entry>
1687 <entry><emphasis role="bold">Example Mount
1688 Point</emphasis></entry>
1694 <entry><emphasis role="bold">common.</emphasis></entry>
1696 <entry>popular programs and files</entry>
1698 <entry><emphasis role="bold">common.etc</emphasis></entry>
1701 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1702 role="bold">/common/etc</emphasis></entry>
1706 <entry><emphasis role="bold">src.</emphasis></entry>
1708 <entry>source code</entry>
1710 <entry><emphasis role="bold">src.afs</emphasis></entry>
1713 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1714 role="bold">/src/afs</emphasis></entry>
1718 <entry><emphasis role="bold">proj.</emphasis></entry>
1720 <entry>project data</entry>
1722 <entry><emphasis role="bold">proj.portafs</emphasis></entry>
1725 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1726 role="bold">/proj/portafs</emphasis></entry>
1730 <entry><emphasis role="bold">test.</emphasis></entry>
1732 <entry>testing or other temporary data</entry>
1734 <entry><emphasis role="bold">test.smith</emphasis></entry>
1737 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1738 role="bold">/usr/smith/test</emphasis></entry>
1742 <entry><emphasis role="bold">user.</emphasis></entry>
1744 <entry>user home directory data</entry>
1746 <entry><emphasis role="bold">user.terry</emphasis></entry>
1749 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1750 role="bold">/usr/terry</emphasis></entry>
1754 <entry>sys_type<emphasis role="bold">.</emphasis></entry>
1756 <entry>programs compiled for an operating system
1759 <entry><emphasis role="bold">rs_aix42.bin</emphasis></entry>
1762 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1763 role="bold">/rs_aix42/bin</emphasis></entry>
1769 <para><link linkend="TBLPREFIX-EXAMPLE">Table 2</link> is a more
1770 specific example for a cell's <emphasis
1771 role="bold">rs_aix42</emphasis> system volumes and
1774 <table id="TBLPREFIX-EXAMPLE" label="2">
1775 <title>Example volume-prefixing scheme</title>
1778 <colspec colwidth="14*" />
1780 <colspec colwidth="28*" />
1782 <colspec colwidth="22*" />
1784 <colspec colwidth="36*" />
1788 <entry><emphasis role="bold">Example Name</emphasis></entry>
1790 <entry><emphasis role="bold">Example Mount
1791 Point</emphasis></entry>
1797 <entry><emphasis role="bold">rs_aix42.bin</emphasis></entry>
1800 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1801 role="bold">/rs_aix42/bin</emphasis>, <emphasis
1802 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1803 role="bold">/rs_aix42/bin</emphasis></entry>
1807 <entry><emphasis role="bold">rs_aix42.etc</emphasis></entry>
1810 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1811 role="bold">/rs_aix42/etc</emphasis></entry>
1815 <entry><emphasis role="bold">rs_aix42.usr</emphasis></entry>
1818 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1819 role="bold">/rs_aix42/usr</emphasis></entry>
1824 role="bold">rs_aix42.usr.afsws</emphasis></entry>
1827 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1828 role="bold">/rs_aix42/usr/afsws</emphasis></entry>
1833 role="bold">rs_aix42.usr.lib</emphasis></entry>
1836 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1837 role="bold">/rs_aix42/usr/lib</emphasis></entry>
1842 role="bold">rs_aix42.usr.bin</emphasis></entry>
1845 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1846 role="bold">/rs_aix42/usr/bin</emphasis></entry>
1851 role="bold">rs_aix42.usr.etc</emphasis></entry>
1854 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1855 role="bold">/rs_aix42/usr/etc</emphasis></entry>
1860 role="bold">rs_aix42.usr.inc</emphasis></entry>
1863 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1864 role="bold">/rs_aix42/usr/inc</emphasis></entry>
1869 role="bold">rs_aix42.usr.man</emphasis></entry>
1872 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1873 role="bold">/rs_aix42/usr/man</emphasis></entry>
1878 role="bold">rs_aix42.usr.sys</emphasis></entry>
1881 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1882 role="bold">/rs_aix42/usr/sys</emphasis></entry>
1887 role="bold">rs_aix42.usr.local</emphasis></entry>
1890 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
1891 role="bold">/rs_aix42/usr/local</emphasis></entry>
1897 <para>There are several advantages to this scheme:
1900 <para>The volume name is similar to the mount point name in
1901 the filespace. In all of the entries in <link
1902 linkend="TBLPREFIX-EXAMPLE">Table 2</link>, for example, the
1903 only difference between the volume and mount point name is
1904 that the former uses periods as separators and the latter uses
1905 slashes. Another advantage is that the volume name indicates
1906 the contents, or at least suggests the directory on which to
1907 issue the <emphasis role="bold">ls</emphasis> command to learn
1908 the contents.</para>
1912 <para>It makes it easy to manipulate groups of related volumes
1913 at one time. In particular, the <emphasis role="bold">vos
1914 backupsys</emphasis> command's <emphasis
1915 role="bold">-prefix</emphasis> argument enables you to create
1916 a backup version of every volume whose name starts with the
1917 same string of characters. Making a backup version of each
1918 volume is one of the first steps in backing up a volume with
1919 the AFS Backup System, and doing it for many volumes with one
1920 command saves you a good deal of typing. For instructions for
1921 creating backup volumes, see <link linkend="HDRWQ201">Creating
1922 Backup Volumes</link>, For information on the AFS Backup
1923 System, see <link linkend="HDRWQ248">Configuring the AFS
1924 Backup System</link> and <link linkend="HDRWQ283">Backing Up
1925 and Restoring AFS Data</link>.</para>
1929 <para>It makes it easy to group related volumes together on a
1930 partition. Grouping related volumes together has several
1931 advantages of its own, discussed in <link
1932 linkend="HDRWQ49">Grouping Related Volumes on a
1933 Partition</link>.</para>
1939 <primary>volume</primary>
1941 <secondary>grouping related on same partition</secondary>
1945 <primary>disk partition</primary>
1947 <secondary>grouping related volumes on</secondary>
1951 <sect2 id="HDRWQ49">
1952 <title>Grouping Related Volumes on a Partition</title>
1954 <para>If your cell is large enough to make it practical, consider
1955 grouping related volumes together on a partition. In general, you
1956 need at least three file server machines for volume grouping to be
1957 effective. Grouping has several advantages, which are most obvious
1958 when the file server machine becomes inaccessible:
1961 <para>If you keep a hardcopy record of the volumes on a
1962 partition, you know which volumes are unavailable. You can
1963 keep such a record without grouping related volumes, but a
1964 list composed of unrelated volumes is much harder to maintain.
1965 Note that the record must be on paper, because the outage can
1966 prevent you from accessing an online copy or from issuing the
1967 <emphasis role="bold">vos listvol</emphasis> command, which
1968 gives you the same information.</para>
1972 <para>The effect of an outage is more localized. For example,
1973 if all of the binaries for a given system type are on one
1974 partition, then only users of that system type are
1975 affected. If a partition houses binary volumes from several
1976 system types, then an outage can affect more people,
1977 particularly if the binaries that remain available are
1978 interdependent with those that are not available.</para>
1983 <para>The advantages of grouping related volumes on a partition do
1984 not necessarily extend to the grouping of all related volumes on one
1985 file server machine. For instance, it is probably unwise in a cell
1986 with two file server machines to put all system volumes on one
1987 machine and all user volumes on the other. An outage of either
1988 machine probably affects everyone.</para>
1990 <para>Admittedly, the need to move volumes for load balancing
1991 purposes can limit the practicality of grouping related volumes.
1992 You need to weigh the complementary advantages case by case.</para>
1995 <primary>replication</primary>
1997 <secondary>appropriate volumes</secondary>
2001 <primary>volume</primary>
2003 <secondary>type to replicate</secondary>
2007 <primary>volume</primary>
2009 <secondary>where to place replicated</secondary>
2013 <primary>read-only volume</primary>
2015 <secondary>selecting site</secondary>
2019 <sect2 id="HDRWQ50">
2020 <title>When to Replicate Volumes</title>
2022 <para>As discussed in <link linkend="HDRWQ15">Replication</link>,
2023 replication refers to making a copy, or clone, of a read/write
2024 source volume and then placing the copy on one or more additional
2025 file server machines. Replicating a volume can increase the
2026 availability of the contents. If one file server machine housing the
2027 volume becomes inaccessible, users can still access the copy of the
2028 volume stored on a different machine. No one machine is likely to
2029 become overburdened with requests for a popular file, either,
2030 because the file is available from several machines.</para>
2032 <para>However, replication is not appropriate for all cells. If a
2033 cell does not have much disk space, replication can be unduly
2034 expensive, because each clone not on the same partition as the
2035 read/write source takes up as much disk space as its source volume
2036 did at the time the clone was made. Also, if you have only one file
2037 server machine, replication uses up disk space without increasing
2038 availability.</para>
2040 <para>Replication is also not appropriate for volumes that change
2041 frequently. You must issue the <emphasis role="bold">vos
2042 release</emphasis> command every time you need to update a read-only
2043 volume to reflect changes in its read/write source.</para>
2045 <para>For both of these reasons, replication is appropriate only for
2046 popular volumes whose contents do not change very often, such as
2047 system binaries and other volumes mounted at the upper levels of
2048 your filespace. User volumes usually exist only in a read/write
2049 version since they change so often.</para>
2051 <para>If you are replicating any volumes, you must replicate the
2052 <emphasis role="bold">root.afs</emphasis> and <emphasis
2053 role="bold">root.cell</emphasis> volumes, preferably at two or three
2054 sites each (even if your cell only has two or three file server
2055 machines). The Cache Manager needs to pass through the directories
2056 corresponding to the <emphasis role="bold">root.afs</emphasis> and
2057 <emphasis role="bold">root.cell</emphasis> volumes as it interprets
2058 any pathname. The unavailability of these volumes makes all other
2059 volumes unavailable too, even if the file server machines storing
2060 the other volumes are still functioning.</para>
2062 <para>Another reason to replicate the <emphasis
2063 role="bold">root.afs</emphasis> volume is that it can lessen the
2064 load on the File Server machine. The Cache Manager has a bias to
2065 access a read-only version of the <emphasis
2066 role="bold">root.afs</emphasis> volume if it is replicate, which
2067 puts the Cache Manager onto the <emphasis>read-only path</emphasis>
2068 through the AFS filespace. While on the read-only path, the Cache
2069 Manager attempts to access a read-only copy of replicated
2070 volumes. The File Server needs to track only one callback per Cache
2071 Manager for all of the data in a read-only volume, rather than the
2072 one callback per file it must track for read/write volumes. Fewer
2073 callbacks translate into a smaller load on the File Server.</para>
2075 <para>If the <emphasis role="bold">root.afs</emphasis> volume is not
2076 replicated, the Cache Manager follows a read/write path through the
2077 filespace, accessing the read/write version of each volume. The File
2078 Server distributes and tracks a separate callback for each file in a
2079 read/write volume, imposing a greater load on it.</para>
2081 <para>For more on read/write and read-only paths, see <link
2082 linkend="HDRWQ209">The Rules of Mount Point Traversal</link>.</para>
2084 <para>It also makes sense to replicate system binary volumes in many
2085 cases, as well as the volume corresponding to the <emphasis
2086 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
2087 role="bold">/usr</emphasis> directory and the volumes corresponding
2089 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
2090 role="bold">/common</emphasis> directory and its
2091 subdirectories.</para>
2093 <para>It is a good idea to place a replica on the same partition as
2094 the read/write source. In this case, the read-only volume is a clone
2095 (like a backup volume): it is a copy of the source volume's vnode
2096 index, rather than a full copy of the volume contents. Only if the
2097 read/write volume moves to another partition or changes
2098 substantially does the read-only volume consume significant disk
2099 space. Read-only volumes kept on other partitions always consume the
2100 full amount of disk space that the read/write source consumed when
2101 the read-only volume was created.</para>
2104 <sect2 id="Header_58">
2105 <title>The Default Quota and ACL on a New Volume</title>
2107 <para>Every AFS volume has associated with it a quota that limits
2108 the amount of disk space the volume is allowed to use. To set and
2109 change quota, use the commands described in <link
2110 linkend="HDRWQ234">Setting and Displaying Volume Quota and Current
2113 <para>By default, every new volume is assigned a space quota of 5000
2114 KB blocks unless you include the <emphasis
2115 role="bold">-maxquota</emphasis> argument to the <emphasis
2116 role="bold">vos create</emphasis> command. Also by default, the ACL
2117 on the root directory of every new volume grants all permissions to
2118 the members of the <emphasis
2119 role="bold">system:administrators</emphasis> group. To learn how to
2120 change these values when creating an account with individual
2121 commands, see <link linkend="HDRWQ503">To create one user account
2122 with individual commands</link>. When using <emphasis
2123 role="bold">uss</emphasis> commands to create accounts, you can
2124 specify alternate ACL and quota values in the template file's
2125 <emphasis role="bold">V</emphasis> instruction; see <link
2126 linkend="HDRWQ473">Creating a Volume with the V
2127 Instruction</link>.</para>
2130 <primary>server machine</primary>
2132 <secondary>configuration issues</secondary>
2136 <primary>configuring</primary>
2138 <secondary>file server machine, issues</secondary>
2142 <primary>roles for server machine</primary>
2144 <secondary>summary</secondary>
2148 <primary>server machine</primary>
2150 <secondary>roles for</secondary>
2152 <tertiary>summary</tertiary>
2156 <primary>server machine</primary>
2158 <secondary>first installed</secondary>
2163 <sect1 id="HDRWQ51">
2164 <title>Configuring Server Machines</title>
2166 <para>This section discusses some issues to consider when configuring
2167 server machines, which store AFS data, transfer it to client machines
2168 on request, and house the AFS administrative databases. To learn about
2169 client machines, see <link linkend="HDRWQ54">Configuring Client
2170 Machines</link>.</para>
2172 <para>If your cell has more than one AFS server machine, you can
2173 configure them to perform specialized functions. A machine can assume
2174 one or more of the roles described in the following list. For more
2175 details, see <link linkend="HDRWQ90">The Four Roles for File Server
2179 <para>A <emphasis>simple file server</emphasis> machine runs
2180 only the processes that store and deliver AFS files to client
2181 machines. You can run as many simple file server machines as you
2182 need to satisfy your cell's performance and disk space
2183 requirements.</para>
2187 <para>A <emphasis>database server machine</emphasis> runs the
2188 four database server processes that maintain AFS's replicated
2189 administrative databases: the Authentication, Backup,
2190 Protection, and Volume Location (VL) Server processes.</para>
2194 <para>A <emphasis>binary distribution machine</emphasis>
2195 distributes the AFS server binaries for its system type to all
2196 other server machines of that system type.</para>
2200 <para>The single <emphasis>system control machine</emphasis>
2201 distributes common server configuration files to all other
2202 server machines in the cell, in a cell that runs the United
2203 States edition of AFS (cells that use the international edition
2204 of AFS must not use the system control machine for this
2205 purpose). The machine conventionally also serves as the time
2206 synchronization source for the cell, adjusting its clock
2207 according to a time source outside the cell.</para>
2212 <para>The <emphasis>OpenAFS Quick Beginnings</emphasis> explains how
2213 to configure your cell's first file server machine to assume all four
2214 roles. The <emphasis>OpenAFS Quick Beginnings</emphasis> chapter on
2215 installing additional server machines also explains how to configure
2216 them to perform one or more roles.</para>
2219 <primary>database server machine</primary>
2221 <secondary>reason to run three</secondary>
2225 <primary>distribution</primary>
2227 <secondary>of databases</secondary>
2231 <primary>databases, distributed</primary>
2235 <primary>distributed databases</primary>
2238 <sect2 id="HDRWQ52">
2239 <title>Replicating the OpenAFS Administrative Databases</title>
2241 <para>The AFS administrative databases are housed on database server
2242 machines and store information that is crucial for correct cell
2243 functioning. Both server processes and Cache Managers access the
2244 information frequently:
2247 <para>Every time a Cache Manager fetches a file from a
2248 directory that it has not previously accessed, it must look up
2249 the file's location in the Volume Location Database
2254 <para>Every time a user obtains an AFS token from the
2255 Authentication Server, the server looks up the user's password
2256 in the Authentication Database.</para>
2260 <para>The first time that a user accesses a volume housed on a
2261 specific file server machine, the File Server contacts the
2262 Protection Server for a list of the user's group memberships
2263 as recorded in the Protection Database.</para>
2267 <para>Every time you back up a volume using the AFS Backup
2268 System, the Backup Server creates records for it in the Backup
2274 <para>Maintaining your cell is simplest if the first machine has the
2275 lowest IP address of any machine you plan to use as a database
2276 server machine. If you later decide to use a machine with a lower IP
2277 address as a database server machine, you must update the <emphasis
2278 role="bold">CellServDB</emphasis> file on all clients before
2279 introducing the new machine.</para>
2281 <para>If your cell has more than one server machine, it is best to
2282 run more than one as a database server machine (but more than three
2283 are rarely necessary). Replicating the administrative databases in
2284 this way yields the same benefits as replicating volumes: increased
2285 availability and reliability. If one database server machine or
2286 process stops functioning, the information in the database is still
2287 available from others. The load of requests for database information
2288 is spread across multiple machines, preventing any one from becoming
2291 <para>Unlike replicated volumes, however, replicated databases do
2292 change frequently. Consistent system performance demands that all
2293 copies of the database always be identical, so it is not acceptable
2294 to record changes in only some of them. To synchronize the copies of
2295 a database, the database server processes use AFS's distributed
2296 database technology, Ubik. See <link linkend="HDRWQ102">Replicating
2297 the OpenAFS Administrative Databases</link>.</para>
2299 <para>If your cell has only one file server machine, it must also
2300 serve as a database server machine. If you cell has two file server
2301 machines, it is not always advantageous to run both as database
2302 server machines. If a server, process, or network failure interrupts
2303 communications between the database server processes on the two
2304 machines, it can become impossible to update the information in the
2305 database because neither of them can alone elect itself as the
2306 synchronization site.</para>
2309 <primary>server machine</primary>
2311 <secondary>protecting directories on local disk</secondary>
2315 <primary>local disk</primary>
2317 <secondary>protecting on file server machine</secondary>
2321 <sect2 id="HDRWQ53">
2322 <title>AFS Files on the Local Disk</title>
2324 <para>It is generally simplest to store the binaries for all AFS
2325 server processes in the <emphasis
2326 role="bold">/usr/afs/bin</emphasis> directory on every file server
2327 machine, even if some processes do not actively run on the
2328 machine. This makes it easier to reconfigure a machine to fill a new
2331 <para>For security reasons, the <emphasis
2332 role="bold">/usr/afs</emphasis> directory on a file server machine
2333 and all of its subdirectories and files must be owned by the local
2334 superuser <emphasis role="bold">root</emphasis> and have only the
2335 first <emphasis role="bold">w</emphasis> (<emphasis
2336 role="bold">write</emphasis>) mode bit turned on. Some files even
2337 have only the first <emphasis role="bold">r</emphasis> (<emphasis
2338 role="bold">read</emphasis>) mode bit turned on (for example, the
2339 <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis> file, which
2340 lists the AFS server encryption keys). Each time the BOS Server
2341 starts, it checks that the mode bits on certain files and
2342 directories match the expected values. For a list, see the
2343 <emphasis>OpenAFS Quick Beginnings</emphasis> section about
2344 protecting sensitive AFS directories, or the discussion of the
2345 output from the <emphasis role="bold">bos status</emphasis> command
2346 in <link linkend="HDRWQ159">To display the status of server
2347 processes and their BosConfig entries</link>.</para>
2349 <para>For a description of the contents of all AFS directories on a
2350 file server machine's local disk, see <link
2351 linkend="HDRWQ80">Administering Server Machines</link>.</para>
2354 <sect2 id="Header_62">
2355 <title>Configuring Partitions to Store AFS Data</title>
2357 <para>The partitions that house AFS volumes on a file server machine
2358 must be mounted at directories named</para>
2361 role="bold">/vicep</emphasis><emphasis>index</emphasis></para>
2363 <para>where <emphasis>index</emphasis> is one or two lowercase
2364 letters. By convention, the first AFS partition created is mounted
2365 at the <emphasis role="bold">/vicepa</emphasis> directory, the
2366 second at the <emphasis role="bold">/vicepb</emphasis> directory,
2367 and so on through the <emphasis role="bold">/vicepz</emphasis>
2368 directory. The names then continue with <emphasis
2369 role="bold">/vicepaa</emphasis> through <emphasis
2370 role="bold">/vicepaz</emphasis>, <emphasis
2371 role="bold">/vicepba</emphasis> through <emphasis
2372 role="bold">/vicepbz</emphasis>, and so on, up to the maximum
2373 supported number of server partitions, which is specified in the
2374 OpenAFS Release Notes.</para>
2376 <para>Each <emphasis role="bold">/vicep</emphasis>x directory must
2377 correspond to an entire partition or logical volume, and must be a
2378 subdirectory of the root directory (/). It is not acceptable to
2379 configure part of (for example) the <emphasis
2380 role="bold">/usr</emphasis> partition as an AFS server partition and
2381 mount it on a directory called <emphasis
2382 role="bold">/usr/vicepa</emphasis>.</para>
2384 <para>Also, do not store non-AFS files on AFS server partitions. The
2385 File Server and Volume Server expect to have available all of the
2386 space on the partition. Sharing space also creates competition
2387 between AFS and the local UNIX file system for access to the
2388 partition, particularly if the UNIX files are frequently
2392 <primary>server machine</primary>
2394 <secondary>monitoring</secondary>
2398 <primary>file server machine</primary>
2400 <secondary>rebooting, about</secondary>
2404 <primary>rebooting</primary>
2406 <secondary>file server machine, limiting</secondary>
2410 <primary>weekly restart of BOS Server (automatic)</primary>
2412 <secondary>about</secondary>
2416 <primary>restart times for BOS Server</primary>
2418 <secondary>about</secondary>
2422 <sect2 id="Header_63">
2423 <title>Monitoring, Rebooting and Automatic Process Restarts</title>
2425 <para>AFS provides several tools for monitoring the File Server,
2426 including the <emphasis role="bold">scout</emphasis> and <emphasis
2427 role="bold">afsmonitor</emphasis> programs. You can configure them
2428 to alert you when certain threshold values are exceeded, for example
2429 when a server partition is more than 95% full. See <link
2430 linkend="HDRWQ323">Monitoring and Auditing AFS
2431 Performance</link>.</para>
2433 <para>Rebooting a file server machine requires shutting down the AFS
2434 processes and so inevitably causes a service outage. Reboot file
2435 server machines as infrequently as possible. For instructions, see
2436 <link linkend="HDRWQ139">Rebooting a Server Machine</link>.</para>
2438 <para>The BOS Server checks each morning at 5:00 a.m. for any newly
2439 installed binary files in the <emphasis
2440 role="bold">/usr/afs/bin</emphasis> directory. It compares the
2441 timestamp on each binary file to the time at which the corresponding
2442 process last restarted. If the timestamp on the binary is later, the
2443 BOS Server restarts the corresponding process to start using
2446 <para>The BOS server also supports performing a weekly restart of
2447 all AFS server processes, including itself. This functionality is
2448 disabled on new installs, but historically it was set to 4:00am on
2449 Sunday. Administrators may find that installations predating OpenAFS
2450 1.6.0 have weekly restarts enabled.</para>
2452 <para>The default times are in the early morning hours when the
2453 outage that results from restarting a process is likely to disturb
2454 the fewest number of people. You can display the restart times for
2455 each machine with the <emphasis role="bold">bos
2456 getrestart</emphasis> command, and set them with the <emphasis
2457 role="bold">bos setrestart</emphasis> command. The latter command
2458 enables you to disable automatic restarts entirely, by setting the
2459 time to <emphasis role="bold">never</emphasis>. See <link
2460 linkend="HDRWQ171">Setting the BOS Server's Restart
2461 Times</link>.</para>
2464 <primary>client machine</primary>
2466 <secondary>configuration issues</secondary>
2470 <primary>configuring</primary>
2472 <secondary>client machine, issues</secondary>
2477 <sect1 id="HDRWQ54">
2478 <title>Configuring Client Machines</title>
2480 <para>This section summarizes issues to consider as you install and
2481 configure client machines in your cell.</para>
2484 <primary>client machine</primary>
2486 <secondary>files required on local disk</secondary>
2490 <primary>local disk</primary>
2492 <secondary>files required on client machine</secondary>
2496 <primary>file</primary>
2498 <secondary>required on client machine local disk</secondary>
2501 <sect2 id="HDRWQ55">
2502 <title>Configuring the Local Disk</title>
2504 <para>You can often free up significant amounts of local disk space
2505 on AFS client machines by storing standard UNIX files in AFS and
2506 creating symbolic links to them from the local disk. The <emphasis
2507 role="bold">@sys</emphasis> pathname variable can be useful in links
2508 to system-specific files; see <link linkend="HDRWQ56">Using the @sys
2509 Variable in Pathnames</link>.</para>
2511 <para>There are two types of files that must actually reside on the
2512 local disk: boot sequence files needed before the <emphasis
2513 role="bold">afsd</emphasis> program is invoked, and files that can
2514 be helpful during file server machine outages.</para>
2516 <para>During a reboot, AFS is inaccessible until the <emphasis
2517 role="bold">afsd</emphasis> program executes and initializes the
2518 Cache Manager. (In the conventional configuration, the AFS
2519 initialization file is included in the machine's initialization
2520 sequence and invokes the <emphasis role="bold">afsd</emphasis>
2521 program.) Files needed during reboot prior to that point must reside
2522 on the local disk. They include the following, but this list is not
2523 necessarily exhaustive.
2526 <para>Standard UNIX utilities including the following or their
2530 <para>Machine initialization files (stored in the
2531 <emphasis role="bold">/etc</emphasis> or <emphasis
2532 role="bold">/sbin</emphasis> directory on many system
2537 <para>The <emphasis role="bold">fstab</emphasis>
2542 <para>The <emphasis role="bold">mount</emphasis> command
2547 <para>The <emphasis role="bold">umount</emphasis>
2548 command binary</para>
2555 <para>All subdirectories and files in the <emphasis
2556 role="bold">/usr/vice</emphasis> directory, including the
2561 role="bold">/usr/vice/cache</emphasis> directory</para>
2566 role="bold">/usr/vice/etc/afsd</emphasis> command
2572 role="bold">/usr/vice/etc/cacheinfo</emphasis> file</para>
2577 role="bold">/usr/vice/etc/CellServDB</emphasis>
2583 role="bold">/usr/vice/etc/ThisCell</emphasis> file</para>
2588 <para>For more information on these files, see <link
2589 linkend="HDRWQ391">Configuration and Cache-Related Files on
2590 the Local Disk</link>.</para>
2595 <para>The other type of files and programs to retain on the local
2596 disk are those you need when diagnosing and fixing problems caused
2597 by a file server outage, because the outage can make inaccessible
2598 the copies stored in AFS. Examples include the binaries for a text
2599 editor (such as <emphasis role="bold">ed</emphasis> or <emphasis
2600 role="bold">vi</emphasis>) and for the <emphasis
2601 role="bold">fs</emphasis> and <emphasis role="bold">bos</emphasis>
2602 commands. Store copies of AFS command binaries in the <emphasis
2603 role="bold">/usr/vice/etc</emphasis> directory as well as including
2604 them in the <emphasis role="bold">/usr/afsws</emphasis> directory,
2605 which is normally a link into AFS. Then place the <emphasis
2606 role="bold">/usr/afsws</emphasis> directory before the <emphasis
2607 role="bold">/usr/vice/etc</emphasis> directory in users'
2608 <envar>PATH</envar> environment variable definition. When AFS is
2609 functioning normally, users access the copy in the <emphasis
2610 role="bold">/usr/afsws</emphasis> directory, which is more likely to
2611 be current than a local copy.</para>
2613 <para>You can automate the configuration of client machine local
2614 disks by using the <emphasis role="bold">package</emphasis> program,
2615 which updates the contents of the local disk to match a
2616 configuration file. See <link linkend="HDRWQ419">Configuring Client
2617 Machines with the package Program</link>.</para>
2620 <sect2 id="Header_66">
2621 <title>Enabling Access to Foreign Cells</title>
2624 <primary>client machine</primary>
2626 <secondary>enabling access to foreign cell</secondary>
2629 <para>As detailed in <link linkend="HDRWQ39">Making Other Cells
2630 Visible in Your Cell</link>, you enable the Cache Manager to access
2631 a cell's AFS filespace by storing a list of the cell's database
2632 server machines in the local <emphasis
2633 role="bold">/usr/vice/etc/CellServDB</emphasis> file. The Cache
2634 Manager reads the list into kernel memory at reboot for faster
2635 retrieval. You can change the list in kernel memory between reboots
2636 by using the <emphasis role="bold">fs newcell</emphasis> command. It
2637 is often practical to store a central version of the <emphasis
2638 role="bold">CellServDB</emphasis> file in AFS and use the <emphasis
2639 role="bold">package</emphasis> program periodically to update each
2640 client's version with the source copy. See <link
2641 linkend="HDRWQ406">Maintaining Knowledge of Database Server
2642 Machines</link>.</para>
2644 <para>Because each client machine maintains its own copy of the
2645 <emphasis role="bold">CellServDB</emphasis> file, you can in theory
2646 enable access to different foreign cells on different client
2647 machines. This is not usually practical, however, especially if
2648 users do not always work on the same machine.</para>
2651 <primary>at-sys (@sys) variable in pathnames</primary>
2655 <primary>sys (@sys) variable in pathnames</primary>
2659 <primary>variables</primary>
2661 <secondary>@sys in pathnames</secondary>
2665 <sect2 id="HDRWQ56">
2666 <title>Using the @sys Variable in Pathnames</title>
2668 <para>When creating symbolic links into AFS on the local disk, it is
2669 often practical to use the @sys variable in pathnames. The Cache
2670 Manager automatically substitutes the local machine's AFS system
2671 name (CPU/operating system type) for the @sys variable. This means
2672 you can place the same links on machines of various system types and
2673 still have each machine access the binaries for its system type. For
2674 example, the Cache Manager on a machine running AIX 4.2 converts
2675 <emphasis role="bold">/afs/abc.com/@sys</emphasis> to <emphasis
2676 role="bold">/afs/abc.com/rs_aix42</emphasis>, whereas a machine
2677 running Solaris 7 converts it to <emphasis
2678 role="bold">/afs/abc.com/sun4x_57</emphasis>.</para>
2680 <para>If you want to use the @sys variable, it is simplest to use
2681 the conventional AFS system type names as specified in the OpenAFS
2682 Release Notes. The Cache Manager records the local machine's system
2683 type name in kernel memory during initialization. If you do not use
2684 the conventional names, you must use the <emphasis role="bold">fs
2685 sysname</emphasis> command to change the value in kernel memory from
2686 its default just after Cache Manager initialization, on every client
2687 machine of the relevant system type. The <emphasis role="bold">fs
2688 sysname</emphasis> command also displays the current value; see
2689 <link linkend="HDRWQ417">Displaying and Setting the System Type
2692 <para>In pathnames in the AFS filespace itself, use the @sys
2693 variable carefully and sparingly, because it can lead to unexpected
2694 results. It is generally best to restrict its use to only one level
2695 in the filespace. The third level is a common choice, because that
2696 is where many cells store the binaries for different machine
2699 <para>Multiple instances of the @sys variable in a pathname are
2700 especially dangerous to people who must explicitly change
2701 directories (with the <emphasis role="bold">cd</emphasis> command,
2702 for example) into directories that store binaries for system types
2703 other than the machine on which they are working, such as
2704 administrators or developers who maintain those directories. After
2705 changing directories, it is recommended that such people verify they
2706 are in the desired directory.</para>
2709 <sect2 id="Header_68">
2710 <title>Setting Server Preferences</title>
2712 <para>The Cache Manager stores a table of preferences for file
2713 server machines in kernel memory. A preference rank pairs a file
2714 server machine interface's IP address with an integer in the range
2715 from 1 to 65,534. When it needs to access a file, the Cache Manager
2716 compares the ranks for the interfaces of all machines that house the
2717 file, and first attempts to access the file via the interface with
2718 the best rank. As it initializes, the Cache Manager sets default
2719 ranks that bias it to access files via interfaces that are close to
2720 it in terms of network topology. You can adjust the preference ranks
2721 to improve performance if you wish.</para>
2723 <para>The Cache Manager also uses similar preferences for Volume
2724 Location (VL) Server machines. Use the <emphasis role="bold">fs
2725 getserverprefs</emphasis> command to display preference ranks and
2726 the <emphasis role="bold">fs setserverprefs</emphasis> command to
2727 set them. See <link linkend="HDRWQ414">Maintaining Server Preference
2728 Ranks</link>.</para>
2731 <primary>user account</primary>
2733 <secondary>configuration issues</secondary>
2737 <sect1 id="HDRWQ57">
2738 <title>Configuring AFS User Accounts</title>
2740 <para>This section discusses some of the issues to consider when
2741 configuring AFS user accounts. Because AFS is separate from the UNIX
2742 file system, a user's AFS account is separate from her UNIX
2745 <para>The preferred method for creating a user account is with the
2746 <emphasis role="bold">uss</emphasis> suite of commands. With a single
2747 command, you can create all the components of one or many accounts,
2748 after you have prepared a template file that guides the account
2749 creation. See <link linkend="HDRWQ449">Creating and Deleting User
2750 Accounts with the uss Command Suite</link>.</para>
2752 <para>Alternatively, you can issue the individual commands that create
2753 each component of an account. For instructions, along with
2754 instructions for removing user accounts and changing user passwords,
2755 user volume quotas and usernames, see <link
2756 linkend="HDRWQ491">Administering User Accounts</link>.</para>
2758 <para>When users leave your system, it is often good policy to remove
2759 their accounts. Instructions appear in <link
2760 linkend="HDRWQ486">Deleting Individual Accounts with the uss delete
2761 Command</link> and <link linkend="HDRWQ524">Removing a User
2762 Account</link>.</para>
2764 <para>An AFS user account consists of the following components, which
2765 are described in greater detail in <link linkend="HDRWQ494">The
2766 Components of an AFS User Account</link>.
2769 <para>A Protection Database entry</para>
2773 <para>An Authentication Database entry</para>
2777 <para>A volume</para>
2781 <para>A home directory at which the volume is mounted</para>
2785 <para>Ownership of the home directory and full permissions on
2790 <para>An entry in the local password file (<emphasis
2791 role="bold">/etc/passwd</emphasis> or equivalent) of each
2792 machine the user needs to log into</para>
2796 <para>Optionally, standard files and subdirectories that make
2797 the account more useful</para>
2802 <para>By creating some components but not others, you can create
2803 accounts at different levels of functionality, using either <emphasis
2804 role="bold">uss</emphasis> commands as described in <link
2805 linkend="HDRWQ449">Creating and Deleting User Accounts with the uss
2806 Command Suite</link> or individual commands as described in <link
2807 linkend="HDRWQ491">Administering User Accounts</link>. The levels of
2808 functionality include the following
2811 <para>An authentication-only account enables the user to obtain
2812 AFS tokens and so to access protected AFS data and to issue
2813 privileged commands. It consists only of entries in the
2814 Authentication and Protection Database. This type of account is
2815 suitable for administrative accounts and for users from foreign
2816 cells who need to access protected data. Local users generally
2817 also need a volume and home directory.</para>
2821 <para>A basic user account includes a volume for the user, in
2822 addition to Authentication and Protection Database entries. The
2823 volume is mounted in the AFS filespace as the user's home
2824 directory, and provides a repository for the user's personal
2829 <para>A full account adds configuration files for basic
2830 functions such as logging in, printing, and mail delivery to a
2831 basic account, making it more convenient and useful. For a
2832 discussion of some useful types of configuration files, see
2833 <link linkend="HDRWQ60">Creating Standard Files in New AFS
2834 Accounts</link>.</para>
2839 <para>If your users have UNIX user accounts that predate the
2840 introduction of AFS in the cell, you possibly want to convert them
2841 into AFS accounts. There are three main issues to consider:
2844 <para>Making UNIX and AFS UIDs match</para> </listitem>
2847 <para>Setting the password field in the local password file
2848 appropriately</para>
2852 <para>Moving files from the UNIX file system into AFS</para>
2857 <para>For further discussion, see <link linkend="HDRWQ459">Converting
2858 Existing UNIX Accounts with uss</link> or <link
2859 linkend="HDRWQ498">Converting Existing UNIX Accounts</link>.</para>
2862 <primary>username</primary>
2864 <secondary>choosing</secondary>
2868 <primary>user</primary>
2870 <secondary>name</secondary>
2876 <primary>choosing</primary>
2878 <secondary>name</secondary>
2880 <tertiary>user</tertiary>
2884 <primary>anonymous user</primary>
2886 <secondary>AFS UID reserved</secondary>
2890 <primary>AFS UID</primary>
2892 <secondary>reserved</secondary>
2894 <tertiary>anonymous user</tertiary>
2897 <sect2 id="HDRWQ58">
2898 <title>Choosing Usernames and Naming Other Account
2901 <para>This section suggests schemes for choosing usernames, AFS
2902 UIDs, user volume names and mount point names, and also outlines
2903 some restrictions on your choices.</para>
2906 <title>Usernames</title>
2908 <para>AFS imposes very few restrictions on the form of
2909 usernames. It is best to keep usernames short, both because many
2910 utilities and applications can handle usernames of no more than
2911 eight characters and because by convention many components of and
2912 AFS account incorporate the name. These include the entries in the
2913 Protection and Authentication Databases, the volume, and the mount
2914 point. Depending on your electronic mail delivery system, the
2915 username can become part of the user's mailing address. The
2916 username is also the string that the user types when logging in to
2917 a client machine.</para>
2920 <para>Some common choices for usernames are last names, first names,
2921 initials, or a combination, with numbers sometimes added. It is
2922 also best to avoid using the following characters, many of which
2923 have special meanings to the command shell.
2926 <para>The comma (<emphasis role="bold">,</emphasis>)</para>
2930 <para>The colon (<emphasis role="bold">:</emphasis>), because
2931 AFS reserves it as a field separator in protection group
2932 names; see <link linkend="HDRWQ62">The Two Types of
2933 User-Defined Groups</link></para>
2937 <para>The semicolon (<emphasis
2938 role="bold">;</emphasis>)</para>
2942 <para>The "at-sign" (<emphasis role="bold">@</emphasis>); this
2943 character is reserved for Internet mailing addresses</para>
2951 <para>The newline character</para>
2955 <para>The period (<emphasis role="bold">.</emphasis>); it is
2956 conventional to use this character only in the special
2957 username that an administrator adopts while performing
2958 privileged tasks, such as <emphasis
2959 role="bold">pat.admin</emphasis></para>
2965 <title>AFS UIDs and UNIX UIDs</title>
2967 <para>AFS associates a unique identification number, the AFS UID,
2968 with every username, recording the mapping in the user's
2969 Protection Database entry. The AFS UID functions within AFS much
2970 as the UNIX UID does in the local file system: the AFS server
2971 processes and the Cache Manager use it internally to identify a
2972 user, rather than the username.</para>
2975 <para>Every AFS user also must have a UNIX UID recorded in the local
2976 password file (<emphasis role="bold">/etc/passwd</emphasis> or
2977 equivalent) of each client machine they log onto. Both
2978 administration and a user's AFS access are simplest if the AFS UID
2979 and UNIX UID match. One important consequence of matching UIDs is
2980 that the owner reported by the <emphasis role="bold">ls
2981 -l</emphasis> command matches the AFS username.</para>
2983 <para>It is usually best to allow the Protection Server to allocate
2984 the AFS UID as it creates the Protection Database entry. However,
2985 both the <emphasis role="bold">pts createuser</emphasis> command and
2986 the <emphasis role="bold">uss</emphasis> commands that create user
2987 accounts enable you to assign AFS UIDs explicitly. This is
2988 appropriate in two cases:
2991 <para>You wish to group together the AFS UIDs of related
2996 <para>You are converting an existing UNIX account into an AFS
2997 account and want to make the AFS UID match the existing UNIX
3003 <para>After the Protection Server initializes for the first time on
3004 a cell's first file server machine, it starts assigning AFS UIDs at
3005 a default value. To change the default before creating any user
3006 accounts, or at any time, use the <emphasis role="bold">pts
3007 setmax</emphasis> command to reset the <computeroutput>max user id
3008 counter</computeroutput>. To display the counter, use the <emphasis
3009 role="bold">pts listmax</emphasis> command. See <link
3010 linkend="HDRWQ560">Displaying and Setting the AFS UID and GID
3011 Counters</link>.</para>
3013 <para>AFS reserves one AFS UID, 32766, for the user <emphasis
3014 role="bold">anonymous</emphasis>. The AFS server processes assign
3015 this identity and AFS UID to any user who does not possess a token
3016 for the local cell. Do not assign this AFS UID to any other user or
3017 hardcode its current value into any programs or a file's owner
3018 field, because it is subject to change in future releases.</para>
3021 <primary>username</primary>
3023 <secondary>part of volume name</secondary>
3027 <primary>choosing</primary>
3029 <secondary>name</secondary>
3031 <tertiary>user volume</tertiary>
3035 <title>User Volume Names</title>
3037 <para>Like any volume name, a user volume's base (read/write) name
3038 cannot exceed 22 characters in length or include the <emphasis
3039 role="bold">.readonly</emphasis> or <emphasis
3040 role="bold">.backup</emphasis> extension. See <link
3041 linkend="HDRWQ44">Creating Volumes to Simplify
3042 Administration</link>. By convention, user volume names have the
3043 format <emphasis role="bold">user.</emphasis>username. Using the
3044 <emphasis role="bold">user.</emphasis> prefix not only makes it
3045 easy to identify the volume's contents, but also to create a
3046 backup version of all user volumes by issuing a single <emphasis
3047 role="bold">vos backupsys</emphasis> command.</para>
3051 <primary>mount point</primary>
3053 <secondary>choosing name for user volume</secondary>
3057 <primary>choosing</primary>
3059 <secondary>name</secondary>
3061 <tertiary>user volume mount point</tertiary>
3065 <title>Mount Point Names</title>
3067 <para>By convention, the mount point for a user's volume is named
3068 after the username. Many cells follow the convention of mounting
3069 user volumes in the <emphasis
3070 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3071 role="bold">/usr</emphasis> directory, as discussed in <link
3072 linkend="HDRWQ43">The Third Level</link>. Very large cells
3073 sometimes find that mounting all user volumes in the same
3074 directory slows directory lookup, however; for suggested
3075 alternatives, see the following section.</para>
3079 <primary>directories</primary>
3081 <secondary>for grouping user home directories</secondary>
3085 <primary>user account</primary>
3087 <secondary>suggestions for grouping home directories</secondary>
3091 <sect2 id="HDRWQ59">
3092 <title>Grouping Home Directories</title>
3094 <para>Mounting user volumes in the <emphasis
3095 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3096 role="bold">/usr</emphasis> directory is an AFS-appropriate
3097 variation on the standard UNIX practice of putting user home
3098 directories under the <emphasis role="bold">/usr</emphasis>
3099 subdirectory. However, cells with more than a few hundred users
3100 sometimes find that mounting all user volumes in a single directory
3101 results in slow directory lookup. The solution is to distribute user
3102 volume mount points into several directories; there are a number of
3103 alternative methods to accomplish this.
3106 <para>Distribute user home directories into multiple
3107 directories that reflect organizational divisions, such as
3108 academic or corporate departments. For example, a company can
3109 create group directories called <emphasis
3110 role="bold">usr/marketing</emphasis>, <emphasis
3111 role="bold">usr/research</emphasis>, <emphasis
3112 role="bold">usr/finance</emphasis>. A good feature of this
3113 scheme is that knowing a user's department is enough to find
3114 the user's home directory. Also, it makes it easy to set the
3115 ACL to limit access to members of the department only. A
3116 potential drawback arises if departments are of sufficiently
3117 unequal size that users in large departments experience slower
3118 lookup than users in small departments. This scheme is also
3119 not appropriate in cells where users frequently change between
3124 <para>Distribute home directories into alphabetic
3125 subdirectories of the <emphasis role="bold">usr</emphasis>
3126 directory (the <emphasis role="bold">usr/a</emphasis>
3127 subdirectory, the <emphasis role="bold">usr/b</emphasis>
3128 subdirectory, and so on), based on the first letter of the
3129 username. If the cell is very large, create subdirectories
3130 under each letter that correspond to the second letter in the
3131 user name. This scheme has the same advantages and
3132 disadvantages of a department-based scheme. Anyone who knows
3133 the user's username can find the user's home directory, but
3134 users with names that begin with popular letters sometimes
3135 experience slower lookup.</para>
3139 <para>Distribute home directories randomly but evenly into
3140 more than one grouping directory. One cell that uses this
3141 scheme has over twenty such directories called the <emphasis
3142 role="bold">usr1</emphasis> directory, the <emphasis
3143 role="bold">usr2</emphasis> directory, and so on. This scheme
3144 is especially appropriate in cells where the other two schemes
3145 do not seem feasible. It eliminates the potential problem of
3146 differences in lookup speed, because all directories are about
3147 the same size. Its disadvantage is that there is no way to
3148 guess which directory a given user's volume is mounted in, but
3149 a solution is to create a symbolic link in the regular
3150 <emphasis role="bold">usr</emphasis> directory that references
3151 the actual mount point. For example, if user <emphasis
3152 role="bold">smith</emphasis>'s volume is mounted at the
3153 <emphasis role="bold">/afs/bigcell.com/usr17/smith</emphasis>
3154 directory, then the <emphasis
3155 role="bold">/afs/bigcell.com/usr/smith</emphasis> directory is
3156 a symbolic link to the <emphasis
3157 role="bold">../usr17/smith</emphasis> directory. This way, if
3158 someone does not know which directory the user <emphasis
3159 role="bold">smith</emphasis> is in, he or she can access it
3160 through the link called <emphasis
3161 role="bold">usr/smith</emphasis>; people who do know the
3162 appropriate directory save lookup time by specifying
3168 <para>For instructions on how to implement the various schemes when
3169 using the <emphasis role="bold">uss</emphasis> program to create
3170 user accounts, see <link linkend="HDRWQ472">Evenly Distributing User
3171 Home Directories with the G Instruction</link> and <link
3172 linkend="HDRWQ473">Creating a Volume with the V
3173 Instruction</link>.</para>
3176 <sect2 id="Header_72">
3177 <title>Making a Backup Version of User Volumes Available</title>
3179 <para>Mounting the backup version of a user's volume is a simple way
3180 to enable users themselves to restore data they have accidentally
3181 removed or deleted. It is conventional to mount the backup version
3182 at a subdirectory of the user's home directory (called perhaps the
3183 <emphasis role="bold">OldFiles</emphasis> subdirectory), but other
3184 schemes are possible. Once per day you create a new backup version
3185 to capture the changes made that day, overwriting the previous day's
3186 backup version with the new one. Users can always retrieve the
3187 previous day's copy of a file without your assistance, freeing you
3188 to deal with more pressing tasks.</para>
3190 <para>Users sometimes want to delete the mount point to their backup
3191 volume, because they erroneously believe that the backup volume's
3192 contents count against their quota. Remind them that the backup
3193 volume is separate, so the only space it uses in the user volume is
3194 the amount needed for the mount point.</para>
3196 <para>For further discussion of backup volumes, see <link
3197 linkend="HDRWQ77">Backing Up AFS Data</link> and <link
3198 linkend="HDRWQ201">Creating Backup Volumes</link>.</para>
3201 <primary>file</primary>
3203 <secondary>creating standard ones in new user account</secondary>
3207 <primary>user account</primary>
3209 <secondary>creating</secondary>
3211 <tertiary>standard files in</tertiary>
3215 <primary>creating</primary>
3217 <secondary>standard files in new user account</secondary>
3221 <sect2 id="HDRWQ60">
3222 <title>Creating Standard Files in New AFS Accounts</title>
3224 <para>From your experience as a UNIX administrator, you are probably
3225 familiar with the use of login and shell initialization files (such
3226 as the <emphasis role="bold">.login</emphasis> and <emphasis
3227 role="bold">.cshrc</emphasis> files) to make an account easier to
3230 <para>It is often practical to add some AFS-specific directories to
3231 the definition of the user's <envar>PATH</envar> environment
3232 variable, including the following:
3235 <para>The path to a <emphasis role="bold">bin</emphasis>
3236 subdirectory in the user's home directory for binaries the
3237 user has created (that is, <emphasis
3238 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
3239 role="bold">/usr/</emphasis><replaceable>username</replaceable><emphasis
3240 role="bold">/bin</emphasis>)</para>
3244 <para>The <emphasis role="bold">/usr/afsws/bin</emphasis>
3245 path, which conventionally includes programs like <emphasis
3246 role="bold">fs</emphasis>, <emphasis
3247 role="bold">klog</emphasis>, <emphasis
3248 role="bold">kpasswd</emphasis>, <emphasis
3249 role="bold">pts</emphasis>, <emphasis
3250 role="bold">tokens</emphasis>, and <emphasis
3251 role="bold">unlog</emphasis></para>
3255 <para>The <emphasis role="bold">/usr/afsws/etc</emphasis>
3256 path, if the user is an administrator; it usually houses the
3257 AFS command suites that require privilege (the <emphasis
3258 role="bold">backup</emphasis>, <emphasis
3259 role="bold">butc</emphasis>, <emphasis
3260 role="bold">kas</emphasis>, <emphasis
3261 role="bold">uss</emphasis>, <emphasis
3262 role="bold">vos</emphasis> commands), the <emphasis
3263 role="bold">package</emphasis> program, and others</para>
3268 <para>If you are not using an AFS-modified login utility, it can be
3269 helpful to users to invoke the <emphasis role="bold">klog</emphasis>
3270 command in their <emphasis role="bold">.login</emphasis> file so
3271 that they obtain AFS tokens as part of logging in. In the following
3272 example command sequence, the first line echoes the string
3273 <computeroutput>klog</computeroutput> to the standard output stream,
3274 so that the user understands the purpose of the
3275 <computeroutput>Password:</computeroutput> prompt that appears when
3276 the second line is executed. The <emphasis
3277 role="bold">-setpag</emphasis> flag associates the new tokens with a
3278 process authentication group (PAG), which is discussed further in
3279 <link linkend="HDRWQ64">Identifying AFS Tokens by PAG</link>.</para>
3282 echo -n "klog " klog -setpag
3285 <para>The following sequence of commands has a similar effect,
3286 except that the <emphasis role="bold">pagsh</emphasis> command forks
3287 a new shell with which the PAG and tokens are associated.</para>
3290 pagsh echo -n "klog " klog
3293 <para>If you use an AFS-modified login utility, this sequence is not
3294 necessary, because such utilities both log a user in locally and
3295 obtain AFS tokens.</para>
3298 <primary>group</primary>
3300 <secondary>AFS GID</secondary>
3304 <primary>group</primary>
3306 <secondary>restrictions</secondary>
3310 <primary>group</primary>
3312 <secondary>privacy flags</secondary>
3316 <primary>privacy flags on Protection Database entry</primary>
3321 <sect1 id="HDRWQ61">
3322 <title>Using AFS Protection Groups</title>
3324 <para>AFS enables users to define their own groups of other users or
3325 machines. The groups are placed on ACLs to grant the same permissions
3326 to many users without listing each user individually. For group
3327 creation instructions, see <link linkend="HDRWQ531">Administering the
3328 Protection Database</link>.</para>
3330 <para>Groups have AFS ID numbers, just as users do, but an AFS group
3331 ID (GID) is a negative integer whereas a user's AFS UID is a positive
3332 integer. By default, the Protection Server allocates a new group's AFS
3333 GID automatically, but members of the <emphasis
3334 role="bold">system:administrators</emphasis> group can assign a GID
3335 when issuing the <emphasis role="bold">pts creategroup</emphasis>
3336 command. Before explicitly assigning a GID, it is best to verify that
3337 it is not already in use.</para>
3339 <para>A group cannot belong to another group, but it can own another
3340 group or even itself as long as it (the owning group) has at least one
3341 member. The current owner of a group can transfer ownership of the
3342 group to another user or group, even without the new owner's
3343 permission. At that point the former owner loses administrative
3344 control over the group.</para>
3346 <para>By default, each user can create 20 groups. A system
3347 administrator can increase or decrease this group creation quota with
3348 the <emphasis role="bold">pts setfields</emphasis> command.</para>
3350 <para>Each Protection Database entry (group or user) is protected by a
3351 set of five privacy flagswhich limit who can administer the entry and
3352 what they can do. The default privacy flags are fairly restrictive,
3353 especially for user entries. See <link linkend="HDRWQ559">Setting the
3354 Privacy Flags on Database Entries</link>.</para>
3357 <primary>system:administrators group</primary>
3359 <secondary>about</secondary>
3363 <primary>system:anyuser group</primary>
3365 <secondary>about</secondary>
3369 <primary>system:authuser group</primary>
3371 <secondary>about</secondary>
3375 <primary>group</primary>
3377 <secondary>system-defined</secondary>
3380 <sect2 id="Header_75">
3381 <title>The Three System Groups</title>
3383 <para>As the Protection Server initializes for the first time on a
3384 cell's first database server machine, it automatically creates three
3385 group entries: the <emphasis role="bold">system:anyuser</emphasis>,
3386 <emphasis role="bold">system:authuser</emphasis>, and <emphasis
3387 role="bold">system:administrators</emphasis> groups.</para>
3390 <primary>AFS UID</primary>
3392 <secondary>reserved</secondary>
3394 <tertiary>system-defined groups</tertiary>
3397 <para>The first two system groups are unlike any other groups in the
3398 Protection Database in that they do not have a stable membership:
3401 <para>The <emphasis role="bold">system:anyuser</emphasis>
3402 group includes everyone who can access a cell's AFS filespace:
3403 users who have tokens for the local cell, users who have
3404 logged in on a local AFS client machine but not obtained
3405 tokens (such as the local superuser <emphasis
3406 role="bold">root</emphasis>), and users who have connected to
3407 a local machine from outside the cell. Placing the <emphasis
3408 role="bold">system:anyuser</emphasis> group on an ACL grants
3409 access to the widest possible range of users. It is the only
3410 way to extend access to users from foreign AFS cells that do
3411 not have local accounts.</para>
3415 <para>The <emphasis role="bold">system:authuser</emphasis>
3416 group includes everyone who has a valid token obtained from
3417 the cell's AFS authentication service.</para>
3422 <para>Because the groups do not have a stable membership, the
3423 <emphasis role="bold">pts membership</emphasis> command produces no
3424 output for them. Similarly, they do not appear in the list of groups
3425 to which a user belongs.</para>
3427 <para>The <emphasis role="bold">system:administrators</emphasis>
3428 group does have a stable membership, consisting of the cell's
3429 privileged administrators. Members of this group can issue any
3430 <emphasis role="bold">pts</emphasis> command, and are the only ones
3431 who can issue several other restricted commands (such as the
3432 <emphasis role="bold">chown</emphasis> command on AFS files). By
3433 default, they also implicitly have the <emphasis
3434 role="bold">a</emphasis> (<emphasis
3435 role="bold">administer</emphasis>) and <emphasis
3436 role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>)
3437 permissions on every ACL in the filespace. For information about
3438 changing this default, see <link linkend="HDRWQ586">Administering
3439 the system:administrators Group</link>.</para>
3441 <para>For a discussion of how to use system groups effectively on
3442 ACLs, see <link linkend="HDRWQ571">Using Groups on
3446 <sect2 id="HDRWQ62">
3447 <title>The Two Types of User-Defined Groups</title>
3449 <para>All users can create regular groups. A regular group name has
3450 two fields separated by a colon, the first of which must indicate
3451 the group's ownership. The Protection Server refuses to create or
3452 change the name of a group if the result does not accurately
3453 indicate the ownership.</para>
3455 <para>Members of the <emphasis
3456 role="bold">system:administrators</emphasis> group can create
3457 prefix-less groups whose names do not have the first field that
3458 indicates ownership. For suggestions on using the two types of
3459 groups effectively, see <link linkend="HDRWQ545">Using Groups
3460 Effectively</link>.</para>
3463 <primary>authentication</primary>
3465 <secondary>AFS separate from UNIX</secondary>
3469 <primary>AFS</primary>
3471 <secondary>authentication separate from UNIX</secondary>
3476 <sect1 id="HDRWQ63">
3477 <title>Login and Authentication in AFS</title>
3479 <para>As explained in <link linkend="HDRWQ31">Differences in
3480 Authentication</link>, AFS authentication is separate from UNIX
3481 authentication because the two file systems are separate. The
3482 separation has two practical implications:
3485 <para>To access AFS files, users must both log into the local
3486 file system and authenticate with the AFS authentication
3487 service. (Logging into the local file system is necessary
3488 because the only way to access the AFS filespace is through a
3489 Cache Manager, which resides in the local machine's
3494 <para>Passwords are stored in two separate places: in the
3495 Kerberos Database for AFS and in the each machine's local
3496 password file (the <emphasis role="bold">/etc/passwd</emphasis>
3497 file or equivalent) for the local file system.</para>
3502 <para>When a user successfully authenticates, the AFS authentication
3503 service passes a token to the user's Cache Manager. The token is a
3504 small collection of data that certifies that the user has correctly
3505 provided the password associated with a particular AFS identity. The
3506 Cache Manager presents the token to AFS server processes along with
3507 service requests, as proof that the user is genuine. To learn about
3508 the mutual authentication procedure they use to establish identity,
3509 see <link linkend="HDRWQ75">A More Detailed Look at Mutual
3510 Authentication</link>.</para>
3512 <para>The Cache Manager stores tokens in the user's credential
3513 structure in kernel memory. To distinguish one user's credential
3514 structure from another's, the Cache Manager identifies each one either
3515 by the user's UNIX UID or by a process authentication group (PAG),
3516 which is an identification number guaranteed to be unique in the
3517 cell. For further discussion, see <link linkend="HDRWQ64">Identifying
3518 AFS Tokens by PAG</link>.</para>
3521 <primary>tokens</primary>
3523 <secondary>one-per-cell rule</secondary>
3526 <para>A user can have only one token per cell in each separately
3527 identified credential structure. To obtain a second token for the same
3528 cell, the user must either log into a different machine or obtain
3529 another credential structure with a different identifier than any
3530 existing credential structure, which is most easily accomplished by
3531 issuing the <emphasis role="bold">pagsh</emphasis> command (see <link
3532 linkend="HDRWQ64">Identifying AFS Tokens by PAG</link>). In a single
3533 credential structure, a user can have one token for each of many cells
3534 at the same time. As this implies, authentication status on one
3535 machine or PAG is independent of authentication status on another
3536 machine or PAG, which can be very useful to a user or system
3537 administrator.</para>
3539 <para>The AFS distribution includes library files that enable each
3540 system type's login utility to authenticate users with AFS and log
3541 them into the local file system in one step. If you do not configure
3542 an AFS-modified login utility on a client machine, its users must
3543 issue the <emphasis role="bold">klog</emphasis> command to
3544 authenticate with AFS after logging in.</para>
3547 <para>The AFS-modified libraries do not necessarily support all
3548 features available in an operating system's proprietary login
3549 utility. In some cases, it is not possible to support a utility at
3550 all. For more information about the supported utilities in each AFS
3551 version, see the OpenAFS Release Notes.</para>
3555 <primary>commands</primary>
3557 <secondary>pagsh</secondary>
3561 <primary>pagsh command</primary>
3565 <primary>commands</primary>
3567 <secondary>klog with -setpag flag</secondary>
3571 <primary>klog command</primary>
3573 <secondary>with -setpag flag</secondary>
3577 <primary>PAG</primary>
3579 <secondary>creating with klog or pagsh command</secondary>
3583 <primary>creating</primary>
3585 <secondary>PAG with klog or pagsh command</secondary>
3589 <primary>process authentication group</primary>
3591 <secondary></secondary>
3596 <sect2 id="HDRWQ64">
3597 <title>Identifying AFS Tokens by PAG</title>
3599 <para>As noted, the Cache Manager identifies user credential
3600 structures either by UNIX UID or by PAG. Using a PAG is preferable
3601 because it guaranteed to be unique: the Cache Manager allocates it
3602 based on a counter that increments with each use. In contrast,
3603 multiple users on a machine can share or assume the same UNIX UID,
3604 which creates potential security problems. The following are two
3605 common such situations:
3608 <para>The local superuser <emphasis
3609 role="bold">root</emphasis> can always assume any other user's
3610 UNIX UID simply by issuing the <emphasis
3611 role="bold">su</emphasis> command, without providing the
3612 user's password. If the credential structure is associated
3613 with the user's UNIX UID, then assuming the UID means
3614 inheriting the AFS tokens.</para>
3618 <para>Two users working on different NFS client machines can
3619 have the same UNIX UID in their respective local file
3620 systems. If they both access the same NFS/AFS Translator
3621 machine, and the Cache Manager there identifies them by their
3622 UNIX UID, they become indistinguishable. To eliminate this
3623 problem, the Cache Manager on a translator machine
3624 automatically generates a PAG for each user and uses it,
3625 rather than the UNIX UID, to tell users apart.</para>
3630 <para>Yet another advantage of PAGs over UIDs is that processes
3631 spawned by the user inherit the PAG and so share the token; thus
3632 they gain access to AFS as the authenticated user. In many
3633 environments, for example, printer and other daemons run under
3634 identities (such as the local superuser <emphasis
3635 role="bold">root</emphasis>) that the AFS server processes recognize
3636 only as the <emphasis role="bold">anonymous</emphasis> user. Unless
3637 PAGs are used, such daemons cannot access files for which the
3638 <emphasis role="bold">system:anyuser</emphasis> group does not have
3639 the necessary ACL permissions.</para>
3641 <para>Once a user has a PAG, any new tokens the user obtains are
3642 associated with the PAG. The PAG expires two hours after any
3643 associated tokens expire or are discarded. If the user issues the
3644 <emphasis role="bold">klog</emphasis> command before the PAG
3645 expires, the new token is associated with the existing PAG (the PAG
3646 is said to be recycled in this case).</para>
3648 <para>AFS-modified login utilities automatically generate a PAG, as
3649 described in the following section. If you use a standard login
3650 utility, your users must issue the <emphasis
3651 role="bold">pagsh</emphasis> command before the <emphasis
3652 role="bold">klog</emphasis> command, or include the latter command's
3653 <emphasis role="bold">-setpag</emphasis> flag. For instructions, see
3654 <link linkend="HDRWQ69">Using Two-Step Login and
3655 Authentication</link>.</para>
3657 <para>Users can also use either command at any time to create a new
3658 PAG. The difference between the two commands is that the <emphasis
3659 role="bold">klog</emphasis> command replaces the PAG associated with
3660 the current command shell and tokens. The <emphasis
3661 role="bold">pagsh</emphasis> command initializes a new command shell
3662 before creating a new PAG. If the user already had a PAG, any
3663 running processes or jobs continue to use the tokens associated with
3664 the old PAG whereas any new jobs or processes use the new PAG and
3665 its associated tokens. When you exit the new shell (by pressing
3666 <<emphasis role="bold">Ctrl-d</emphasis>>, for example), you
3667 return to the original PAG and shell. By default, the <emphasis
3668 role="bold">pagsh</emphasis> command initializes a Bourne shell, but
3669 you can include the <emphasis role="bold">-c</emphasis> argument to
3670 initialize a C shell (the <emphasis role="bold">/bin/csh</emphasis>
3671 program on many system types) or Korn shell (the <emphasis
3672 role="bold">/bin/ksh</emphasis> program) instead.</para>
3675 <primary>login utility</primary>
3677 <secondary>AFS version</secondary>
3681 <sect2 id="HDRWQ65">
3682 <title>Using an AFS-modified login Utility</title>
3684 <para>As previously mentioned, an AFS-modified login utility
3685 simultaneously obtains an AFS token and logs the user into the local
3686 file system. This section outlines the login and authentication
3687 process and its interaction with the value in the password field of
3688 the local password file.</para>
3690 <para>An AFS-modified login utility performs a sequence of steps
3691 similar to the following; details can vary for different operating
3695 <para>It checks the user's entry in the local password file
3696 (the <emphasis role="bold">/etc/passwd</emphasis> file or
3701 <para>If no entry exists, or if an asterisk
3702 (<computeroutput>*</computeroutput>) appears in the entry's
3703 password field, the login attempt fails. If the entry exists,
3704 the attempt proceeds to the next step.</para>
3708 <para><anchor id="LIWQ66" />The utility obtains a PAG.</para>
3712 <para><anchor id="LIWQ67" />The utility converts the password
3713 provided by the user into an encryption key and encrypts a
3714 packet of data with the key. It sends the packet to the AFS
3715 authentication service (the AFS Authentication Server in the
3716 conventional configuration).</para>
3720 <para>The authentication service decrypts the packet and,
3721 depending on the success of the decryption, judges the
3722 password to be correct or incorrect. (For more details, see
3723 <link linkend="HDRWQ75">A More Detailed Look at Mutual
3724 Authentication</link>.)
3727 <para>If the authentication service judges the password
3728 incorrect, the user does not receive an AFS token. The
3729 PAG is retained, ready to be associated with any tokens
3730 obtained later. The attempt proceeds to Step <link
3731 linkend="LIWQ68">6</link>.</para>
3735 <para>If the authentication service judges the password
3736 correct, it issues a token to the user as proof of AFS
3737 authentication. The login utility logs the user into the
3738 local UNIX file system. Some login utilities echo the
3739 following banner to the screen to alert the user to
3740 authentication with AFS. Step <link
3741 linkend="LIWQ68">6</link> is skipped.
3743 AFS(R) version Login
3752 <para><anchor id="LIWQ68" />If no AFS token was granted in
3753 Step <link linkend="LIWQ67">4</link>, the login utility
3754 attempts to log the user into the local file system, by
3755 comparing the password provided to the local password file.
3758 <para>If the password is incorrect or any value other
3759 than an encrypted 13-character string appears in the
3760 password field, the login attempt fails.</para>
3764 <para>If the password is correct, the user is logged
3765 into the local file system only.</para> </listitem>
3773 <primary>local password file</primary>
3775 <secondary>when using AFS--modified login utility</secondary>
3779 <primary>login utility</primary>
3781 <secondary>AFS version's interaction with local password
3786 <primary>password</primary>
3788 <secondary>local password file</secondary>
3791 <para>As indicated, when you use an AFS-modified login utility, the
3792 password field in the local password file is no longer the primary
3793 gate for access to your system. If the user provides the correct AFS
3794 password, then the program never consults the local password
3795 file. However, you can still use the password field to control
3796 access, in the following way:
3799 <para>To prevent both local login and AFS authentication,
3800 place an asterisk (<emphasis role="bold">*</emphasis>) in the
3801 field. This is useful mainly in emergencies, when you want to
3802 prevent a certain user from logging into the machine.</para>
3806 <para>To prevent login to the local file system if the user
3807 does not provide the correct AFS password, place a character
3808 string of any length other than the standard thirteen
3809 characters in the field. This is appropriate if you want to
3810 permit only people with local AFS accounts to login on your
3811 machines. A single <emphasis role="bold">X</emphasis> or other
3812 character is the most easily recognizable way to do
3817 <para>To enable a user to log into the local file system even
3818 after providing an incorrect AFS password, record a standard
3819 UNIX encrypted password in the field by issuing the standard
3820 UNIX password-setting command (<emphasis
3821 role="bold">passwd</emphasis> or equivalent).</para>
3826 <para>Systems that use a Pluggable Authentication Module (PAM) for
3827 login and AFS authentication do not necessarily consult the local
3828 password file at all, in which case they do not use the password
3829 field to control authentication and login attempts. Instead,
3830 instructions in the PAM configuration file (on many system types,
3831 <emphasis role="bold">/etc/pam.conf</emphasis>) fill the same
3832 function. See the instructions in the OpenAFS Quick Beginnings for
3833 installing AFS-modified login utilities.</para>
3836 <primary>local password file</primary>
3838 <secondary>when not using AFS-modified login utility</secondary>
3842 <sect2 id="HDRWQ69">
3843 <title>Using Two-Step Login and Authentication</title>
3845 <para>In cells that do not use an AFS-modified login utility, users
3846 must issue separate commands to login and authenticate, as detailed
3847 in the OpenAFS User Guide:
3850 <para>They use the standard <emphasis
3851 role="bold">login</emphasis> program to login to the local
3852 file system, providing the password listed in the local
3853 password file (the <emphasis
3854 role="bold">/etc/passwd</emphasis> file or equivalent).</para>
3858 <para>They must issue the <emphasis
3859 role="bold">klog</emphasis> command to authenticate with the
3860 AFS authentication service, including its <emphasis
3861 role="bold">-setpag</emphasis> flag to associate the new
3862 tokens with a process authentication group (PAG).</para>
3867 <para>As mentioned in <link linkend="HDRWQ60">Creating Standard
3868 Files in New AFS Accounts</link>, you can invoke the <emphasis
3869 role="bold">klog -setpag</emphasis> command in a user's <emphasis
3870 role="bold">.login</emphasis> file (or equivalent) so that the user
3871 does not have to remember to issue the command after logging in. The
3872 user still must type a password twice, once at the prompt generated
3873 by the login utility and once at the <emphasis
3874 role="bold">klog</emphasis> command's prompt. This implies that the
3875 two passwords can differ, but it is less confusing if they do
3878 <para>Another effect of not using an AFS-modified login utility is
3879 that the AFS servers recognize the standard <emphasis
3880 role="bold">login</emphasis> program as the <emphasis
3881 role="bold">anonymous</emphasis> user. If the <emphasis
3882 role="bold">login</emphasis> program needs to access any AFS files
3883 (such as the <emphasis role="bold">.login</emphasis> file in a
3884 user's home directory), then the ACL that protects the file must
3885 include an entry granting the <emphasis role="bold">l</emphasis>
3886 (<emphasis role="bold">lookup</emphasis>) and <emphasis
3887 role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>)
3888 permissions to the <emphasis role="bold">system:anyuser</emphasis>
3891 <para>When you do not use an AFS-modified login utility, an actual
3892 (scrambled) password must appear in the local password file for each
3893 user. Use the <emphasis role="bold">/bin/passwd</emphasis> file to
3894 insert or change these passwords. It is simpler if the password in
3895 the local password file matches the AFS password, but it is not
3899 <primary>tokens</primary>
3901 <secondary>displaying for user</secondary>
3905 <primary>tokens</primary>
3907 <secondary>command</secondary>
3911 <primary>commands</primary>
3913 <secondary>tokens</secondary>
3917 <primary>listing</primary>
3919 <secondary>tokens held by issuer</secondary>
3923 <primary>commands</primary>
3925 <secondary>klog</secondary>
3929 <primary>klog command</primary>
3933 <primary>server process</primary>
3935 <secondary>creating ticket (tokens) for</secondary>
3939 <primary>tickets</primary>
3941 <secondary></secondary>
3947 <primary>tokens</primary>
3949 <secondary>creating for server process</secondary>
3953 <primary>authenticated identity</primary>
3955 <secondary>acquiring with klog command</secondary>
3959 <primary>unlog command</primary>
3963 <primary>commands</primary>
3965 <secondary>unlog</secondary>
3969 <primary>discarding</primary>
3971 <secondary>tokens</secondary>
3975 <primary>tokens</primary>
3977 <secondary>discarding with unlog command</secondary>
3981 <sect2 id="Header_81">
3982 <title>Obtaining, Displaying, and Discarding Tokens</title>
3984 <para>Once logged in, a user can obtain a token at any time with the
3985 <emphasis role="bold">klog</emphasis> command. If a valid token
3986 already exists, the new one overwrites it. If a PAG already exists,
3987 the new token is associated with it.</para>
3989 <para>By default, the <emphasis role="bold">klog</emphasis> command
3990 authenticates the issuer using the identity currently logged in to
3991 the local file system. To authenticate as a different identity, use
3992 the <emphasis role="bold">-principal</emphasis> argument. To obtain
3993 a token for a foreign cell, use the <emphasis
3994 role="bold">-cell</emphasis> argument (it can be combined with the
3995 <emphasis role="bold">-principal</emphasis> argument). See the
3996 OpenAFS User Guide and the entry for the <emphasis
3997 role="bold">klog</emphasis> command in the OpenAFS Administration
4000 <para>To discard either all tokens or the token for a particular
4001 cell, issue the <emphasis role="bold">unlog</emphasis> command. The
4002 command affects only the tokens associated with the current command
4003 shell. See the OpenAFS User Guideand the entry for the <emphasis
4004 role="bold">unlog</emphasis> command in the OpenAFS Administration
4007 <para>To display the tokens associated with the current command
4008 shell, issue the <emphasis role="bold">tokens</emphasis>
4009 command. The following examples illustrate its output in various
4012 <para>If the issuer is not authenticated in any cell:</para>
4015 % <emphasis role="bold">tokens</emphasis>
4016 Tokens held by the Cache Manager:
4020 <para>The following shows the output for a user with AFS UID 1000 in
4021 the ABC Corporation cell:</para>
4024 % <emphasis role="bold">tokens</emphasis>
4025 Tokens held by the Cache Manager:
4026 User's (AFS ID 1000) tokens for afs@abc.com [Expires Jun 2 10:00]
4030 <para>The following shows the output for a user who is authenticated
4031 in ABC Corporation cell, the State University cell and the DEF
4032 Company cell. The user has different AFS UIDs in the three
4033 cells. Tokens for the last cell are expired:</para>
4036 % <emphasis role="bold">tokens</emphasis>
4037 Tokens held by the Cache Manager:
4038 User's (AFS ID 1000) tokens for afs@abc.com [Expires Jun 2 10:00]
4039 User's (AFS ID 4286) tokens for afs@stateu.edu [Expires Jun 3 1:34]
4040 User's (AFS ID 22) tokens for afs@def.com [>>Expired<<]
4044 <para>The Kerberos version of the <emphasis
4045 role="bold">tokens</emphasis> command (the <emphasis
4046 role="bold">tokens.krb</emphasis> command), also reports information
4047 on the ticket-granting ticket, including the ticket's owner, the
4048 ticket-granting service, and the expiration date, as in the
4049 following example. Also see <link linkend="HDRWQ70">Support for
4050 Kerberos Authentication</link>.</para>
4053 % <emphasis role="bold">tokens.krb</emphasis>
4054 Tokens held by the Cache Manager:
4055 User's (AFS ID 1000) tokens for afs@abc.com [Expires Jun 2 10:00]
4056 User smith's tokens for krbtgt.ABC.COM@abc.com [Expires Jun 2 10:00]
4061 <sect2 id="Header_82">
4062 <title>Setting Default Token Lifetimes for Users</title>
4065 <primary>tokens</primary>
4067 <secondary>setting default lifetimes for users</secondary>
4070 <para>The maximum lifetime of a user token is the smallest of the
4071 ticket lifetimes recorded in the following three Authentication
4072 Database entries. The <emphasis role="bold">kas examine</emphasis>
4073 command reports the lifetime as <computeroutput>Max ticket
4074 lifetime</computeroutput>. Administrators who have the
4075 <computeroutput>ADMIN</computeroutput> flag on their Authentication
4076 Database entry can use the <emphasis
4077 role="bold">-lifetime</emphasis> argument to the <emphasis
4078 role="bold">kas setfields</emphasis> command to set an entry's
4082 <para>The <emphasis role="bold">afs</emphasis> entry, which
4083 corresponds to the AFS server processes. The default is 100
4088 <para>The <emphasis role="bold">krbtgt</emphasis>.cellname
4089 entry, which corresponds to the ticket-granting ticket used
4090 internally in generating the token. The default is 720 hours
4095 <para>The entry for the user of the AFS-modified login utility
4096 or issuer of the <emphasis role="bold">klog</emphasis>
4097 command. The default is 25 hours for user entries created
4098 using the AFS 3.1 or later version of the Authentication
4099 Server, and 100 hours for user entries created using the AFS
4100 3.0 version of the Authentication Server. A user can use the
4101 <emphasis role="bold">kas examine</emphasis> command to
4102 display his or her own Authentication Database entry.</para>
4108 <para>An AFS-modified login utility always grants a token with a
4109 lifetime calculated from the previously described three
4110 values. When issuing the <emphasis role="bold">klog</emphasis>
4111 command, a user can request a lifetime shorter than the default by
4112 using the <emphasis role="bold">-lifetime</emphasis> argument. For
4113 further information, see the OpenAFS User Guide and the <emphasis
4114 role="bold">klog</emphasis> reference page in the OpenAFS
4115 Administration Reference.</para>
4119 <sect2 id="Header_83">
4120 <title>Changing Passwords</title>
4123 <primary>password</primary>
4125 <secondary>changing in AFS</secondary>
4129 <primary>kpasswd command</primary>
4133 <primary>commands</primary>
4135 <secondary>kpasswd</secondary>
4139 <primary>kas commands</primary>
4141 <secondary>setpassword</secondary>
4145 <primary>commands</primary>
4147 <secondary>kas setpassword</secondary>
4150 <para>Regular AFS users can change their own passwords by using
4151 either the <emphasis role="bold">kpasswd</emphasis> or <emphasis
4152 role="bold">kas setpassword</emphasis> command. The commands prompt
4153 for the current password and then twice for the new password, to
4154 screen out typing errors.</para>
4156 <para>Administrators who have the
4157 <computeroutput>ADMIN</computeroutput> flag on their Authentication
4158 Database entries can change any user's password, either by using the
4159 <emphasis role="bold">kpasswd</emphasis> command (which requires
4160 knowing the current password) or the <emphasis role="bold">kas
4161 setpassword</emphasis> command.</para>
4163 <para>If your cell does not use an AFS-modified login utility,
4164 remember also to change the local password, using the operating
4165 system's password-changing command. For more instructions on
4166 changing passwords, see <link linkend="HDRWQ516">Changing AFS
4167 Passwords</link>.</para>
4170 <sect2 id="Header_84">
4171 <title>Imposing Restrictions on Passwords and Authentication
4174 <para>You can help to make your cell more secure by imposing
4175 restrictions on user passwords and authentication attempts. To
4176 impose the restrictions as you create an account, use the <emphasis
4177 role="bold">A</emphasis> instruction in the <emphasis
4178 role="bold">uss</emphasis> template file as described in <link
4179 linkend="HDRWQ478">Increasing Account Security with the A
4180 Instruction</link>. To set or change the values on an existing
4181 account, use the <emphasis role="bold">kas setfields</emphasis>
4182 command as described in <link linkend="HDRWQ515">Improving Password
4183 and Authentication Security</link>.</para>
4186 <primary>password</primary>
4188 <secondary>expiration</secondary>
4192 <primary>password</primary>
4194 <secondary>lifetime</secondary>
4198 <primary>kas commands</primary>
4200 <secondary>setfields</secondary>
4204 <primary>commands</primary>
4206 <secondary>kas setfields</secondary>
4210 <primary>Authentication Database</primary>
4212 <secondary>password lifetime, setting</secondary>
4216 <primary>password</primary>
4218 <secondary>restricting reuse</secondary>
4221 <para>By default, AFS passwords never expire. Limiting password
4222 lifetime can help improve security by decreasing the time the
4223 password is subject to cracking attempts. You can choose an lifetime
4224 from 1 to 254 days after the password was last changed. It
4225 automatically applies to each new password as it is set. When the
4226 user changes passwords, you can also insist that the new password is
4227 not similar to any of the 20 passwords previously used.</para>
4230 <primary>password</primary>
4232 <secondary>consequences of multiple failed authentication
4233 attempts</secondary>
4237 <primary>kas commands</primary>
4239 <secondary>setfields</secondary>
4243 <primary>commands</primary>
4245 <secondary>kas setfields</secondary>
4249 <primary>authentication</primary>
4251 <secondary>consequences of multiple failures</secondary>
4254 <para>Unscrupulous users can try to gain access to your AFS cell by
4255 guessing an authorized user's password. To protect against this type
4256 of attack, you can limit the number of times that a user can
4257 consecutively fail to provide the correct password. When the limit
4258 is exceeded, the authentication service refuses further
4259 authentication attempts for a specified period of time (the lockout
4260 time). To reenable authentication attempts before the lockout time
4261 expires, an administrator must issue the <emphasis role="bold">kas
4262 unlock</emphasis> command.</para>
4265 <primary>password</primary>
4267 <secondary>checking quality of</secondary>
4271 <primary>kpasswd command</primary>
4275 <primary>commands</primary>
4277 <secondary>kpasswd</secondary>
4281 <primary>kas commands</primary>
4283 <secondary>setpassword</secondary>
4287 <primary>kpwvalid program</primary>
4290 <para>In addition to settings on user's authentication accounts, you
4291 can improve security by automatically checking the quality of new
4292 user passwords. The <emphasis role="bold">kpasswd</emphasis> and
4293 <emphasis role="bold">kas setpassword</emphasis> commands pass the
4294 proposed password to a program or script called <emphasis
4295 role="bold">kpwvalid</emphasis>, if it exists. The <emphasis
4296 role="bold">kpwvalid</emphasis> performs quality checks and returns
4297 a code to indicate whether the password is acceptable. You can
4298 create your own program or modified the sample program included in
4299 the AFS distribution. See the <emphasis
4300 role="bold">kpwvalid</emphasis> reference page in the OpenAFS
4301 Administration Reference.</para>
4303 <para>There are several types of quality checks that can improve
4307 <para>The password is a minimum length</para>
4311 <para>The password is not a word</para>
4315 <para>The password contains both numbers and letters</para>
4321 <sect2 id="HDRWQ70">
4322 <title>Support for Kerberos Authentication</title>
4325 <primary>Kerberos</primary>
4327 <secondary>support for in AFS</secondary>
4331 <primary>commands</primary>
4333 <secondary>klog.krb</secondary>
4337 <primary>commands</primary>
4339 <secondary>pagsh.krb</secondary>
4343 <primary>commands</primary>
4345 <secondary>tokens.krb</secondary>
4349 <primary>klog.krb command</primary>
4353 <primary>pagsh.krb command</primary>
4357 <primary>tokens.krb command</primary>
4360 <para>If your site is using standard Kerberos authentication rather
4361 than the AFS Authentication Server, use the modified versions of the
4362 <emphasis role="bold">klog</emphasis>, <emphasis
4363 role="bold">pagsh</emphasis>, and <emphasis
4364 role="bold">tokens</emphasis> commands that support Kerberos
4365 authentication. The binaries for the modified version of these
4366 commands have the same name as the standard binaries with the
4367 addition of a <emphasis role="bold">.krb</emphasis>
4370 <para>Use either the Kerberos version or the standard command
4371 throughout the cell; do not mix the two versions. AFS Product
4372 Support can provide instructions on installing the Kerberos version
4373 of these four commands. For information on the differences between
4374 the two versions of these commands, see the OpenAFS Administration
4378 <sect1 id="HDRWQ71">
4379 <title>Security and Authorization in AFS</title>
4381 <para>AFS incorporates several features to ensure that only authorized
4382 users gain access to data. This section summarizes the most important
4383 of them and suggests methods for improving security in your
4386 <sect2 id="HDRWQ72">
4387 <title>Some Important Security Features</title>
4390 <primary>security</primary>
4392 <secondary>AFS features</secondary>
4396 <primary>AFS</primary>
4398 <secondary>security features</secondary>
4402 <title>ACLs on Directories</title>
4404 <para>Files in AFS are protected by the access control list (ACL)
4405 associated with their parent directory. The ACL defines which
4406 users or groups can access the data in the directory, and in what
4407 way. See <link linkend="HDRWQ562">Managing Access Control
4408 Lists</link>.</para>
4412 <title>Mutual Authentication Between Client and Server</title>
4414 <para>When an AFS client and server process communicate, each
4415 requires the other to prove its identity during mutual
4416 authentication, which involves the exchange of encrypted
4417 information that only valid parties can decrypt and respond
4418 to. For a detailed description of the mutual authentication
4419 process, see <link linkend="HDRWQ75">A More Detailed Look at
4420 Mutual Authentication</link>.</para>
4423 <para>AFS server processes mutually authenticate both with one
4424 another and with processes that represent human users. After mutual
4425 authentication is complete, the server and client have established
4426 an authenticated connection, across which they can communicate
4427 repeatedly without having to authenticate again until the connection
4428 expires or one of the parties closes it. Authenticated connections
4429 have varying lifetimes.</para>
4432 <title>Tokens</title>
4434 <para>In order to access AFS files, users must prove their
4435 identities to the AFS authentication service by providing the
4436 correct AFS password. If the password is correct, the
4437 authentication service sends the user a token as evidence of
4438 authenticated status. See <link linkend="HDRWQ63">Login and
4439 Authentication in AFS</link>.</para>
4442 <para>Servers assign the user identity <emphasis
4443 role="bold">anonymous</emphasis> to users and processes that do not
4444 have a valid token. The <emphasis role="bold">anonymous</emphasis>
4445 identity has only the access granted to the <emphasis
4446 role="bold">system:anyuser</emphasis> group on ACLs.</para>
4449 <title>Authorization Checking</title>
4451 <para>Mutual authentication establishes that two parties
4452 communicating with one another are actually who they claim to be.
4453 For many functions, AFS server processes also check that the
4454 client whose identity they have verified is also authorized to
4455 make the request. Different requests require different kinds of
4456 privilege. See <link linkend="HDRWQ73">Three Types of
4457 Privilege</link>.</para>
4461 <title>Encrypted Network Communications</title>
4464 <primary>network</primary>
4466 <secondary>encrypted communication in AFS</secondary>
4470 <primary>encrypted network communication</primary>
4474 <primary>security</primary>
4476 <secondary>encrypted network communication</secondary>
4479 <para>The AFS server processes encrypt particularly sensitive
4480 information before sending it back to clients. Even if an
4481 unauthorized party is able to eavesdrop on an authenticated
4482 connection, they cannot decipher encrypted data without the proper
4486 <para>The following AFS commands encrypt data because they involve
4487 server encryption keys and passwords:
4490 <para>The <emphasis role="bold">bos addkey</emphasis> command,
4491 which adds a server encryption key to the <emphasis
4492 role="bold">/usr/afs/etc/KeyFile</emphasis> file</para>
4496 <para>The <emphasis role="bold">bos listkeys</emphasis>
4497 command, which lists the server encryption keys from the
4498 <emphasis role="bold">/usr/afs/etc/KeyFile</emphasis>
4503 <para>The <emphasis role="bold">kpasswd</emphasis> command,
4504 which changes a password in the Authentication Database</para>
4508 <para>Most commands in the <emphasis
4509 role="bold">kas</emphasis> command suite</para>
4514 <para>In addition, the United States edition of the Update Server
4515 encrypts sensitive information (such as the contents of <emphasis
4516 role="bold">KeyFile</emphasis>) when distributing it. Other commands
4517 in the <emphasis role="bold">bos</emphasis> suite and the commands
4518 in the <emphasis role="bold">fs</emphasis>, <emphasis
4519 role="bold">pts</emphasis> and <emphasis role="bold">vos</emphasis>
4520 suites do not encrypt data before transmitting it.</para>
4523 <sect2 id="HDRWQ73">
4524 <title>Three Types of Privilege</title>
4526 <para>AFS uses three separate types of privilege for the reasons
4527 discussed in <link linkend="HDRWQ585">The Reason for Separate
4531 <para>Membership in the <emphasis
4532 role="bold">system:administrators</emphasis> group. Members
4533 are entitled to issue any <emphasis role="bold">pts</emphasis>
4534 command and those <emphasis role="bold">fs</emphasis> commands
4535 that set volume quota. By default, they also implicitly have
4536 the <emphasis role="bold">a</emphasis> (<emphasis
4537 role="bold">administer</emphasis>) and <emphasis
4538 role="bold">l</emphasis> (<emphasis
4539 role="bold">lookup</emphasis>) permissions on every ACL in the
4540 file tree even if the ACL does not include an entry for
4545 <para>The <computeroutput>ADMIN</computeroutput> flag on the
4546 Authentication Database entry. An administrator with this flag
4547 can issue any <emphasis role="bold">kas</emphasis>
4552 <para>Inclusion in the <emphasis
4553 role="bold">/usr/afs/etc/UserList</emphasis> file. An
4554 administrator whose username appears in this file can issue
4555 any <emphasis role="bold">bos</emphasis>, <emphasis
4556 role="bold">vos</emphasis>, or <emphasis
4557 role="bold">backup</emphasis> command (although some <emphasis
4558 role="bold">backup</emphasis> commands require additional
4559 privilege as described in <link linkend="HDRWQ260">Granting
4560 Administrative Privilege to Backup Operators</link>).</para>
4566 <sect2 id="Header_89">
4567 <title>Authorization Checking versus Authentication</title>
4569 <para>AFS distinguishes between authentication and authorization
4570 checking. Authentication refers to the process of proving
4571 identity. Authorization checking refers to the process of verifying
4572 that an authenticated identity is allowed to perform a certain
4575 <para>AFS implements authentication at the level of
4576 connections. Each time two parties establish a new connection, they
4577 mutually authenticate. In general, each issue of an AFS command
4578 establishes a new connection between AFS server process and
4581 <para>AFS implements authorization checking at the level of server
4582 machines. If authorization checking is enabled on a server machine,
4583 then all of the server processes running on it provide services only
4584 to authorized users. If authorization checking is disabled on a
4585 server machine, then all of the server processes perform any action
4586 for anyone. Obviously, disabling authorization checking is an
4587 extreme security exposure. For more information, see <link
4588 linkend="HDRWQ123">Managing Authentication and Authorization
4589 Requirements</link>.</para>
4592 <sect2 id="HDRWQ74">
4593 <title>Improving Security in Your Cell</title>
4596 <primary>security</primary>
4598 <secondary>suggestions for improving</secondary>
4601 <para>You can improve the level of security in your cell by
4602 configuring user accounts, server machines, and system administrator
4603 accounts in the indicated way.</para>
4606 <title>User Accounts</title>
4611 <para>Use an AFS-modified login utility, or include the
4612 <emphasis role="bold">-setpag</emphasis> flag to the
4613 <emphasis role="bold">klog</emphasis> command, to associate
4614 the credential structure that houses tokens with a PAG
4615 rather than a UNIX UID. This prevents users from inheriting
4616 someone else's tokens by assuming their UNIX identity. For
4617 further discussion, see <link linkend="HDRWQ64">Identifying
4618 AFS Tokens by PAG</link>.</para>
4622 <para>Encourage users to issue the <emphasis
4623 role="bold">unlog</emphasis> command to destroy their tokens
4624 before logging out. This forestalls attempts to access
4625 tokens left behind kernel memory. Consider including the
4626 <emphasis role="bold">unlog</emphasis> command in every
4627 user's <emphasis role="bold">.logout</emphasis> file or
4635 <title>Server Machines</title>
4640 <para>Disable authorization checking only in emergencies or
4641 for very brief periods of time. It is best to work at the
4642 console of the affected machine during this time, to prevent
4643 anyone else from accessing the machine through the
4648 <para>Change the AFS server encryption key on a frequent and
4649 regular schedule. Make it difficult to guess (a long string
4650 including nonalphabetic characters, for instance). Unlike
4651 user passwords, the password from which the AFS key is
4652 derived can be longer than eight characters, because it is
4653 never used during login. The <emphasis role="bold">kas
4654 setpassword</emphasis> command accepts a password hundreds
4655 of characters long. For instructions, see <link
4656 linkend="HDRWQ355">Managing Server Encryption
4661 <para>As much as possible, limit the number of people who
4662 can login at a server machine's console or remotely.
4663 Imposing this limit is an extra security precaution rather
4664 than a necessity. The machine cannot serve as an AFS client
4665 in this case.</para>
4669 <para>Particularly limit access to the local superuser
4670 <emphasis role="bold">root</emphasis> account on a server
4671 machine. The local superuser <emphasis
4672 role="bold">root</emphasis> has free access to important
4673 administrative subdirectories of the <emphasis
4674 role="bold">/usr/afs</emphasis> directory, as described in
4675 <link linkend="HDRWQ53">AFS Files on the Local
4679 <primary>root superuser</primary>
4681 <secondary>limiting logins</secondary>
4686 <para>As in any computing environment, server machines must
4687 be located in a secured area. Any other security measures
4688 are effectively worthless if unauthorized people can access
4689 the computer hardware.</para>
4696 <title>System Administrators</title>
4701 <para>Limit the number of system administrators in your
4702 cell. Limit the use of system administrator accounts on
4703 publicly accessible workstations. Such machines are not
4704 secure, so unscrupulous users can install programs that try
4705 to steal tokens or passwords. If administrators must use
4706 publicly accessible workstations at times, they must issue
4707 the <emphasis role="bold">unlog</emphasis> command before
4708 leaving the machine.</para>
4712 <para>Create an administrative account for each
4713 administrator separate from the personal account, and assign
4714 AFS privileges only to the administrative account. The
4715 administrators must authenticate to the administrative
4716 accounts to perform duties that require privilege, which
4717 provides a useful audit trail as well.</para>
4721 <para>Administrators must not leave a machine unattended
4722 while they have valid tokens. Issue the <emphasis
4723 role="bold">unlog</emphasis> command before leaving.</para>
4727 <para>Use the <emphasis role="bold">-lifetime</emphasis>
4728 argument to the <emphasis role="bold">kas
4729 setfields</emphasis> command to set the token lifetime for
4730 administrative accounts to a fairly short amount of time.
4731 The default lifetime for AFS tokens is 25 hours, but 30 or
4732 60 minutes is possibly a more reasonable lifetime for
4733 administrative tokens. The tokens for administrators who
4734 initiate AFS Backup System operations must last somewhat
4735 longer, because it can take several hours to complete some
4736 dump operations, depending on the speed of the tape device
4737 and the network connecting it to the file server machines
4738 that house the volumes is it accessing.</para>
4742 <para>Limit administrators' use of the <emphasis
4743 role="bold">telnet</emphasis> program. It sends unencrypted
4744 passwords across the network. Similarly, limit use of other
4745 remote programs such as <emphasis role="bold">rsh</emphasis>
4746 and <emphasis role="bold">rcp</emphasis>, which send
4747 unencrypted tokens across the network.</para>
4754 <sect2 id="HDRWQ75">
4755 <title>A More Detailed Look at Mutual Authentication</title>
4758 <primary>mutual authentication</primary>
4762 <primary>distributed file system</primary>
4764 <secondary>security issues</secondary>
4768 <primary>shared secret</primary>
4772 <primary>server encryption key</primary>
4774 <secondary>defined</secondary>
4777 <para>As in any file system, security is a prime concern in AFS. A
4778 file system that makes file sharing easy is not useful if it makes
4779 file sharing mandatory, so AFS incorporates several features that
4780 prevent unauthorized users from accessing data. Security in a
4781 networked environment is difficult because almost all procedures
4782 require transmission of information across wires that almost anyone
4783 can tap into. Also, many machines on networks are powerful enough
4784 that unscrupulous users can monitor transactions or even intercept
4785 transmissions and fake the identity of one of the
4786 participants.</para>
4788 <para>The most effective precaution against eavesdropping and
4789 information theft or fakery is for servers and clients to accept the
4790 claimed identity of the other party only with sufficient proof. In
4791 other words, the nature of the network forces all parties on the
4792 network to assume that the other party in a transaction is not
4793 genuine until proven so. Mutual authentication is the means through
4794 which parties prove their genuineness.</para>
4796 <para>Because the measures needed to prevent fakery must be quite
4797 sophisticated, the implementation of mutual authentication
4798 procedures is complex. The underlying concept is simple, however:
4799 parties prove their identities by demonstrating knowledge of a
4800 shared secret. A shared secret is a piece of information known only
4801 to the parties who are mutually authenticating (they can sometimes
4802 learn it in the first place from a trusted third party or some other
4803 source). The party who originates the transaction presents the
4804 shared secret and refuses to accept the other party as valid until
4805 it shows that it knows the secret too.</para>
4807 <para>The most common form of shared secret in AFS transactions is
4808 the encryption key, also referred to simply as a key. The two
4809 parties use their shared key to encrypt the packets of information
4810 they send and to decrypt the ones they receive. Encryption using
4811 keys actually serves two related purposes. First, it protects
4812 messages as they cross the network, preventing anyone who does not
4813 know the key from eavesdropping. Second, ability to encrypt and
4814 decrypt messages successfully indicates that the parties are using
4815 the key (it is their shared secret). If they are using different
4816 keys, messages remain scrambled and unintelligible after
4819 <para>The following sections describe AFS's mutual authentication
4820 procedures in more detail. Feel free to skip these sections if you
4821 are not interested in the mutual authentication process.</para>
4823 <sect3 id="Header_92">
4824 <title>Simple Mutual Authentication</title>
4826 <para>Simple mutual authentication involves only one encryption
4827 key and two parties, generally a client and server. The client
4828 contacts the server by sending a challenge message encrypted with
4829 a key known only to the two of them. The server decrypts the
4830 message using its key, which is the same as the client's if they
4831 really do share the same secret. The server responds to the
4832 challenge and uses its key to encrypt its response. The client
4833 uses its key to decrypt the server's response, and if it is
4834 correct, then the client can be sure that the server is genuine:
4835 only someone who knows the same key as the client can decrypt the
4836 challenge and answer it correctly. On its side, the server
4837 concludes that the client is genuine because the challenge message
4838 made sense when the server decrypted it.</para>
4840 <para>AFS uses simple mutual authentication to verify user
4841 identities during the first part of the login procedure. In that
4842 case, the key is based on the user's password.</para>
4845 <sect3 id="HDRWQ76">
4846 <title>Complex Mutual Authentication</title>
4848 <para>Complex mutual authentication involves three encryption keys
4849 and three parties. All secure AFS transactions (except the first
4850 part of the login process) employ complex mutual
4851 authentication.</para>
4854 <primary>ticket-granter</primary>
4858 <primary>server encryption key</primary>
4862 <primary>tokens</primary>
4864 <secondary>data in</secondary>
4867 <para>When a client wishes to communicate with a server, it first
4868 contacts a third party called a ticket-granter. The ticket-granter
4869 and the client mutually authenticate using the simple
4870 procedure. When they finish, the ticket-granter gives the client a
4871 server ticket (or simply ticket) as proof that it (the
4872 ticket-granter) has preverified the identity of the client. The
4873 ticket-granter encrypts the ticket with the first of the three
4874 keys, called the server encryption key because it is known only to
4875 the ticket-granter and the server the client wants to contact. The
4876 client does not know this key.</para>
4878 <para>The ticket-granter sends several other pieces of information
4879 along with the ticket. They enable the client to use the ticket
4880 effectively despite being unable to decrypt the ticket
4881 itself. Along with the ticket, the items constitute a token:
4884 <para>A session key, which is the second encryption key
4885 involved in mutual authentication. The ticket-granter
4886 invents the session key at random as the shared secret
4887 between client and server. For reasons explained further
4888 below, the ticket-granter also puts a copy of the session
4889 key inside the ticket. The client and server use the session
4890 key to encrypt messages they send to one another during
4891 their transactions. The ticket-granter invents a different
4892 session key for each connection between a client and a
4893 server (there can be several transactions during a single
4897 <primary>session key</primary>
4902 <para>The name of the server for which the ticket is valid
4903 (and so which server encryption key encrypts the ticket
4908 <para>A ticket lifetime indicator. The default lifetime of
4909 AFS server tickets is 100 hours. If the client wants to
4910 contact the server again after the ticket expires, it must
4911 contact the ticket-granter to get a new ticket.</para>
4916 <para>The ticket-granter seals the entire token with the third key
4917 involved in complex mutual authentication--the key known only to
4918 it (the ticket-granter) and the client. In some cases, this third
4919 key is derived from the password of the human user whom the client
4922 <para>Now that the client has a valid server ticket, it is ready
4923 to contact the server. It sends the server two things:
4926 <para>The server ticket. This is encrypted with the server
4927 encryption key.</para>
4931 <para>Its request message, encrypted with the session
4932 key. Encrypting the message protects it as it crosses the
4933 network, since only the server/client pair for whom the
4934 ticket-granter invented the session key know it.</para>
4939 <para>At this point, the server does not know the session key,
4940 because the ticket-granter just created it. However, the
4941 ticket-granter put a copy of the session key inside the
4942 ticket. The server uses the server encryption key to decrypts the
4943 ticket and learns the session key. It then uses the session key to
4944 decrypt the client's request message. It generates a response and
4945 sends it to the client. It encrypts the response with the session
4946 key to protect it as it crosses the network.</para>
4948 <para>This step is the heart of mutual authentication between
4949 client and server, because it proves to both parties that they
4950 know the same secret:
4953 <para>The server concludes that the client is authorized to
4954 make a request because the request message makes sense when
4955 the server decrypts it using the session key. If the client
4956 uses a different session key than the one the server finds
4957 inside the ticket, then the request message remains
4958 unintelligible even after decryption. The two copies of the
4959 session key (the one inside the ticket and the one the
4960 client used) can only be the same if they both came from the
4961 ticket-granter. The client cannot fake knowledge of the
4962 session key because it cannot look inside the ticket, sealed
4963 as it is with the server encryption key known only to the
4964 server and the ticket-granter. The server trusts the
4965 ticket-granter to give tokens only to clients with whom it
4966 (the ticket-granter) has authenticated, so the server
4967 decides the client is legitimate.</para>
4969 <para>(Note that there is no direct communication between
4970 the ticket-granter and the server, even though their
4971 relationship is central to ticket-based mutual
4972 authentication. They interact only indirectly, via the
4973 client's possession of a ticket sealed with their shared
4978 <para>The client concludes that the server is genuine and
4979 trusts the response it gets back from the server, because
4980 the response makes sense after the client decrypts it using
4981 the session key. This indicates that the server encrypted
4982 the response with the same session key as the client
4983 knows. The only way for the server to learn that matching
4984 session key is to decrypt the ticket first. The server can
4985 only decrypt the ticket because it shares the secret of the
4986 server encryption key with the ticket-granter. The client
4987 trusts the ticket-granter to give out tickets only for
4988 legitimate servers, so the client accepts a server that can
4989 decrypt the ticket as genuine, and accepts its
4998 <sect1 id="HDRWQ77">
4999 <title>Backing Up AFS Data</title>
5001 <para>AFS provides two related facilities that help the administrator
5002 back up AFS data: backup volumes and the AFS Backup System.</para>
5004 <sect2 id="Header_95">
5005 <title>Backup Volumes</title>
5007 <para>The first facility is the backup volume, which you create by
5008 cloning a read/write volume. The backup volume is read-only and so
5009 preserves the state of the read/write volume at the time the clone
5012 <para>Backup volumes can ease administration if you mount them in
5013 the file system and make their contents available to users. For
5014 example, it often makes sense to mount the backup version of each
5015 user volume as a subdirectory of the user's home directory. A
5016 conventional name for this mount point is <emphasis
5017 role="bold">OldFiles</emphasis>. Create a new version of the backup
5018 volume (that is, reclone the read/write) once a day to capture any
5019 changes that were made since the previous backup. If a user
5020 accidentally removes or changes data, the user can restore it from
5021 the backup volume, rather than having to ask you to restore
5024 <para>The OpenAFS User Guide does not mention backup volumes, so
5025 regular users do not know about them if you decide not to use
5026 them. This implies that if you <emphasis role="bold">do</emphasis>
5027 make backup versions of user volumes, you need to tell your users
5028 about how the backup works and where you have mounted it.</para>
5030 <para>Users are often concerned that the data in a backup volume
5031 counts against their volume quota and some of them even want to
5032 remove the <emphasis role="bold">OldFiles</emphasis> mount point. It
5033 does not, because the backup volume is a separate volume. The only
5034 amount of space it uses in the user's volume is the amount needed
5035 for the mount point, which is about the same as the amount needed
5036 for a standard directory element.</para>
5038 <para>Backup volumes are discussed in detail in <link
5039 linkend="HDRWQ201">Creating Backup Volumes</link>.</para>
5042 <sect2 id="Header_96">
5043 <title>The AFS Backup System</title>
5045 <para>Backup volumes can reduce restoration requests, but they
5046 reside on disk and so do not protect data from loss due to hardware
5047 failure. Like any file system, AFS is vulnerable to this sort of
5050 <para>To protect your cell's users from permanent loss of data, you
5051 are strongly urged to back up your file system to tape on a regular
5052 and frequent schedule. The AFS Backup System is available to ease
5053 the administration and performance of backups. For detailed
5054 information about the AFS Backup System, see <link
5055 linkend="HDRWQ248">Configuring the AFS Backup System</link> and
5056 <link linkend="HDRWQ283">Backing Up and Restoring AFS
5061 <sect1 id="HDRWQ79">
5062 <title>Accessing AFS through NFS</title>
5064 <para>Users of NFS client machines can access the AFS filespace by
5065 mounting the <emphasis role="bold">/afs</emphasis> directory of an AFS
5066 client machine that is running the NFS/AFS Translator. This is a
5067 particular advantage in cells already running NFS who want to access
5068 AFS using client machines for which AFS is not available. See <link
5069 linkend="HDRWQ595">Appendix A, Managing the NFS/AFS
5070 Translator</link>.</para>