1 <?xml version="1.0" encoding="UTF-8"?>
3 <title>Installing the First AFS Machine</title>
7 <primary>file server machine</primary>
9 <seealso>first AFS machine</seealso>
11 <seealso>file server machine, additional</seealso>
15 <primary>instructions</primary>
17 <secondary>first AFS machine</secondary>
21 <primary>installing</primary>
23 <secondary>first AFS machine</secondary>
26 This chapter describes how to install the first AFS machine in your cell, configuring it as both a file server machine and a
27 client machine. After completing all procedures in this chapter, you can remove the client functionality if you wish, as described
28 in <link linkend="HDRWQ98">Removing Client Functionality</link>.</para>
30 <para>To install additional file server machines after completing this chapter, see <link linkend="HDRWQ99">Installing Additional
31 Server Machines</link>.</para>
33 <para>To install additional client machines after completing this chapter, see <link linkend="HDRWQ133">Installing Additional
34 Client Machines</link>. <indexterm>
35 <primary>requirements</primary>
37 <secondary>first AFS machine</secondary>
40 <sect1 id="Header_29">
41 <title>Requirements and Configuration Decisions</title>
43 <para>The instructions in this chapter assume that you meet the following requirements.
46 <para>You are logged onto the machine's console as the local superuser <emphasis role="bold">root</emphasis></para>
50 <para>A standard version of one of the operating systems supported by the current version of AFS is running on the
55 <para>You have either installed the provided OpenAFS packages for
56 your system, have access to a binary distribution tarball, or have
57 successfully built OpenAFS from source</para>
61 <para>You have a Kerberos v5 realm running for your site. If you are
62 working with an existing cell which uses legacy
63 <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for
64 authentication, please see
65 <link linkend="KAS001">kaserver and Legacy Kerberos v4 Authentication</link>
66 for the modifications required to this installation procedure.</para>
70 <para>You have NTP or a similar time service deployed to ensure
71 rough clock syncronistation between your clients and servers.</para>
73 </itemizedlist></para>
75 <para>You must make the following configuration decisions while installing the first AFS machine. To speed the installation
76 itself, it is best to make the decisions before beginning. See the chapter in the <emphasis>OpenAFS Administration
77 Guide</emphasis> about issues in cell administration and configuration for detailed guidelines. <indexterm>
78 <primary>cell name</primary>
80 <secondary>choosing</secondary>
81 </indexterm> <indexterm>
82 <primary>AFS filespace</primary>
84 <secondary>deciding how to configure</secondary>
85 </indexterm> <indexterm>
86 <primary>filespace</primary>
88 <see>AFS filespace</see>
89 </indexterm> <itemizedlist>
91 <para>Select the first AFS machine</para>
95 <para>Select the cell name</para>
99 <para>Decide which partitions or logical volumes to configure as AFS server partitions, and choose the directory names on
100 which to mount them</para>
104 <para>Decide how big to make the client cache</para>
108 <para>Decide how to configure the top levels of your cell's AFS filespace</para>
110 </itemizedlist></para>
112 <para>This chapter is divided into three large sections corresponding to the three parts of installing the first AFS machine.
113 Perform all of the steps in the order they appear. Each functional section begins with a summary of the procedures to perform.
114 The sections are as follows: <itemizedlist>
116 <para>Installing server functionality (begins in <link linkend="HDRWQ18">Overview: Installing Server
117 Functionality</link>)</para>
121 <para>Installing client functionality (begins in <link linkend="HDRWQ63">Overview: Installing Client
122 Functionality</link>)</para>
126 <para>Configuring your cell's filespace, establishing further security mechanisms, and enabling access to foreign cells
127 (begins in <link linkend="HDRWQ71">Overview: Completing the Installation of the First AFS Machine</link>)</para>
129 </itemizedlist></para>
132 <primary>overview</primary>
134 <secondary>installing server functionality on first AFS machine</secondary>
138 <primary>first AFS machine</primary>
140 <secondary>server functionality</secondary>
144 <primary>installing</primary>
146 <secondary>server functionality</secondary>
148 <tertiary>first AFS machine</tertiary>
153 <title>Overview: Installing Server Functionality</title>
155 <para>In the first phase of installing your cell's first AFS machine, you install file server and database server functionality
156 by performing the following procedures:
159 <para>Choose which machine to install as the first AFS machine</para>
163 <para>Create AFS-related directories on the local disk</para>
167 <para>Incorporate AFS modifications into the machine's kernel</para>
171 <para>Configure partitions or logical volumes for storing AFS volumes</para>
175 <para>On some system types (very rare), install and configure
176 an AFS-modified version of the <emphasis role="bold">fsck</emphasis>
181 <para>If the machine is to remain a client machine, incorporate AFS into its authentication system</para>
185 <para>Start the Basic OverSeer (BOS) Server</para>
189 <para>Define the cell name and the machine's cell membership</para>
193 <para>Start the database server processes: Backup Server, Protection Server, and Volume Location
198 <para>Configure initial security mechanisms</para>
202 <para>Start the <emphasis role="bold">fs</emphasis> process, which incorporates three component processes: the File
203 Server, Volume Server, and Salvager</para>
207 <para>Optionally, start the server portion of the Update Server</para>
210 </orderedlist></para>
214 <title>Choosing the First AFS Machine</title>
216 <para>The first AFS machine you install must have sufficient disk space to store AFS volumes.
217 When you later install additional file server
218 machines in your cell, you can distribute these volumes among the different machines as you see fit.</para>
220 <para>These instructions configure the first AFS machine as a <emphasis>database server machine</emphasis>, and optionally as the <emphasis>binary
221 distribution machine</emphasis> for its system type and the cell's <emphasis>system control machine</emphasis>. For a
222 description of these roles, see the <emphasis>OpenAFS Administration Guide</emphasis>.</para>
224 <para>Installation of additional machines is simplest if the first machine has the lowest IP address of any database server
225 machine you currently plan to install. If you later install database server functionality on a machine with a lower IP address,
226 you must first update the <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file on all of your cell's client machines.
227 For more details, see <link linkend="HDRWQ114">Installing Database Server Functionality</link>.</para>
230 <sect1 id="Header_32">
231 <title>Creating AFS Directories</title>
234 <primary>usr/afs directory</primary>
236 <secondary>first AFS machine</secondary>
240 <primary>first AFS machine</primary>
242 <secondary>/usr/afs directory</secondary>
246 <primary>creating</primary>
248 <secondary>/usr/afs directory</secondary>
250 <tertiary>first AFS machine</tertiary>
254 <primary>usr/vice/etc directory</primary>
256 <secondary>first AFS machine</secondary>
260 <primary>first AFS machine</primary>
262 <secondary>/usr/vice/etc directory</secondary>
266 <primary>creating</primary>
268 <secondary>/usr/vice/etc directory</secondary>
270 <tertiary>first AFS machine</tertiary>
274 <primary>/ as start to file and directory names</primary>
276 <secondary>see alphabetized entries without initial slash</secondary>
279 <para>If you are installing from packages (such as Debian .deb or
280 Fedora/SuSe .rpm files), you should now install all of the available
281 OpenAFS packages for your system type. Typically, these will include
282 packages for client and server functionality, and a seperate package
283 containing a suitable kernel module for your running kernel. Consult
284 the package lists on the OpenAFS website to determine the packages
285 appropriate for your system. The preparer of such packages may
286 have included some helper scripts to partially automate the
287 creation of a new cell; such scripts can supersede much of the
288 procedures described in the rest of this document.</para>
290 <para>If you are installing from a tarfile, or from a locally compiled
291 source tree you should create the <emphasis role="bold">/usr/afs</emphasis>
292 and <emphasis role="bold">/usr/vice/etc</emphasis> directories on the
293 local disk, to house server and client files respectively. Subsequent
294 instructions copy files from the distribution tarfile into them. </para>
296 # <emphasis role="bold">mkdir /usr/afs</emphasis>
297 # <emphasis role="bold">mkdir /usr/vice</emphasis>
298 # <emphasis role="bold">mkdir /usr/vice/etc</emphasis>
303 <title>Performing Platform-Specific Procedures</title>
305 <para>Several of the initial procedures for installing a file server machine differ for each system type. For convenience, the
306 following sections group them together for each system type: <itemizedlist>
308 <primary>kernel extensions</primary>
310 <see>AFS kernel extensions</see>
314 <primary>loading AFS kernel extensions</primary>
316 <see>incorporating</see>
320 <primary>building</primary>
322 <secondary>AFS extensions into kernel</secondary>
324 <see>incorporating AFS kernel extensions</see>
328 <para>Incorporate AFS modifications into the kernel.</para>
330 <para>The kernel on every AFS client machine and, on some systems,
331 the AFS fileservers, must incorporate AFS extensions. On machines
332 that use a dynamic kernel module loader, it is conventional to
333 alter the machine's initialization script to load the AFS extensions
334 at each reboot. The preparer of OS-format binary packages
335 may have included an init script which automates the loading
336 of the needed kernel module, eliminating a need to manually
337 configure this step. <indexterm>
338 <primary>AFS server partition</primary>
340 <secondary>mounted on /vicep directory</secondary>
341 </indexterm> <indexterm>
342 <primary>partition</primary>
344 <see>AFS server partition</see>
345 </indexterm> <indexterm>
346 <primary>logical volume</primary>
348 <see>AFS server partition</see>
349 </indexterm> <indexterm>
350 <primary>requirements</primary>
352 <secondary>AFS server partition name and location</secondary>
353 </indexterm> <indexterm>
354 <primary>naming conventions for AFS server partition</primary>
355 </indexterm> <indexterm>
356 <primary>vicep<emphasis>xx</emphasis> directory</primary>
358 <see>AFS server partition</see>
359 </indexterm> <indexterm>
360 <primary>directories</primary>
362 <secondary>/vicep<emphasis>xx</emphasis></secondary>
364 <see>AFS server partition</see>
369 <para>Configure server partitions or logical volumes to house AFS volumes.</para>
371 <para>Every AFS file server machine should have at least one partition or logical volume dedicated to storing AFS volumes
372 (for convenience, the documentation hereafter refers to partitions only). Each server partition is mounted at a directory
373 named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where <replaceable>xx</replaceable> is one or
374 two lowercase letters. By convention, the first 26 partitions are mounted on the directories called <emphasis
375 role="bold">/vicepa</emphasis> through <emphasis role="bold">/vicepz</emphasis>, the 27th one is mounted on the <emphasis
376 role="bold">/vicepaa</emphasis> directory, and so on through <emphasis role="bold">/vicepaz</emphasis> and <emphasis
377 role="bold">/vicepba</emphasis>, continuing up to the index corresponding to the maximum number of server partitions
378 supported in the current version of AFS (which is specified in the <emphasis>OpenAFS Release Notes</emphasis>).</para>
380 <para>The <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server
381 machine's root directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is
382 not an acceptable directory location).
384 The <emphasis role="bold">fileserver</emphasis> will refuse to
386 any <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>
387 folders that are not separate partitions without additional
388 configuration. </para>
391 <para>The separate partition requirement may be overridden by
392 creating a file named
393 <emphasis role="bold">/vicep<replaceable>xx</replaceable>/AlwaysAttach</emphasis>;
394 however, mixed-use partitions, whether cache or fileserver,
395 have the risk that a non-AFS use will fill the partition and
396 not leave enough free space for AFS. Even though it is
397 allowed, be wary of configuring a mixed-use partition
398 without understanding the ramifications of doing so with the
399 workload on your filesystem.
401 <primary>AFS server partition</primary>
402 <secondary>AlwaysAttach</secondary>
407 <para>You can also add or remove server partitions on an existing file server machine. For instructions, see the chapter
408 in the <emphasis>OpenAFS Administration Guide</emphasis> about maintaining server machines.</para>
411 <para>Not all file system types supported by an operating system are necessarily supported as AFS server partitions. For
412 possible restrictions, see the <emphasis>OpenAFS Release Notes</emphasis>.</para>
417 <para>On (rare) system types using the <emphasis role="bold">inode</emphasis> storage format, install and configure a modified <emphasis role="bold">fsck</emphasis> program which
418 recognizes the structures that the File Server uses to organize volume data on AFS server partitions. The <emphasis
419 role="bold">fsck</emphasis> program provided with the operating system does not understand the AFS data structures, and so
420 removes them to the <emphasis role="bold">lost+found</emphasis> directory.</para>
424 <para>If the machine is to remain an AFS client machine, modify the machine's authentication system so that users obtain
425 an AFS token as they log into the local file system. Using AFS is simpler and more convenient for your users if you make
426 the modifications on all client machines. Otherwise, users must perform a two or three step login procedure (login to the local
427 system, then obtain Kerberos credentials, and then issue the <emphasis role="bold">aklog</emphasis> command). For further discussion of AFS
428 authentication, see the chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration and
429 administration issues.</para>
431 </itemizedlist></para>
433 <para>To continue, proceed to the appropriate section: <itemizedlist>
435 <para><link linkend="HDRWQ41">Getting Started on Linux Systems</link></para>
439 <para><link linkend="HDRWQ45">Getting Started on Solaris Systems</link></para>
441 </itemizedlist></para>
445 <title>Getting Started on Linux Systems</title>
448 <primary>replacing fsck program</primary>
450 <secondary>not necessary on Linux</secondary>
454 <primary>fsck program</primary>
456 <secondary>on first AFS machine</secondary>
458 <tertiary>Linux</tertiary>
462 <primary>first AFS machine</primary>
464 <secondary>fsck program</secondary>
466 <tertiary>on Linux</tertiary>
470 <primary>Linux</primary>
472 <secondary>fsck program replacement not necessary</secondary>
475 <para>Since this guide was originally written, the procedure for starting
476 OpenAFS has diverged significantly between different Linux distributions.
477 The instructions that follow are appropriate for both the Fedora and
478 RedHat Enterprise Linux packages distributed by OpenAFS. Additional
479 instructions are provided for those building from source.</para>
481 <para>Begin by running the AFS client startup scripts, which call the
482 <emphasis role="bold">modprobe</emphasis> program to dynamically
483 load the AFS modifications into the kernel. Then create partitions for
484 storing AFS volumes. You do not need to replace the Linux <emphasis
485 role="bold">fsck</emphasis> program. If the machine is to remain an
486 AFS client machine, incorporate AFS into the machine's Pluggable
487 Authentication Module (PAM) scheme. <indexterm>
488 <primary>incorporating AFS kernel extensions</primary>
490 <secondary>first AFS machine</secondary>
492 <tertiary>Linux</tertiary>
493 </indexterm> <indexterm>
494 <primary>AFS kernel extensions</primary>
496 <secondary>on first AFS machine</secondary>
498 <tertiary>Linux</tertiary>
499 </indexterm> <indexterm>
500 <primary>first AFS machine</primary>
502 <secondary>AFS kernel extensions</secondary>
504 <tertiary>on Linux</tertiary>
505 </indexterm> <indexterm>
506 <primary>Linux</primary>
508 <secondary>AFS kernel extensions</secondary>
510 <tertiary>on first AFS machine</tertiary>
514 <title>Loading AFS into the Linux Kernel</title>
516 <para>The <emphasis role="bold">modprobe</emphasis> program is the dynamic kernel loader for Linux. Linux does not support
517 incorporation of AFS modifications during a kernel build.</para>
519 <para>For AFS to function correctly, the <emphasis role="bold">modprobe</emphasis> program must run each time the machine
520 reboots, so your distribution's AFS initialization script invokes it automatically. The script also includes
521 commands that select the appropriate AFS library file automatically. In this section you run the script.</para>
523 <para>In later sections you verify that the script correctly initializes all AFS components, then activate a configuration
524 variable, which results in the script being incorporated into the Linux startup and shutdown sequence.</para>
526 <para>The procedure for starting up OpenAFS depends upon your distribution</para>
528 <title>Fedora and RedHat Enterprise Linux</title>
529 <para>OpenAFS provides RPMS for all current Fedora and
530 RedHat Enterprise Linux (RHEL) releases prior to EL7 on the
531 OpenAFS web site and the OpenAFS yum repository.
535 http://dl.openafs.org/dl/openafs/<replaceable>VERSION</replaceable>,
536 where VERSION is the latest stable release of
537 OpenAFS for Unix. Download the
538 openafs-repository-<replaceable>VERSION</replaceable>.noarch.rpm
539 file for Fedora systems or the
540 openafs-repository-rhel-<replaceable>VERSION</replaceable>.noarch.rpm
541 file for RedHat-based systems.
545 <para>Install the downloaded RPM file using the following command:
547 # rpm -U openafs-repository*.rpm
552 <para>Install the RPM set for your operating system using the yum command as follows:
554 # yum -y install openafs-client openafs-server openafs-krb5 kmod-openafs
558 <para>Alternatively, you may use dynamically-compiled kernel
559 modules if you have the kernel headers, a compiler, and the
561 <ulink url="http://fedoraproject.org/wiki/EPEL"><citetitle>EPEL</citetitle></ulink> installed.
564 <para>To use dynamically-compiled kernel modules instead of statically compiled modules, use the following command instead of the kmod-openafs as shown above:
566 # yum install openafs-client openafs-server openafs-krb5 dkms-openafs
570 <!-- If you do this with current RHEL and Fedora releases you end up with
571 a dynroot'd client running - this breaks setting up the root.afs volume
572 as described later in this guide
574 <para>Run the AFS initialization script to load AFS extensions into
575 the kernel. You can ignore any error messages about the inability
576 to start the BOS Server or the Cache Manager or AFS client.</para>
578 # <emphasis role="bold">/etc/rc.d/init.d/openafs-client start</emphasis>
586 <title>Debian and Ubuntu Linux</title>
587 <para>OpenAFS is available as binary packages from the Debian
588 linux distribution and its derivatives such as Ubuntu.
591 <para>Install the client and server packages using the following command:
593 # apt-get install openafs-client openafs-modules-dkms openafs-krb5 \
594 openafs-fileserver openafs-dbserver
596 You will be prompted by debconf to select your cell name and
597 the size of your local cache.
602 <para>The Debian package also includes helper scripts
603 <literal>afs-newcell</literal> and <literal>afs-rootvol</literal>,
604 which can automate much of the remainder of this document.
608 <title>Systems built from source</title>
609 <para>If you are running a system where
610 you have built the system from
611 source yourself, you need to install the relevant components by hand:
616 <para>Unpack the distribution tarball. The examples below assume
617 that you have extracted and built OpenAFS in the
618 <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
619 pick a different location, substitute this in all of the following
620 examples. Once you have compiled the distribution,
621 change to the source directory as indicated.
623 # <emphasis role="bold">cd /tmp/afsdist</emphasis>
624 </programlisting></para>
628 <para>Copy the AFS kernel library files to the local <emphasis role="bold">/usr/vice/etc/modload</emphasis> directory.
629 The filenames for the libraries have the format <emphasis
630 role="bold">libafs-</emphasis><replaceable>version</replaceable><emphasis role="bold">.o</emphasis>, where
631 <replaceable>version</replaceable> indicates the kernel build level. The string <emphasis role="bold">.mp</emphasis> in
632 the <replaceable>version</replaceable> indicates that the file is appropriate for machines running a multiprocessor
633 kernel. <programlisting>
634 # <emphasis role="bold">mkdir -p /usr/vice/etc/modload</emphasis>
635 # <emphasis role="bold">cp -rp src/libafs/*.ko /usr/vice/etc/modload</emphasis>
636 </programlisting></para>
640 <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
641 role="bold">/etc/rc.d/init.d</emphasis> on Linux machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
642 extension as you copy the script. <programlisting>
643 # <emphasis role="bold">cp -p src/afsd/afs.rc.linux /etc/rc.d/init.d/afs</emphasis>
644 </programlisting></para>
650 <primary>configuring</primary>
652 <secondary>AFS server partition on first AFS machine</secondary>
654 <tertiary>Linux</tertiary>
658 <primary>AFS server partition</primary>
660 <secondary>configuring on first AFS machine</secondary>
662 <tertiary>Linux</tertiary>
666 <primary>first AFS machine</primary>
668 <secondary>AFS server partition</secondary>
670 <tertiary>on Linux</tertiary>
674 <primary>Linux</primary>
676 <secondary>AFS server partition</secondary>
678 <tertiary>on first AFS machine</tertiary>
684 <title>Configuring Server Partitions on Linux Systems</title>
686 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
687 server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
688 <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
689 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
690 directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
691 directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
694 <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
695 partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
696 # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
697 </programlisting></para>
701 <para>Add a line with the following format to the file systems registry file, <emphasis
702 role="bold">/etc/fstab</emphasis>, for each directory just created. The entry maps the directory name to the disk
703 partition to be mounted on it. <programlisting>
704 /dev/<replaceable>disk</replaceable> /vicep<replaceable>xx</replaceable> ext2 defaults 0 2
705 </programlisting></para>
707 <para>The following is an example for the first partition being configured.</para>
710 /dev/sda8 /vicepa ext2 defaults 0 2
715 <para>Create a file system on each partition that is to be mounted at a <emphasis
716 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
717 consult the Linux documentation for more information. <programlisting>
718 # <emphasis role="bold">mkfs -v /dev/</emphasis><replaceable>disk</replaceable>
719 </programlisting></para>
723 <para>Mount each partition by issuing either the <emphasis role="bold">mount -a</emphasis> command to mount all
724 partitions at once or the <emphasis role="bold">mount</emphasis> command to mount each partition in turn.</para>
728 <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
729 linkend="HDRWQ44">Enabling AFS Login on Linux Systems</link>. Otherwise, proceed to <link linkend="HDRWQ50">Starting the
730 BOS Server</link>.</para>
732 </orderedlist></para>
735 <primary>enabling AFS login</primary>
737 <secondary>file server machine</secondary>
739 <tertiary>Linux</tertiary>
743 <primary>AFS login</primary>
745 <secondary>on file server machine</secondary>
747 <tertiary>Linux</tertiary>
751 <primary>first AFS machine</primary>
753 <secondary>AFS login</secondary>
755 <tertiary>on Linux</tertiary>
759 <primary>Linux</primary>
761 <secondary>AFS login</secondary>
763 <tertiary>on file server machine</tertiary>
767 <primary>PAM</primary>
769 <secondary>on Linux</secondary>
771 <tertiary>file server machine</tertiary>
776 <title>Enabling AFS Login on Linux Systems</title>
779 <para>If you plan to remove client functionality from this machine
780 after completing the installation, skip this section and proceed
781 to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
784 <para>At this point you incorporate AFS into the operating system's
785 Pluggable Authentication Module (PAM) scheme. PAM integrates all
786 authentication mechanisms on the machine, including login, to provide
787 the security infrastructure for authenticated access to and from the
790 <para>You should first configure your system to obtain Kerberos v5
791 tickets as part of the authentication process, and then run an AFS PAM
792 module to obtain tokens from those tickets after authentication. Many
793 Linux distributions come with a Kerberos v5 PAM module (usually called
794 pam-krb5 or pam_krb5), or you can download and install <ulink
795 url="http://www.eyrie.org/~eagle/software/pam-krb5">Russ Allbery's
796 Kerberos v5 PAM module</ulink>, which is tested regularly with AFS.
797 See the instructions of whatever PAM module you use for how to
800 <para>Some Kerberos v5 PAM modules do come with native AFS support
801 (usually requiring the Heimdal Kerberos implementation rather than the
802 MIT Kerberos implementation). If you are using one of those PAM
803 modules, you can configure it to obtain AFS tokens. It's more common,
804 however, to separate the AFS token acquisition into a separate PAM
807 <para>The recommended AFS PAM module is <ulink
808 url="http://www.eyrie.org/~eagle/software/pam-afs-session/">Russ
809 Allbery's pam-afs-session module</ulink>. It should work with any of
810 the Kerberos v5 PAM modules. To add it to the PAM configuration, you
811 often only need to add configuration to the session group:</para>
814 <title>Linux PAM session example</title>
815 <literallayout>session required pam_afs_session.so</literallayout>
818 <para>If you also want to obtain AFS tokens for <command>scp</command>
819 and similar commands that don't open a session, you will also need to
820 add the AFS PAM module to the auth group so that the PAM
821 <function>setcred</function> call will obtain tokens. The
822 <literal>pam_afs_session</literal> module will always return success
823 for authentication so that it can be added to the auth group only for
824 <function>setcred</function>, so make sure that it's not marked as
825 <literal>sufficient</literal>.</para>
828 <title>Linux PAM auth example</title>
829 <literallayout>auth [success=ok default=1] pam_krb5.so
830 auth [default=done] pam_afs_session.so
831 auth required pam_unix.so try_first_pass</literallayout>
834 <para>This example will work if you want to try Kerberos v5 first and
835 then fall back to regular Unix authentication.
836 <literal>success=ok</literal> for the Kerberos PAM module followed by
837 <literal>default=done</literal> for the AFS PAM module will cause a
838 successful Kerberos login to run the AFS PAM module and then skip the
839 Unix authentication module. <literal>default=1</literal> on the
840 Kerberos PAM module causes failure of that module to skip the next
841 module (the AFS PAM module) and fall back to the Unix module. If you
842 want to try Unix authentication first and rearrange the order, be sure
843 to use <literal>default=die</literal> instead.</para>
845 <para>The PAM configuration is stored in different places in different
846 Linux distributions. On Red Hat, look in
847 <filename>/etc/pam.d/system-auth</filename>. On Debian and
848 derivatives, look in <filename>/etc/pam.d/common-session</filename>
849 and <filename>/etc/pam.d/common-auth</filename>.</para>
851 <para>For additional configuration examples and the configuration
852 options of the AFS PAM module, see its documentation. For more
853 details on the available options for the PAM configuration, see the
854 Linux PAM documentation.</para>
856 <para>Sites which still require the deprecated
857 <command>kaserver</command> or
858 external Kerberos v4 authentication should consult <link
859 linkend="KAS015">Enabling kaserver based AFS Login on Linux
860 Systems</link> for details of how to enable AFS login on Linux.</para>
862 <para>Proceed to <link linkend="HDRWQ50">Starting the BOS
863 Server</link> (or if referring to these instructions while installing
864 an additional file server machine, return to <link
865 linkend="HDRWQ108">Starting Server Programs</link>).</para>
870 <title>Getting Started on Solaris Systems</title>
872 <para>Begin by running the AFS initialization script to call the <emphasis role="bold">modload</emphasis> program distributed by
873 Sun Microsystems, which dynamically loads AFS modifications into the kernel. Then create partitions for storing AFS volumes, and
874 install and configure the AFS-modified <emphasis role="bold">fsck</emphasis> program to run on AFS server partitions. If the
875 machine is to remain an AFS client machine, incorporate AFS into the machine's Pluggable Authentication Module (PAM) scheme.
877 <primary>incorporating AFS kernel extensions</primary>
879 <secondary>first AFS machine</secondary>
881 <tertiary>Solaris</tertiary>
882 </indexterm> <indexterm>
883 <primary>AFS kernel extensions</primary>
885 <secondary>on first AFS machine</secondary>
887 <tertiary>Solaris</tertiary>
888 </indexterm> <indexterm>
889 <primary>first AFS machine</primary>
891 <secondary>AFS kernel extensions</secondary>
893 <tertiary>on Solaris</tertiary>
894 </indexterm> <indexterm>
895 <primary>Solaris</primary>
897 <secondary>AFS kernel extensions</secondary>
899 <tertiary>on first AFS machine</tertiary>
903 <title>Loading AFS into the Solaris Kernel</title>
905 <para>The <emphasis role="bold">modload</emphasis> program is the dynamic kernel loader provided by Sun Microsystems for
906 Solaris systems. Solaris does not support incorporation of AFS modifications during a kernel build.</para>
908 <para>For AFS to function correctly, the <emphasis role="bold">modload</emphasis> program must run each time the machine
909 reboots, so the AFS initialization script (included on the AFS CD-ROM) invokes it automatically. In this section you copy the
910 appropriate AFS library file to the location where the <emphasis role="bold">modload</emphasis> program accesses it and then
911 run the script.</para>
913 <para>In later sections you verify that the script correctly initializes all AFS components, then create the links that
914 incorporate AFS into the Solaris startup and shutdown sequence. <orderedlist>
916 <para>Unpack the OpenAFS Solaris distribution tarball. The examples
917 below assume that you have unpacked the files into the
918 <emphasis role="bold">/tmp/afsdist</emphasis> directory. If you
919 pick a diferent location, substitute this in all of the following
920 exmaples. Once you have unpacked the distribution, change directory
923 # <emphasis role="bold">cd /tmp/afsdist/sun4x_56/dest/root.client/usr/vice/etc</emphasis>
924 </programlisting></para>
928 <para>Copy the AFS initialization script to the local directory for initialization files (by convention, <emphasis
929 role="bold">/etc/init.d</emphasis> on Solaris machines). Note the removal of the <emphasis role="bold">.rc</emphasis>
930 extension as you copy the script. <programlisting>
931 # <emphasis role="bold">cp -p afs.rc /etc/init.d/afs</emphasis>
932 </programlisting></para>
936 <para>Copy the appropriate AFS kernel library file to the local file <emphasis
937 role="bold">/kernel/fs/afs</emphasis>.</para>
939 <para>If the machine is running Solaris 11 on the x86_64 platform:</para>
942 # <emphasis role="bold">cp -p modload/libafs64.o /kernel/drv/amd64/afs</emphasis>
945 <para>If the machine is running Solaris 10 on the x86_64 platform:</para>
948 # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/amd64/afs</emphasis>
951 <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, its kernel supports NFS server
952 functionality, and the <emphasis role="bold">nfsd</emphasis> process is running:</para>
955 # <emphasis role="bold">cp -p modload/libafs.o /kernel/fs/afs</emphasis>
958 <para>If the machine is running Solaris 2.6 or the 32-bit version of Solaris 7, and its kernel does not support NFS
959 server functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
962 # <emphasis role="bold">cp -p modload/libafs.nonfs.o /kernel/fs/afs</emphasis>
965 <para>If the machine is running the 64-bit version of Solaris 7, its kernel supports NFS server functionality, and the
966 <emphasis role="bold">nfsd</emphasis> process is running:</para>
969 # <emphasis role="bold">cp -p modload/libafs64.o /kernel/fs/sparcv9/afs</emphasis>
972 <para>If the machine is running the 64-bit version of Solaris 7, and its kernel does not support NFS server
973 functionality or the <emphasis role="bold">nfsd</emphasis> process is not running:</para>
976 # <emphasis role="bold">cp -p modload/libafs64.nonfs.o /kernel/fs/sparcv9/afs</emphasis>
981 <para>Run the AFS initialization script to load AFS modifications into the kernel. You can ignore any error messages
982 about the inability to start the BOS Server or the Cache Manager or AFS client. <programlisting>
983 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
984 </programlisting></para>
986 <para>When an entry called <computeroutput>afs</computeroutput> does not already exist in the local <emphasis
987 role="bold">/etc/name_to_sysnum</emphasis> file, the script automatically creates it and reboots the machine to start
988 using the new version of the file. If this happens, log in again as the superuser <emphasis role="bold">root</emphasis>
989 after the reboot and run the initialization script again. This time the required entry exists in the <emphasis
990 role="bold">/etc/name_to_sysnum</emphasis> file, and the <emphasis role="bold">modload</emphasis> program runs.</para>
993 login: <emphasis role="bold">root</emphasis>
994 Password: <replaceable>root_password</replaceable>
995 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
998 </orderedlist></para>
1001 <primary>replacing fsck program</primary>
1003 <secondary>first AFS machine</secondary>
1005 <tertiary>Solaris</tertiary>
1009 <primary>fsck program</primary>
1011 <secondary>on first AFS machine</secondary>
1013 <tertiary>Solaris</tertiary>
1017 <primary>first AFS machine</primary>
1019 <secondary>fsck program</secondary>
1021 <tertiary>on Solaris</tertiary>
1025 <primary>Solaris</primary>
1027 <secondary>fsck program</secondary>
1029 <tertiary>on first AFS machine</tertiary>
1033 <sect2 id="HDRWQ47">
1034 <title>Configuring the AFS-modified fsck Program on Solaris Systems</title>
1036 <para>In this section, you make modifications to guarantee that the appropriate <emphasis role="bold">fsck</emphasis> program
1037 runs on AFS server partitions. The <emphasis role="bold">fsck</emphasis> program provided with the operating system must never
1038 run on AFS server partitions. Because it does not recognize the structures that the File Server uses to organize volume data,
1039 it removes all of the data. To repeat:</para>
1041 <para><emphasis role="bold">Never run the standard fsck program on AFS server partitions. It discards AFS volumes.</emphasis>
1044 <para>Create the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory to house the AFS-modified <emphasis
1045 role="bold">fsck</emphasis> program and related files. <programlisting>
1046 # <emphasis role="bold">mkdir /usr/lib/fs/afs</emphasis>
1047 # <emphasis role="bold">cd /usr/lib/fs/afs</emphasis>
1048 </programlisting></para>
1052 <para>Copy the <emphasis role="bold">vfsck</emphasis> binary to the newly created directory, changing the name as you do
1053 so. <programlisting>
1054 # <emphasis role="bold">cp /tmp/afsdist/sun4x_56/dest/root.server/etc/vfsck fsck</emphasis>
1055 </programlisting></para>
1059 <para>Working in the <emphasis role="bold">/usr/lib/fs/afs</emphasis> directory, create the following links to Solaris
1060 libraries: <programlisting>
1061 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/clri</emphasis>
1062 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/df</emphasis>
1063 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/edquota</emphasis>
1064 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ff</emphasis>
1065 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsdb</emphasis>
1066 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fsirand</emphasis>
1067 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/fstyp</emphasis>
1068 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/labelit</emphasis>
1069 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/lockfs</emphasis>
1070 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mkfs</emphasis>
1071 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/mount</emphasis>
1072 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ncheck</emphasis>
1073 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/newfs</emphasis>
1074 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quot</emphasis>
1075 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quota</emphasis>
1076 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaoff</emphasis>
1077 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/quotaon</emphasis>
1078 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/repquota</emphasis>
1079 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/tunefs</emphasis>
1080 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsdump</emphasis>
1081 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/ufsrestore</emphasis>
1082 # <emphasis role="bold">ln -s /usr/lib/fs/ufs/volcopy</emphasis>
1083 </programlisting></para>
1087 <para>Append the following line to the end of the file <emphasis role="bold">/etc/dfs/fstypes</emphasis>.
1090 </programlisting></para>
1094 <para>Edit the <emphasis role="bold">/sbin/mountall</emphasis> file, making two changes. <itemizedlist>
1096 <para>Add an entry for AFS to the <computeroutput>case</computeroutput> statement for option 2, so that it reads
1097 as follows: <programlisting>
1099 ufs) foptions="-o p"
1101 afs) foptions="-o p"
1103 s5) foptions="-y -t /var/tmp/tmp$$ -D"
1107 </programlisting></para>
1111 <para>Edit the file so that all AFS and UFS partitions are checked in parallel. Replace the following section of
1112 code: <programlisting>
1113 # For fsck purposes, we make a distinction between ufs and
1114 # other file systems
1116 if [ "$fstype" = "ufs" ]; then
1117 ufs_fscklist="$ufs_fscklist $fsckdev"
1118 saveentry $fstype "$OPTIONS" $special $mountp
1121 </programlisting></para>
1123 <para>with the following section of code:</para>
1126 # For fsck purposes, we make a distinction between ufs/afs
1127 # and other file systems.
1129 if [ "$fstype" = "ufs" -o "$fstype" = "afs" ]; then
1130 ufs_fscklist="$ufs_fscklist $fsckdev"
1131 saveentry $fstype "$OPTIONS" $special $mountp
1136 </itemizedlist></para>
1138 </orderedlist></para>
1141 <primary>configuring</primary>
1143 <secondary>AFS server partition on first AFS machine</secondary>
1145 <tertiary>Solaris</tertiary>
1149 <primary>AFS server partition</primary>
1151 <secondary>configuring on first AFS machine</secondary>
1153 <tertiary>Solaris</tertiary>
1157 <primary>first AFS machine</primary>
1159 <secondary>AFS server partition</secondary>
1161 <tertiary>on Solaris</tertiary>
1165 <primary>Solaris</primary>
1167 <secondary>AFS server partition</secondary>
1169 <tertiary>on first AFS machine</tertiary>
1173 <sect2 id="HDRWQ48">
1174 <title>Configuring Server Partitions on Solaris Systems</title>
1176 <para>Every AFS file server machine must have at least one partition or logical volume dedicated to storing AFS volumes. Each
1177 server partition is mounted at a directory named <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable>, where
1178 <replaceable>xx</replaceable> is one or two lowercase letters. The <emphasis
1179 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directories must reside in the file server machine's root
1180 directory, not in one of its subdirectories (for example, <emphasis role="bold">/usr/vicepa</emphasis> is not an acceptable
1181 directory location). For additional information, see <link linkend="HDRWQ20">Performing Platform-Specific Procedures</link>.
1184 <para>Create a directory called <emphasis role="bold">/vicep</emphasis><replaceable>xx</replaceable> for each AFS server
1185 partition you are configuring (there must be at least one). Repeat the command for each partition. <programlisting>
1186 # <emphasis role="bold">mkdir /vicep</emphasis><replaceable>xx</replaceable>
1187 </programlisting></para>
1191 <para>Add a line with the following format to the file systems registry file, <emphasis
1192 role="bold">/etc/vfstab</emphasis>, for each partition to be mounted on a directory created in the previous step. Note
1193 the value <computeroutput>afs</computeroutput> in the fourth field, which tells Solaris to use the AFS-modified
1194 <emphasis role="bold">fsck</emphasis> program on this partition. <programlisting>
1195 /dev/dsk/<replaceable>disk</replaceable> /dev/rdsk/<replaceable>disk</replaceable> /vicep<replaceable>xx</replaceable> afs <replaceable>boot_order</replaceable> yes
1196 </programlisting></para>
1198 <para>The following is an example for the first partition being configured.</para>
1201 /dev/dsk/c0t6d0s1 /dev/rdsk/c0t6d0s1 /vicepa afs 3 yes
1206 <para>Create a file system on each partition that is to be mounted at a <emphasis
1207 role="bold">/vicep</emphasis><replaceable>xx</replaceable> directory. The following command is probably appropriate, but
1208 consult the Solaris documentation for more information. <programlisting>
1209 # <emphasis role="bold">newfs -v /dev/rdsk/</emphasis><replaceable>disk</replaceable>
1210 </programlisting></para>
1214 <para>Issue the <emphasis role="bold">mountall</emphasis> command to mount all partitions at once.</para>
1218 <para>If you plan to retain client functionality on this machine after completing the installation, proceed to <link
1219 linkend="HDRWQ49">Enabling AFS Login and Editing the File Systems Clean-up Script on Solaris Systems</link>. Otherwise,
1220 proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1222 </orderedlist></para>
1225 <sect2 id="HDRWQ49">
1226 <title>Enabling AFS Login on Solaris Systems</title>
1228 <primary>enabling AFS login</primary>
1230 <secondary>file server machine</secondary>
1232 <tertiary>Solaris</tertiary>
1236 <primary>AFS login</primary>
1238 <secondary>on file server machine</secondary>
1240 <tertiary>Solaris</tertiary>
1244 <primary>first AFS machine</primary>
1246 <secondary>AFS login</secondary>
1248 <tertiary>on Solaris</tertiary>
1252 <primary>Solaris</primary>
1254 <secondary>AFS login</secondary>
1256 <tertiary>on file server machine</tertiary>
1260 <primary>PAM</primary>
1262 <secondary>on Solaris</secondary>
1264 <tertiary>file server machine</tertiary>
1268 <para>If you plan to remove client functionality from this machine after completing the installation, skip this section and
1269 proceed to <link linkend="HDRWQ50">Starting the BOS Server</link>.</para>
1272 <para>At this point you incorporate AFS into the operating system's
1273 Pluggable Authentication Module (PAM) scheme. PAM integrates all
1274 authentication mechanisms on the machine, including login, to provide
1275 the security infrastructure for authenticated access to and from the
1278 <para>Explaining PAM is beyond the scope of this document. It is
1279 assumed that you understand the syntax and meanings of settings in the
1280 PAM configuration file (for example, how the
1281 <computeroutput>other</computeroutput> entry works, the effect of
1282 marking an entry as <computeroutput>required</computeroutput>,
1283 <computeroutput>optional</computeroutput>, or
1284 <computeroutput>sufficient</computeroutput>, and so on).</para>
1286 <para>You should first configure your system to obtain Kerberos v5
1287 tickets as part of the authentication process, and then run an AFS PAM
1288 module to obtain tokens from those tickets after authentication.
1289 Current versions of Solaris come with a Kerberos v5 PAM module that
1290 will work, or you can download and install <ulink
1291 url="http://www.eyrie.org/~eagle/software/pam-krb5">Russ Allbery's
1292 Kerberos v5 PAM module</ulink>, which is tested regularly with AFS.
1293 See the instructions of whatever PAM module you use for how to
1294 configure it.</para>
1296 <para>Some Kerberos v5 PAM modules do come with native AFS support
1297 (usually requiring the Heimdal Kerberos implementation rather than the
1298 MIT Kerberos implementation). If you are using one of those PAM
1299 modules, you can configure it to obtain AFS tokens. It's more common,
1300 however, to separate the AFS token acquisition into a separate PAM
1303 <para>The recommended AFS PAM module is <ulink
1304 url="http://www.eyrie.org/~eagle/software/pam-afs-session/">Russ
1305 Allbery's pam-afs-session module</ulink>. It should work with any of
1306 the Kerberos v5 PAM modules. To add it to the PAM configuration, you
1307 often only need to add configuration to the session group in
1308 <filename>pam.conf</filename>:</para>
1311 <title>Solaris PAM session example</title>
1312 <literallayout>login session required pam_afs_session.so</literallayout>
1315 <para>This example enables PAM authentication only for console login.
1316 You may want to add a similar line for the ssh service and for any
1317 other login service that you use, including possibly the
1318 <literal>other</literal> service (which serves as a catch-all). You
1319 may also want to add options to the AFS PAM session module
1320 (particularly <literal>retain_after_close</literal>, which is
1321 necessary for some versions of Solaris.</para>
1323 <para>For additional configuration examples and the configuration
1324 options of the AFS PAM module, see its documentation. For more
1325 details on the available options for the PAM configuration, see the
1326 <filename>pam.conf</filename> manual page.</para>
1328 <para>Sites which still require <emphasis
1329 role="bold">kaserver</emphasis> or external Kerberos v4 authentication
1330 should consult <link linkend="KAS016">"Enabling kaserver based AFS
1331 Login on Solaris Systems"</link> for details of how to enable AFS
1332 login on Solaris.</para>
1334 <para>Proceed to <link linkend="HDRWQ49a">Editing the File Systems
1335 Clean-up Script on Solaris Systems</link></para>
1337 <sect2 id="HDRWQ49a">
1338 <title>Editing the File Systems Clean-up Script on Solaris Systems</title>
1340 <primary>Solaris</primary>
1342 <secondary>file systems clean-up script</secondary>
1344 <tertiary>on file server machine</tertiary>
1348 <primary>file systems clean-up script (Solaris)</primary>
1350 <secondary>file server machine</secondary>
1354 <primary>scripts</primary>
1356 <secondary>file systems clean-up (Solaris)</secondary>
1358 <tertiary>file server machine</tertiary>
1364 <para>Some Solaris distributions include a script that locates and removes unneeded files from various file systems. Its
1365 conventional location is <emphasis role="bold">/usr/lib/fs/nfs/nfsfind</emphasis>. The script generally uses an argument
1366 to the <emphasis role="bold">find</emphasis> command to define which file systems to search. In this step you modify the
1367 command to exclude the <emphasis role="bold">/afs</emphasis> directory. Otherwise, the command traverses the AFS
1368 filespace of every cell that is accessible from the machine, which can take many hours. The following alterations are
1369 possibilities, but you must verify that they are appropriate for your cell.</para>
1371 <para>The first possible alteration is to add the <emphasis role="bold">-local</emphasis> flag to the existing command,
1372 so that it looks like the following:</para>
1375 find $dir -local -name .nfs\* -mtime +7 -mount -exec rm -f {} \;
1378 <para>Another alternative is to exclude any directories whose names begin with the lowercase letter <emphasis
1379 role="bold">a</emphasis> or a non-alphabetic character.</para>
1382 find /[A-Zb-z]* <replaceable>remainder of existing command</replaceable>
1385 <para>Do not use the following command, which still searches under the <emphasis role="bold">/afs</emphasis> directory,
1386 looking for a subdirectory of type <emphasis role="bold">4.2</emphasis>.</para>
1389 find / -fstype 4.2 /* <replaceable>do not use</replaceable> */
1394 <para>Proceed to <link linkend="HDRWQ50">Starting the BOS Server</link> (or if referring to these instructions while
1395 installing an additional file server machine, return to <link linkend="HDRWQ108">Starting Server
1396 Programs</link>).</para>
1401 <primary>Basic OverSeer Server</primary>
1403 <see>BOS Server</see>
1407 <primary>BOS Server</primary>
1409 <secondary>starting</secondary>
1411 <tertiary>first AFS machine</tertiary>
1415 <primary>starting</primary>
1417 <secondary>BOS Server</secondary>
1419 <tertiary>first AFS machine</tertiary>
1423 <primary>first AFS machine</primary>
1425 <secondary>BOS Server</secondary>
1429 <primary>authorization checking (disabling)</primary>
1431 <secondary>first AFS machine</secondary>
1435 <primary>disabling authorization checking</primary>
1437 <secondary>first AFS machine</secondary>
1441 <primary>first AFS machine</primary>
1443 <secondary>authorization checking (disabling)</secondary>
1448 <sect1 id="HDRWQ50">
1449 <title>Starting the BOS Server</title>
1451 <para>You are now ready to start the AFS server processes on this machine.
1452 If you are not working from a packaged distribution, begin by installing the
1453 AFS server binaries to the conventional local disk
1454 location, the <emphasis role="bold">/usr/afs/bin</emphasis> directory. The
1455 following instructions also create files in other subdirectories of the
1456 <emphasis role="bold">/usr/afs</emphasis> directory.</para>
1458 <para>Then obtain a krb5 keytab for use by the servers in the cell.
1459 Once the keytab is in place, issue the
1460 <emphasis role="bold">bosserver</emphasis> command to initialize
1461 the Basic OverSeer (BOS) Server, which
1462 monitors and controls other AFS server processes on its server machine.
1463 Because you have not yet configured your cell's AFS authentication and authorization
1464 mechanisms, you must always use the
1465 <emphasis role="bold">-localauth</emphasis> flag to commands, to use a
1466 printed token that does not correspond to a normal krb5 identity.</para>
1467 <para>Older versions of these instructions used the
1468 <emphasis role="bold">-noauth</emphasis> flag, which completely disables
1469 all authentication and authorization checking, allowing anyone at all
1470 to control the system. Do not use this flag! It is highly insecure,
1471 and is no longer needed.</para>
1473 <para>As it initializes for the first time, the BOS Server creates the following directories and files, setting the owner to the
1474 local superuser <emphasis role="bold">root</emphasis> and the mode bits to limit the ability to write (and in some cases, read)
1475 them. For a description of the contents and function of these directories and files, see the chapter in the <emphasis>OpenAFS
1476 Administration Guide</emphasis> about administering server machines. For further discussion of the mode bit settings, see <link
1477 linkend="HDRWQ96">Protecting Sensitive AFS Directories</link>. <indexterm>
1478 <primary>Binary Distribution</primary>
1480 <secondary>copying server files from</secondary>
1482 <tertiary>first AFS machine</tertiary>
1483 </indexterm> <indexterm>
1484 <primary>first AFS machine</primary>
1486 <secondary>subdirectories of /usr/afs</secondary>
1487 </indexterm> <indexterm>
1488 <primary>creating</primary>
1490 <secondary>/usr/afs/bin directory</secondary>
1492 <tertiary>first AFS machine</tertiary>
1493 </indexterm> <indexterm>
1494 <primary>creating</primary>
1496 <secondary>/usr/afs/etc directory</secondary>
1498 <tertiary>first AFS machine</tertiary>
1499 </indexterm> <indexterm>
1500 <primary>copying</primary>
1502 <secondary>server files to local disk</secondary>
1504 <tertiary>first AFS machine</tertiary>
1505 </indexterm> <indexterm>
1506 <primary>first AFS machine</primary>
1508 <secondary>copying</secondary>
1510 <tertiary>server files to local disk</tertiary>
1511 </indexterm> <indexterm>
1512 <primary>usr/afs/bin directory</primary>
1514 <secondary>first AFS machine</secondary>
1515 </indexterm> <indexterm>
1516 <primary>usr/afs/etc directory</primary>
1518 <secondary>first AFS machine</secondary>
1519 </indexterm> <indexterm>
1520 <primary>usr/afs/db directory</primary>
1521 </indexterm> <indexterm>
1522 <primary>usr/afs/local directory</primary>
1523 </indexterm> <indexterm>
1524 <primary>usr/afs/logs directory</primary>
1525 </indexterm> <itemizedlist>
1527 <para><emphasis role="bold">/usr/afs/db</emphasis></para>
1531 <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis></para>
1535 <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis></para>
1539 <para><emphasis role="bold">/usr/afs/local</emphasis></para>
1543 <para><emphasis role="bold">/usr/afs/logs</emphasis></para>
1545 </itemizedlist></para>
1547 <para>The BOS Server also creates symbolic links called <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
1548 role="bold">/usr/vice/etc/CellServDB</emphasis> to the corresponding files in the <emphasis role="bold">/usr/afs/etc</emphasis>
1549 directory. The AFS command interpreters consult the <emphasis role="bold">CellServDB</emphasis> and <emphasis
1550 role="bold">ThisCell</emphasis> files in the <emphasis role="bold">/usr/vice/etc</emphasis> directory because they generally run
1551 on client machines. On machines that are AFS servers only (as this machine currently is), the files reside only in the <emphasis
1552 role="bold">/usr/afs/etc</emphasis> directory; the links enable the command interpreters to retrieve the information they need.
1553 Later instructions for installing the client functionality replace the links with actual files.</para>
1555 <title>Generating the Cell's Kerberos V5 Keys</title>
1557 <para>This guide uses krb5 for authentication; do not use the
1558 legacy <emphasis role="bold">kaserver</emphasis> for new
1559 installations.</para>
1560 <para>This section creates only the cell-wide shared secret key;
1561 administrative users will be created later in the procedure.
1562 This cell-wide key has the principal name
1563 <emphasis role="bold">afs/<replaceable>cell</replaceable></emphasis>.
1564 No user logs in under this identity, but it is used to encrypt the
1565 server tickets that the KDC grants to AFS clients for presentation
1566 to server processes during mutual authentication. (The
1567 chapter in the <emphasis>OpenAFS Administration Guide</emphasis>
1568 about cell configuration and administration describes the
1569 role of server encryption keys in mutual authentication.)</para>
1570 <para>The OpenAFS 1.8.x series stores the cell-wide shared keys in
1571 the file <emphasis role="bold">/usr/afs/etc/KeyFileExt</emphasis>,
1572 whereas the 1.6.x series uses a krb5 keytab format file in
1573 <emphasis role="bold">/usr/afs/etc/rxkad.keytab</emphasis>.
1574 These instructions create both files, but populating the
1575 <emphasis role="bold">KeyFileExt</emphasis> file will only succeed
1576 using the version of <emphasis role="bold">asetkey</emphasis>
1577 from OpenAFS 1.8.x.</para>
1578 <para>The examples below assume you are using MIT Kerberos. Please refer
1579 to the documentation for your KDC's administrative interface if you are
1580 using a different vendor</para>
1584 <para>Enter <emphasis role="bold">kadmin</emphasis> interactive mode.
1586 # <emphasis role="bold">kadmin</emphasis>
1587 Authenticating as principal <replaceable>you</replaceable>/admin@<replaceable>YOUR REALM</replaceable> with password
1588 Password for <replaceable>you/admin@REALM</replaceable>: <replaceable>your_password</replaceable>
1589 </programlisting> <indexterm>
1590 <primary>server encryption key</primary>
1592 <secondary>in Kerberos Database</secondary>
1593 </indexterm> <indexterm>
1594 <primary>creating</primary>
1596 <secondary>server encryption key</secondary>
1598 <tertiary>Kerberos Database</tertiary>
1604 <emphasis role="bold">add_principal</emphasis> command to create
1605 a Kerberos Database entry for
1606 <emphasis role="bold">afs/<<replaceable>cell name</replaceable>></emphasis>.</para>
1608 <para>Note that when creating the
1609 <emphasis role="bold">afs/<<replaceable>cell name</replaceable>></emphasis>
1610 entry, the encryption type list does not include any single-DES
1611 encryption types. If such encryption types are included,
1612 additional <emphasis role="bold">asetkey</emphasis> commands
1613 will be needed to place those keys in the legacy
1614 <emphasis role="bold">KeyFile</emphasis> and ensure proper
1615 operation of the cell.
1616 For more details regarding encryption types, see the documentation
1617 for your Kerberos installation.
1620 kadmin: <emphasis role="bold">add_principal -randkey -e aes256-cts-hmac-sha1-96:normal,aes128-cts-hmac-sha1-96:normal afs/</emphasis><<replaceable>cell name</replaceable>>
1621 Principal "afs/<replaceable>cell name</replaceable>@<replaceable>REALM</replaceable>" created.
1627 <para>Extract the newly created key for
1628 <emphasis role="bold">afs/<replaceable>cell</replaceable></emphasis>
1629 to a keytab on the local machine.</para>
1631 <para>The keytab contains the key material that ensures the security of your AFS cell. You should ensure that it is kept in a secure location at all times.</para>
1634 kadmin: <emphasis role="bold">ktadd -k /usr/afs/etc/rxkad.keytab -e aes256-cts-hmac-sha1-96:normal,aes128-cts-hmac-sha1-96:normal afs/<<replaceable>cell name</replaceable>></emphasis>
1635 Entry for principal afs/<<replaceable>cell name</replaceable>> with kvno 2, encryption type aes256-cts-hmac-sha1-96 added to keytab WRFILE:/usr/afs/etc/rxkad.keytab
1636 Entry for principal afs/<<replaceable>cell name</replaceable>> with kvno 2, encryption type aes128-cts-hmac-sha1-96 added to keytab WRFILE:/usr/afs/etc/rxkad.keytab
1638 <para>Make a note of the key version number (kvno) given in the
1639 response, as you will need it to load the key into
1640 the <emphasis role="bold">KeyFileExt</emphasis> in a later
1643 <note><para>Note that each time you run
1644 <emphasis role="bold">ktadd</emphasis> a new key is generated
1645 for the item being extracted. This means that you cannot run ktadd
1646 multiple times and end up with the same key material each time.
1651 <para>Issue the <emphasis role="bold">quit</emphasis> command to leave <emphasis role="bold">kadmin</emphasis>
1652 interactive mode. <programlisting>
1653 kadmin: <emphasis role="bold">quit</emphasis>
1654 </programlisting></para>
1657 <listitem id="LIWQ58">
1659 <emphasis role="bold">asetkey</emphasis> command to set the AFS
1660 server encryption key in the
1661 <emphasis role="bold">/usr/afs/etc/KeyFileExt</emphasis> file.
1663 is created from the <emphasis role="bold">rxkad.keytab</emphasis>
1664 file created earlier.</para>
1666 <para>asetkey requires the key version number (or kvno) of the
1667 <emphasis role="bold">afs/</emphasis><replaceable>cell</replaceable>
1668 key, as well as the encryption type number of the key.
1669 You should have made note of the kvno when creating the key
1670 earlier. The key version number can also be found by running the
1671 <emphasis role="bold">kvno</emphasis> command</para>
1673 # <emphasis role="bold">kvno -kt /usr/afs/etc/rxkad.keytab</emphasis>
1675 <para>The encryption type numbers can be found in the local krb5
1676 headers or the IANA registry. The most common numbers are
1677 18 for <emphasis role="bold">aes256-cts-hmac-sha1-96</emphasis> and
1678 17 for <emphasis role="bold">aes128-cts-hmac-sha1-96</emphasis>.
1681 <para>Once the kvno and enctypes are known, the keys
1682 can then be extracted using asetkey</para>
1684 # <emphasis role="bold">asetkey add rxkad_krb5</emphasis> <<replaceable>kvno</replaceable>> <emphasis role="bold">18 /usr/afs/etc/rxkad.keytab afs/</emphasis><<replaceable>cell name</replaceable>>
1685 # <emphasis role="bold">asetkey add rxkad_krb5</emphasis> <<replaceable>kvno</replaceable>> <emphasis role="bold">17 /usr/afs/etc/rxkad.keytab afs/</emphasis><<replaceable>cell name</replaceable>>
1691 <title>Starting the Server Processes</title>
1693 <para>Now that the keys are in place, proceed to start the server
1697 <para>If you are building from source, you need to install the
1698 compiled files to the local
1699 <emphasis role="bold">/usr/afs</emphasis> directory. <indexterm>
1700 <primary>commands</primary>
1702 <secondary>bosserver</secondary>
1703 </indexterm> <indexterm>
1704 <primary>bosserver command</primary>
1709 <para>Issue the <emphasis role="bold">bosserver</emphasis> command.
1711 # <emphasis role="bold">/usr/afs/bin/bosserver</emphasis>
1712 </programlisting></para>
1716 <para>Verify that the BOS Server created <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
1717 role="bold">/usr/vice/etc/CellServDB</emphasis> as symbolic links to the corresponding files in the <emphasis
1718 role="bold">/usr/afs/etc</emphasis> directory. <programlisting>
1719 # <emphasis role="bold">ls -l /usr/vice/etc</emphasis>
1720 </programlisting></para>
1722 <para>If either or both of <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> and <emphasis
1723 role="bold">/usr/vice/etc/CellServDB</emphasis> do not exist, or are not links, issue the following commands.</para>
1726 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
1727 # <emphasis role="bold">ln -s /usr/afs/etc/ThisCell</emphasis>
1728 # <emphasis role="bold">ln -s /usr/afs/etc/CellServDB</emphasis>
1731 </orderedlist></para>
1734 <primary>cell name</primary>
1736 <secondary>defining during installation of first machine</secondary>
1740 <primary>defining</primary>
1742 <secondary>cell name during installation of first machine</secondary>
1746 <primary>cell name</primary>
1748 <secondary>setting in server ThisCell file</secondary>
1750 <tertiary>first AFS machine</tertiary>
1754 <primary>setting</primary>
1756 <secondary>cell name in server ThisCell file</secondary>
1758 <tertiary>first AFS machine</tertiary>
1762 <primary>first AFS machine</primary>
1764 <secondary>ThisCell file (server)</secondary>
1768 <primary>usr/afs/etc/ThisCell</primary>
1770 <see>ThisCell file (server)</see>
1774 <primary>ThisCell file (server)</primary>
1776 <secondary>first AFS machine</secondary>
1780 <primary>files</primary>
1782 <secondary>ThisCell (server)</secondary>
1786 <primary>database server machine</primary>
1788 <secondary>entry in server CellServDB file</secondary>
1790 <tertiary>on first AFS machine</tertiary>
1794 <primary>first AFS machine</primary>
1796 <secondary>cell membership, defining</secondary>
1798 <tertiary>for server processes</tertiary>
1802 <primary>usr/afs/etc/CellServDB file</primary>
1804 <see>CellServDB file (server)</see>
1808 <primary>CellServDB file (server)</primary>
1810 <secondary>creating</secondary>
1812 <tertiary>on first AFS machine</tertiary>
1816 <primary>creating</primary>
1818 <secondary>CellServDB file (server)</secondary>
1820 <tertiary>first AFS machine</tertiary>
1824 <primary>files</primary>
1826 <secondary>CellServDB (server)</secondary>
1830 <primary>first AFS machine</primary>
1832 <secondary>CellServDB file (server)</secondary>
1836 <primary>first AFS machine</primary>
1838 <secondary>defining</secondary>
1840 <tertiary>as database server</tertiary>
1844 <primary>defining</primary>
1846 <secondary>first AFS machine as database server</secondary>
1851 <sect1 id="HDRWQ51">
1852 <title>Defining Cell Name and Membership for Server Processes</title>
1854 <para>Now assign your cell's name. The chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell configuration
1855 and administration issues discusses the important considerations, explains why changing the name is difficult, and outlines the
1856 restrictions on name format. Two of the most important restrictions are that the name cannot include uppercase letters or more
1857 than 64 characters.</para>
1859 <para>Use the <emphasis role="bold">bos setcellname</emphasis> command to assign the cell name. It creates two files:
1862 <para><emphasis role="bold">/usr/afs/etc/ThisCell</emphasis>, which defines this machine's cell membership</para>
1866 <para><emphasis role="bold">/usr/afs/etc/CellServDB</emphasis>, which lists the cell's database server machines; the
1867 machine named on the command line is placed on the list automatically</para>
1869 </itemizedlist> <note>
1870 <para>In the following and every instruction in this guide, for the <replaceable>machine name</replaceable> argument
1871 substitute the fully-qualified hostname (such as <emphasis role="bold">fs1.example.com</emphasis>) of the machine you are
1872 installing. For the <replaceable>cell name</replaceable> argument substitute your cell's complete name (such as <emphasis
1873 role="bold">example.com</emphasis>).</para>
1877 <primary>commands</primary>
1879 <secondary>bos setcellname</secondary>
1883 <primary>bos commands</primary>
1885 <secondary>setcellname</secondary>
1890 <para>If necessary, add the directory containing the <emphasis role="bold">bos</emphasis> command to your path.
1892 # <emphasis role="bold">export PATH=$PATH:/usr/afs/bin</emphasis>
1898 <para>Issue the <emphasis role="bold">bos setcellname</emphasis> command to set the cell name. <programlisting>
1899 # <emphasis role="bold">bos setcellname</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>cell name</replaceable>> <emphasis
1900 role="bold">-localauth</emphasis>
1901 </programlisting></para> <indexterm>
1902 <primary>commands</primary>
1904 <secondary>bos listhosts</secondary>
1905 </indexterm> <indexterm>
1906 <primary>bos commands</primary>
1908 <secondary>listhosts</secondary>
1909 </indexterm> <indexterm>
1910 <primary>CellServDB file (server)</primary>
1912 <secondary>displaying entries</secondary>
1913 </indexterm> <indexterm>
1914 <primary>displaying</primary>
1916 <secondary>CellServDB file (server) entries</secondary>
1921 <para>Issue the <emphasis role="bold">bos listhosts</emphasis> command to verify that the machine you are installing is now
1922 registered as the cell's first database server machine. <programlisting>
1923 # <emphasis role="bold">bos listhosts</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">-localauth</emphasis>
1924 Cell name is <replaceable>cell_name</replaceable>
1925 Host 1 is <replaceable>machine_name</replaceable>
1926 </programlisting></para>
1931 <primary>database server machine</primary>
1933 <secondary>installing</secondary>
1935 <tertiary>first</tertiary>
1939 <primary>instructions</primary>
1941 <secondary>database server machine, installing first</secondary>
1945 <primary>installing</primary>
1947 <secondary>database server machine</secondary>
1949 <tertiary>first</tertiary>
1953 <primary>Backup Server</primary>
1955 <secondary>starting</secondary>
1957 <tertiary>first AFS machine</tertiary>
1961 <primary>buserver process</primary>
1963 <see>Backup Server</see>
1967 <primary>starting</primary>
1969 <secondary>Backup Server</secondary>
1971 <tertiary>first AFS machine</tertiary>
1975 <primary>first AFS machine</primary>
1977 <secondary>Backup Server</secondary>
1981 <primary>Protection Server</primary>
1983 <secondary>starting</secondary>
1985 <tertiary>first AFS machine</tertiary>
1989 <primary>ptserver process</primary>
1991 <see>Protection Server</see>
1995 <primary>starting</primary>
1997 <secondary>Protection Server</secondary>
1999 <tertiary>first AFS machine</tertiary>
2003 <primary>first AFS machine</primary>
2005 <secondary>Protection Server</secondary>
2009 <primary>VL Server (vlserver process)</primary>
2011 <secondary>starting</secondary>
2013 <tertiary>first AFS machine</tertiary>
2017 <primary>Volume Location Server</primary>
2019 <see>VL Server</see>
2023 <primary>starting</primary>
2025 <secondary>VL Server</secondary>
2027 <tertiary>first AFS machine</tertiary>
2031 <primary>first AFS machine</primary>
2033 <secondary>VL Server</secondary>
2037 <primary>usr/afs/local/BosConfig</primary>
2039 <see>BosConfig file</see>
2043 <primary>BosConfig file</primary>
2045 <secondary>adding entries</secondary>
2047 <tertiary>first AFS machine</tertiary>
2051 <primary>adding</primary>
2053 <secondary>entries to BosConfig file</secondary>
2055 <tertiary>first AFS machine</tertiary>
2059 <primary>files</primary>
2061 <secondary>BosConfig</secondary>
2065 <primary>initializing</primary>
2067 <secondary>server process</secondary>
2073 <primary>server process</primary>
2075 <secondary>see also entry for each server's name</secondary>
2079 <sect1 id="HDRWQ52">
2080 <title>Starting the Database Server Processes</title>
2082 <para>Next use the <emphasis role="bold">bos create</emphasis> command to create entries for the three database server processes
2083 in the <emphasis role="bold">/usr/afs/local/BosConfig</emphasis> file and start them running. The three processes run on database
2084 server machines only: <itemizedlist>
2087 <para>The Protection Server (the <emphasis role="bold">ptserver</emphasis> process) maintains the Protection
2092 <para>The Volume Location (VL) Server (the <emphasis role="bold">vlserver</emphasis> process) maintains the Volume
2093 Location Database (VLDB)</para>
2097 <para>The optional Backup Server (the <emphasis role="bold">buserver</emphasis> process) maintains the Backup Database</para>
2099 </itemizedlist></para>
2102 <primary>Kerberos</primary>
2106 <para>AFS ships with an additional database server named 'kaserver', which
2107 was historically used to provide authentication services to AFS cells.
2108 kaserver was based on <emphasis>Kerberos v4</emphasis>, as such, it is
2109 not recommended for new cells. This guide assumes you have already
2110 configured a Kerberos v5 realm for your site, and details the procedures
2111 required to use AFS with this realm. If you do wish to use
2112 <emphasis role="bold">kaserver</emphasis>, please see the modifications
2113 to these instructions detailed in
2114 <link linkend="KAS006">Starting the kaserver Database Server Process</link>
2118 <para>The remaining instructions in this chapter include the <emphasis role="bold">-cell</emphasis> argument on all applicable
2119 commands. Provide the cell name you assigned in <link linkend="HDRWQ51">Defining Cell Name and Membership for Server
2120 Processes</link>. If a command appears on multiple lines, it is only for legibility. <indexterm>
2121 <primary>commands</primary>
2123 <secondary>bos create</secondary>
2124 </indexterm> <indexterm>
2125 <primary>bos commands</primary>
2127 <secondary>create</secondary>
2128 </indexterm> <orderedlist>
2130 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the Protection Server. <programlisting>
2131 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">ptserver simple /usr/afs/bin/ptserver</emphasis> <emphasis role="bold">-localauth</emphasis>
2132 </programlisting></para>
2136 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the VL Server. <programlisting>
2137 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">vlserver simple /usr/afs/bin/vlserver</emphasis> <emphasis role="bold">-localauth</emphasis>
2138 </programlisting></para>
2142 <para>Optionally, issue the <emphasis role="bold">bos create</emphasis> command to start the Backup Server. <programlisting>
2143 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">buserver simple /usr/afs/bin/buserver</emphasis> <emphasis role="bold">-localauth</emphasis>
2144 </programlisting></para>
2146 </orderedlist></para>
2149 <primary>admin account</primary>
2151 <secondary>creating</secondary>
2155 <primary>afs entry in Kerberos Database</primary>
2159 <primary>Kerberos Database</primary>
2163 <primary>creating</primary>
2165 <secondary>afs entry in Kerberos Database</secondary>
2169 <primary>creating</primary>
2171 <secondary>admin account in Kerberos Database</secondary>
2175 <primary>security</primary>
2177 <secondary>initializing cell-wide</secondary>
2181 <primary>cell</primary>
2183 <secondary>initializing security mechanisms</secondary>
2187 <primary>initializing</primary>
2189 <secondary>cell security mechanisms</secondary>
2193 <primary>usr/afs/etc/KeyFile</primary>
2195 <see>KeyFile file</see>
2199 <primary>KeyFile file</primary>
2201 <secondary>first AFS machine</secondary>
2205 <primary>files</primary>
2207 <secondary>KeyFile</secondary>
2211 <primary>key</primary>
2213 <see>server encryption key</see>
2217 <primary>encryption key</primary>
2219 <see>server encryption key</see>
2223 <sect1 id="HDRWQ53">
2224 <title>Initializing Cell Security </title>
2226 <para>If you are working with an existing cell which uses
2227 <emphasis role="bold">kaserver</emphasis> or Kerberos v4 for authentication,
2229 <link linkend="HDRWQ53">Initializing Cell Security with kaserver</link>
2230 for installation instructions which replace this section.</para>
2232 <para>Now finish initializing the cell's security mechanisms. Begin by creating the following entry in your site's Kerberos database: <itemizedlist>
2234 <para>A generic administrative account, called <emphasis role="bold">admin</emphasis> by convention. If you choose to
2235 assign a different name, substitute it throughout the remainder of this document.</para>
2237 <para>After you complete the installation of the first machine, you can continue to have all administrators use the
2238 <emphasis role="bold">admin</emphasis> account, or you can create a separate administrative account for each of them. The
2239 latter scheme implies somewhat more overhead, but provides a more informative audit trail for administrative
2242 </itemizedlist></para>
2244 <para>You also issue several commands that enable the new <emphasis role="bold">admin</emphasis> user to issue privileged
2245 commands in all of the AFS suites.</para>
2247 <para>The following instructions do not configure all of the security mechanisms related to the AFS Backup System. See the
2248 chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about configuring the Backup System.</para>
2250 <para>The examples below assume you are using MIT Kerberos. Please refer
2251 to the documentation for your KDC's administrative interface if you are
2252 using a different vendor</para>
2256 <para>Enter <emphasis role="bold">kadmin</emphasis> interactive mode.
2258 # <emphasis role="bold">kadmin</emphasis>
2259 Authenticating as principal <replaceable>you</replaceable>/admin@<replaceable>YOUR REALM</replaceable> with password
2260 Password for <replaceable>you/admin@REALM</replaceable>: <replaceable>your_password</replaceable>
2261 </programlisting> </para>
2266 <emphasis role="bold">add_principal</emphasis> command to create
2267 the Kerberos Database entry for
2268 <emphasis role="bold">admin</emphasis>.</para>
2270 <para>You should make the <replaceable>admin_passwd</replaceable> as
2271 long and complex as possible, but keep in mind that administrators
2272 need to enter it often. It must be at least six characters long.
2274 kadmin: <emphasis role="bold">add_principal admin</emphasis>
2275 Enter password for principal "admin@<replaceable>REALM</replaceable>": <emphasis role="bold"><replaceable>admin_password</replaceable></emphasis>
2276 Principal "admin@<replaceable>REALM</replaceable>" created.
2281 <primary>displaying</primary>
2283 <secondary>server encryption key</secondary>
2285 <tertiary>Authentication Database</tertiary>
2290 <para>Issue the <emphasis role="bold">quit</emphasis> command to leave <emphasis role="bold">kadmin</emphasis>
2291 interactive mode. <programlisting>
2292 kadmin: <emphasis role="bold">quit</emphasis>
2293 </programlisting> <indexterm>
2294 <primary>commands</primary>
2296 <secondary>bos adduser</secondary>
2297 </indexterm> <indexterm>
2298 <primary>bos commands</primary>
2300 <secondary>adduser</secondary>
2301 </indexterm> <indexterm>
2302 <primary>usr/afs/etc/UserList</primary>
2304 <see>UserList file</see>
2305 </indexterm> <indexterm>
2306 <primary>UserList file</primary>
2308 <secondary>first AFS machine</secondary>
2309 </indexterm> <indexterm>
2310 <primary>files</primary>
2312 <secondary>UserList</secondary>
2313 </indexterm> <indexterm>
2314 <primary>creating</primary>
2316 <secondary>UserList file entry</secondary>
2317 </indexterm> <indexterm>
2318 <primary>admin account</primary>
2320 <secondary>adding</secondary>
2322 <tertiary>to UserList file</tertiary>
2326 <listitem id="LIWQ57">
2327 <para>Issue the <emphasis role="bold">bos adduser</emphasis> command to add the <emphasis
2328 role="bold">admin</emphasis> user to the <emphasis role="bold">/usr/afs/etc/UserList</emphasis> file. This enables the
2329 <emphasis role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">bos</emphasis> and <emphasis
2330 role="bold">vos</emphasis> commands. <programlisting>
2331 # <emphasis role="bold">./bos adduser</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">admin -localauth</emphasis>
2334 <primary>commands</primary>
2335 <secondary>asetkey</secondary>
2338 <primary>creating</primary>
2339 <secondary>server encryption key</secondary>
2340 <tertiary>KeyFile file</tertiary>
2343 <primary>server encryption key</primary>
2344 <secondary>in KeyFile file</secondary>
2349 <sect1 id="HDRWQ53a">
2350 <title>Initializing the Protection Database</title>
2352 <para>Now continue to configure your cell's security systems by
2353 populating the Protection Database with the newly created
2354 <emphasis role="bold">admin</emphasis> user, and permitting it
2355 to issue priviledged commands on the AFS filesystem.
2356 There is nothing special about the name "admin"; it is just a
2357 convenient name for these instructions. An other name could
2358 be used throughout this document, or multiple privileged
2359 accounts created.</para>
2363 <para>Issue the <emphasis role="bold">pts createuser</emphasis> command to create a Protection Database entry for the
2364 <emphasis role="bold">admin</emphasis> user.
2366 <primary>commands</primary>
2367 <secondary>pts createuser</secondary>
2371 <primary>pts commands</primary>
2372 <secondary>createuser</secondary>
2376 <primary>Protection Database</primary>
2379 <para>By default, the Protection Server assigns AFS UID 1 (one) to the <emphasis role="bold">admin</emphasis> user,
2380 because it is the first user entry you are creating. If the local password file (<emphasis
2381 role="bold">/etc/passwd</emphasis> or equivalent) already has an entry for <emphasis role="bold">admin</emphasis> that
2382 assigns it a UNIX UID other than 1, it is best to use the <emphasis role="bold">-id</emphasis> argument to the <emphasis
2383 role="bold">pts createuser</emphasis> command to make the new AFS UID match the existing UNIX UID. Otherwise, it is best
2384 to accept the default.</para>
2387 # <emphasis role="bold">pts createuser -name admin</emphasis> [<emphasis
2388 role="bold">-id</emphasis> <<replaceable>AFS UID</replaceable>>] <emphasis role="bold">-localauth</emphasis>
2389 User admin has id <replaceable>AFS UID</replaceable>
2393 <primary>commands</primary>
2394 <secondary>pts adduser</secondary>
2398 <primary>pts commands</primary>
2399 <secondary>adduser</secondary>
2403 <primary>system:administrators group</primary>
2407 <primary>admin account</primary>
2408 <secondary>adding</secondary>
2409 <tertiary>to system:administrators group</tertiary>
2414 <para>Issue the <emphasis role="bold">pts adduser</emphasis> command to make the <emphasis role="bold">admin</emphasis>
2415 user a member of the <emphasis role="bold">system:administrators</emphasis> group, and the <emphasis role="bold">pts
2416 membership</emphasis> command to verify the new membership. Membership in the group enables the <emphasis
2417 role="bold">admin</emphasis> user to issue privileged <emphasis role="bold">pts</emphasis> commands and some privileged
2418 <emphasis role="bold">fs</emphasis> commands. <programlisting>
2419 # <emphasis role="bold">./pts adduser admin system:administrators</emphasis> <emphasis role="bold">-localauth</emphasis>
2420 # <emphasis role="bold">./pts membership admin</emphasis> <emphasis role="bold">-localauth</emphasis>
2421 Groups admin (id: 1) is a member of:
2422 system:administrators
2423 </programlisting> <indexterm>
2424 <primary>commands</primary>
2425 <secondary>bos restart</secondary>
2426 <tertiary>on first AFS machine</tertiary>
2427 </indexterm> <indexterm>
2428 <primary>bos commands</primary>
2429 <secondary>restart</secondary>
2430 <tertiary>on first AFS machine</tertiary>
2431 </indexterm> <indexterm>
2432 <primary>restarting server process</primary>
2433 <secondary>on first AFS machine</secondary>
2434 </indexterm> <indexterm>
2435 <primary>server process</primary>
2436 <secondary>restarting</secondary>
2437 <tertiary>on first AFS machine</tertiary>
2443 <primary>File Server</primary>
2445 <secondary>first AFS machine</secondary>
2449 <primary>fileserver process</primary>
2451 <see>File Server</see>
2455 <primary>starting</primary>
2457 <secondary>File Server</secondary>
2459 <tertiary>first AFS machine</tertiary>
2463 <primary>first AFS machine</primary>
2465 <secondary>File Server, fs process</secondary>
2469 <primary>Volume Server</primary>
2471 <secondary>first AFS machine</secondary>
2475 <primary>volserver process</primary>
2477 <see>Volume Server</see>
2481 <primary>starting</primary>
2483 <secondary>Volume Server</secondary>
2485 <tertiary>first AFS machine</tertiary>
2489 <primary>first AFS machine</primary>
2491 <secondary>Volume Server</secondary>
2495 <primary>Salvager (salvager process)</primary>
2497 <secondary>first AFS machine</secondary>
2501 <primary>fs process</primary>
2503 <secondary>first AFS machine</secondary>
2507 <primary>starting</primary>
2509 <secondary>fs process</secondary>
2511 <tertiary>first AFS machine</tertiary>
2515 <primary>first AFS machine</primary>
2517 <secondary>Salvager</secondary>
2521 <sect1 id="HDRWQ60">
2522 <title>Starting the File Server processes</title>
2525 <emphasis role="bold">dafs</emphasis> process.
2526 The <emphasis role="bold">dafs</emphasis> process consists of the
2527 Demand-Attach File Server, Volume Server, Salvage Server, and Salvager (<emphasis role="bold">dafileserver</emphasis>,
2528 <emphasis role="bold"> davolserver</emphasis>, <emphasis role="bold">salvageserver</emphasis>, and <emphasis
2529 role="bold">dasalvager</emphasis> processes). Most sites should run the
2530 Demand-Attach File Server, but the traditional/legacy File Server remains
2531 an option. If you are uncertain whether to run the legacy File Server,
2532 see <link linkend="DAFS">Appendix C, The Demand-Attach File Server</link>.
2535 <para>Issue the <emphasis role="bold">bos create</emphasis> command to start the
2536 <emphasis role="bold">dafs</emphasis> process. The commands appear here on multiple lines only for legibility.
2540 <para>Create the <emphasis
2541 role="bold">dafs</emphasis> process:
2543 # <emphasis role="bold">./bos create</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">dafs dafs /usr/afs/bin/dafileserver</emphasis> \
2544 <emphasis role="bold">/usr/afs/bin/davolserver /usr/afs/bin/salvageserver</emphasis> \
2545 <emphasis role="bold">/usr/afs/bin/dasalvager</emphasis> <emphasis role="bold">-localauth</emphasis>
2546 </programlisting></para>
2551 <para>Sometimes a message about Volume Location Database (VLDB) initialization appears, along with one or more instances
2552 of an error message similar to the following:</para>
2555 FSYNC_clientInit temporary failure (will retry)
2558 <para>This message appears when the <emphasis role="bold">volserver</emphasis> process tries to start before the <emphasis
2559 role="bold">fileserver</emphasis> process has completed its initialization. Wait a few minutes after the last such message
2560 before continuing, to guarantee that both processes have started successfully. <indexterm>
2561 <primary>commands</primary>
2563 <secondary>bos status</secondary>
2564 </indexterm> <indexterm>
2565 <primary>bos commands</primary>
2567 <secondary>status</secondary>
2570 <para>You can verify that the <emphasis role="bold">dafs</emphasis> process has started
2571 successfully by issuing the <emphasis role="bold">bos status</emphasis> command. Its output mentions two <computeroutput>proc
2572 starts</computeroutput>.</para>
2576 # <emphasis role="bold">./bos status</emphasis> <<replaceable>machine name</replaceable>> <emphasis role="bold">dafs -long -localauth</emphasis>
2577 </programlisting></para>
2581 <para>Your next action depends on whether you have ever run AFS file server machines in the cell: <itemizedlist>
2583 <primary>commands</primary>
2585 <secondary>vos create</secondary>
2587 <tertiary>root.afs volume</tertiary>
2591 <primary>vos commands</primary>
2593 <secondary>create</secondary>
2595 <tertiary>root.afs volume</tertiary>
2599 <primary>root.afs volume</primary>
2601 <secondary>creating</secondary>
2605 <primary>volume</primary>
2607 <secondary>creating</secondary>
2609 <tertiary>root.afs</tertiary>
2613 <primary>creating</primary>
2615 <secondary>root.afs volume</secondary>
2619 <para>If you are installing the first AFS server machine ever in the cell (that is, you are not upgrading the AFS
2620 software from a previous version), create the first AFS volume, <emphasis role="bold">root.afs</emphasis>.</para>
2622 <para>For the <replaceable>partition name</replaceable> argument, substitute the name of one of the machine's AFS
2623 server partitions (such as <emphasis role="bold">/vicepa</emphasis>).</para>
2626 # <emphasis role="bold">./vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
2627 role="bold">root.afs</emphasis> \
2628 <emphasis role="bold">-localauth</emphasis>
2631 <para>The Volume Server produces a message confirming that it created the volume on the specified partition. <indexterm>
2632 <primary>commands</primary>
2634 <secondary>vos syncvldb</secondary>
2635 </indexterm> <indexterm>
2636 <primary>vos commands</primary>
2638 <secondary>syncvldb</secondary>
2639 </indexterm> <indexterm>
2640 <primary>commands</primary>
2642 <secondary>vos syncserv</secondary>
2643 </indexterm> <indexterm>
2644 <primary>vos commands</primary>
2646 <secondary>syncserv</secondary>
2649 </itemizedlist></para>
2651 </orderedlist></para>
2654 <primary>Update Server</primary>
2656 <secondary>starting server portion</secondary>
2658 <tertiary>first AFS machine</tertiary>
2662 <primary>upserver process</primary>
2664 <see>Update Server</see>
2668 <primary>starting</primary>
2670 <secondary>Update Server server portion</secondary>
2672 <tertiary>first AFS machine</tertiary>
2676 <primary>first AFS machine</primary>
2678 <secondary>Update Server server portion</secondary>
2682 <primary>first AFS machine</primary>
2684 <secondary>defining</secondary>
2686 <tertiary>as binary distribution machine</tertiary>
2690 <primary>first AFS machine</primary>
2692 <secondary>defining</secondary>
2694 <tertiary>as system control machine</tertiary>
2698 <primary>system control machine</primary>
2702 <primary>binary distribution machine</primary>
2706 <sect1 id="HDRWQ62">
2707 <title>Clock Sync Considerations</title>
2709 <para>Keeping the clocks on all server and client machines in your cell synchronized is crucial to several functions, and in
2710 particular to the correct operation of AFS's distributed database technology, Ubik. The chapter in the <emphasis>OpenAFS
2711 Administration Guide</emphasis> about administering server machines explains how time skew can disturb Ubik's performance and
2712 cause service outages in your cell.</para>
2714 <para>You should install and configure your time service independently of
2715 AFS. Your Kerberos realm will also require a reliable time source, so your site
2716 may already have one available.</para>
2719 <primary>overview</primary>
2721 <secondary>installing client functionality on first machine</secondary>
2725 <primary>first AFS machine</primary>
2727 <secondary>client functionality</secondary>
2729 <tertiary>installing</tertiary>
2733 <primary>installing</primary>
2735 <secondary>client functionality</secondary>
2737 <tertiary>first AFS machine</tertiary>
2741 <sect1 id="HDRWQ63">
2742 <title>Overview: Installing Client Functionality</title>
2744 <para>The machine you are installing is now an AFS file server machine
2745 and database server machine.
2746 Now make it a client machine by completing the following tasks:
2749 <para>Define the machine's cell membership for client processes</para>
2753 <para>Create the client version of the <emphasis role="bold">CellServDB</emphasis> file</para>
2757 <para>Define cache location and size</para>
2761 <para>Create the <emphasis role="bold">/afs</emphasis> directory and start the Cache Manager</para>
2763 </orderedlist></para>
2766 <primary>Distribution</primary>
2768 <secondary>copying client files from</secondary>
2770 <tertiary>first AFS machine</tertiary>
2774 <primary>first AFS machine</primary>
2776 <secondary>copying</secondary>
2778 <tertiary>client files to local disk</tertiary>
2782 <primary>copying</primary>
2784 <secondary>client files to local disk</secondary>
2786 <tertiary>first AFS machine</tertiary>
2790 <sect1 id="HDRWQ64">
2791 <title>Copying Client Files to the Local Disk</title>
2793 <para>You need only undertake the steps in this section, if you are using
2794 a tar file distribution, or one built from scratch. Packaged distributions,
2795 such as RPMs or DEBs will already have installed the necessary files in
2796 the correct locations.</para>
2798 <para>Before installing and configuring the AFS client, copy the necessary files from the tarball to the local <emphasis
2799 role="bold">/usr/vice/etc</emphasis> directory. <orderedlist>
2801 <para>If you have not already done so, unpack the distribution
2802 tarball for this machine's system type into a suitable location on
2803 the filesystem, such as <emphasis role="bold">/tmp/afsdist</emphasis>.
2804 If you use a different location, substitue that in the examples that
2809 <para>Copy files to the local <emphasis role="bold">/usr/vice/etc</emphasis> directory.</para>
2811 <para>This step places a copy of the AFS initialization script (and related files, if applicable) into the <emphasis
2812 role="bold">/usr/vice/etc</emphasis> directory. In the preceding instructions for incorporating AFS into the kernel, you
2813 copied the script directly to the operating system's conventional location for initialization files. When you incorporate
2814 AFS into the machine's startup sequence in a later step, you can choose to link the two files.</para>
2816 <para>On some system types that use a dynamic kernel loader program, you previously copied AFS library files into a
2817 subdirectory of the <emphasis role="bold">/usr/vice/etc</emphasis> directory. On other system types, you copied the
2818 appropriate AFS library file directly to the directory where the operating system accesses it. The following commands do
2819 not copy or recopy the AFS library files into the <emphasis role="bold">/usr/vice/etc</emphasis> directory, because on
2820 some system types the library files consume a large amount of space. If you want to copy them, add the <emphasis
2821 role="bold">-r</emphasis> flag to the first <emphasis role="bold">cp</emphasis> command and skip the second <emphasis
2822 role="bold">cp</emphasis> command.</para>
2825 # <emphasis role="bold">cd /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/root.client/usr/vice/etc</emphasis>
2826 # <emphasis role="bold">cp -p * /usr/vice/etc</emphasis>
2827 # <emphasis role="bold">cp -rp C /usr/vice/etc</emphasis>
2830 </orderedlist></para>
2833 <primary>cell name</primary>
2835 <secondary>setting in client ThisCell file</secondary>
2837 <tertiary>first AFS machine</tertiary>
2841 <primary>setting</primary>
2843 <secondary>cell name in client ThisCell file</secondary>
2845 <tertiary>first AFS machine</tertiary>
2849 <primary>first AFS machine</primary>
2851 <secondary>ThisCell file (client)</secondary>
2855 <primary>first AFS machine</primary>
2857 <secondary>cell membership, defining</secondary>
2859 <tertiary>for client processes</tertiary>
2863 <primary>usr/vice/etc/ThisCell</primary>
2865 <see>ThisCell file (client)</see>
2869 <primary>ThisCell file (client)</primary>
2871 <secondary>first AFS machine</secondary>
2875 <primary>files</primary>
2877 <secondary>ThisCell (client)</secondary>
2881 <sect1 id="HDRWQ65">
2882 <title>Defining Cell Membership for Client Processes</title>
2884 <para>Every AFS client machine has a copy of the <emphasis role="bold">/usr/vice/etc/ThisCell</emphasis> file on its local disk
2885 to define the machine's cell membership for the AFS client programs that run on it. The <emphasis
2886 role="bold">ThisCell</emphasis> file you created in the <emphasis role="bold">/usr/afs/etc</emphasis> directory (in <link
2887 linkend="HDRWQ51">Defining Cell Name and Membership for Server Processes</link>) is used only by server processes.</para>
2889 <para>Among other functions, the <emphasis role="bold">ThisCell</emphasis> file on a client machine determines the following:
2892 <para>The cell in which users gain tokens when they log onto the
2893 machine, assuming it is using an AFS-modified login utility</para>
2897 <para>The cell in which users gain tokens by default when they issue
2898 the <emphasis role="bold">aklog</emphasis> command</para>
2902 <para>The cell membership of the AFS server processes that the AFS
2903 command interpreters on this machine contact by default</para>
2908 <para>Change to the <emphasis role="bold">/usr/vice/etc</emphasis> directory and remove the symbolic link created in <link
2909 linkend="HDRWQ50">Starting the BOS Server</link>. <programlisting>
2910 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
2911 # <emphasis role="bold">rm ThisCell</emphasis>
2912 </programlisting></para>
2916 <para>Create the <emphasis role="bold">ThisCell</emphasis> file as a copy of the <emphasis
2917 role="bold">/usr/afs/etc/ThisCell</emphasis> file. Defining the same local cell for both server and client processes leads
2918 to the most consistent AFS performance. <programlisting>
2919 # <emphasis role="bold">cp /usr/afs/etc/ThisCell ThisCell</emphasis>
2920 </programlisting></para>
2922 </orderedlist></para>
2925 <primary>database server machine</primary>
2927 <secondary>entry in client CellServDB file</secondary>
2929 <tertiary>on first AFS machine</tertiary>
2933 <primary>usr/vice/etc/CellServDB</primary>
2935 <see>CellServDB file (client)</see>
2939 <primary>CellServDB file (client)</primary>
2941 <secondary>creating</secondary>
2943 <tertiary>on first AFS machine</tertiary>
2947 <primary>creating</primary>
2949 <secondary>CellServDB file (client)</secondary>
2951 <tertiary>first AFS machine</tertiary>
2955 <primary>CellServDB file (client)</primary>
2957 <secondary>required format</secondary>
2961 <primary>requirements</primary>
2963 <secondary>CellServDB file format (client version)</secondary>
2967 <primary>files</primary>
2969 <secondary>CellServDB (client)</secondary>
2973 <primary>first AFS machine</primary>
2975 <secondary>CellServDB file (client)</secondary>
2979 <sect1 id="HDRWQ66">
2980 <title>Creating the Client CellServDB File</title>
2982 <para>The <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file on a client machine's local disk lists the database
2983 server machines for each cell that the local Cache Manager can contact. If there is no entry in the file for a cell, or if the
2984 list of database server machines is wrong, then users working on this machine cannot access the cell. The chapter in the
2985 <emphasis>OpenAFS Administration Guide</emphasis> about administering client machines explains how to maintain the file after
2988 <para>As the <emphasis role="bold">afsd</emphasis> program initializes the Cache Manager, it copies the contents of the
2989 <emphasis role="bold">CellServDB</emphasis> file into kernel memory. The Cache Manager always consults the list in kernel memory
2990 rather than the <emphasis role="bold">CellServDB</emphasis> file itself. Between reboots of the machine, you can use the
2991 <emphasis role="bold">fs newcell</emphasis> command to update the list in kernel memory directly; see the chapter in the
2992 <emphasis>OpenAFS Administration Guide</emphasis> about administering client machines.</para>
2994 <para>The AFS distribution includes the file
2995 <emphasis role="bold">CellServDB.dist</emphasis>. It includes an entry for
2996 all AFS cells that agreed to share their database server machine
2997 information at the time the distribution was
2998 created. The definitive copy of this file is maintained at
2999 grand.central.org, and updates may be obtained from
3000 /afs/grand.central.org/service/CellServDB or
3001 <ulink url="http://grand.central.org/dl/cellservdb/CellServDB">
3002 http://grand.central.org/dl/cellservdb/CellServDB</ulink></para>
3004 <para>The <emphasis role="bold">CellServDB.dist</emphasis> file can be a
3005 good basis for the client <emphasis role="bold">CellServDB</emphasis> file,
3006 because all of the entries in it use the correct format. You can add or
3007 remove cell entries as you see fit. Depending on your cache manager
3008 configuration, additional steps (as detailed in
3009 <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>) may be
3010 required to enable the Cache Manager to actually reach the cells.</para>
3012 <para>In this section, you add an entry for the local cell to the local <emphasis role="bold">CellServDB</emphasis> file. The
3013 current working directory is still <emphasis role="bold">/usr/vice/etc</emphasis>. <orderedlist>
3015 <para>Remove the symbolic link created in <link linkend="HDRWQ50">Starting the BOS Server</link> and rename the <emphasis
3016 role="bold">CellServDB.sample</emphasis> file to <emphasis role="bold">CellServDB</emphasis>. <programlisting>
3017 # <emphasis role="bold">rm CellServDB</emphasis>
3018 # <emphasis role="bold">mv CellServDB.sample CellServDB</emphasis>
3019 </programlisting></para>
3023 <para>Add an entry for the local cell to the <emphasis role="bold">CellServDB</emphasis> file. One easy method is to use
3024 the <emphasis role="bold">cat</emphasis> command to append the contents of the server <emphasis
3025 role="bold">/usr/afs/etc/CellServDB</emphasis> file to the client version. <programlisting>
3026 # <emphasis role="bold">cat /usr/afs/etc/CellServDB >> CellServDB</emphasis>
3027 </programlisting></para>
3029 <para>Then open the file in a text editor to verify that there are no blank lines, and that all entries have the required
3030 format, which is described just following. The ordering of cells is not significant, but it can be convenient to have the
3031 client machine's home cell at the top; move it there now if you wish. <itemizedlist>
3033 <para>The first line of a cell's entry has the following format: <programlisting>
3034 ><replaceable>cell_name</replaceable> #<replaceable>organization</replaceable>
3035 </programlisting></para>
3037 <para>where <replaceable>cell_name</replaceable> is the cell's complete Internet domain name (for example, <emphasis
3038 role="bold">example.com</emphasis>) and <replaceable>organization</replaceable> is an optional field that follows any
3039 number of spaces and the number sign (<computeroutput>#</computeroutput>). By convention it names the organization
3040 to which the cell corresponds (for example, the Example Corporation).</para>
3044 <para>After the first line comes a separate line for each database server machine. Each line has the following
3045 format: <programlisting>
3046 <replaceable>IP_address</replaceable> #<replaceable>machine_name</replaceable>
3047 </programlisting></para>
3049 <para>where <replaceable>IP_address</replaceable> is the machine's IP address in dotted decimal format (for example,
3050 192.12.105.3). Following any number of spaces and the number sign (<computeroutput>#</computeroutput>) is
3051 <replaceable>machine_name</replaceable>, the machine's fully-qualified hostname (for example, <emphasis
3052 role="bold">db1.example.com</emphasis>). In this case, the number sign does not indicate a comment;
3053 <replaceable>machine_name</replaceable> is a required field.</para>
3055 </itemizedlist></para>
3059 <para>If the file includes cells that you do not wish users of this machine to access, remove their entries.</para>
3061 </orderedlist></para>
3063 <para>The following example shows entries for two cells, each of which has three database server machines:</para>
3066 >example.com #Example Corporation (home cell)
3067 192.12.105.3 #db1.example.com
3068 192.12.105.4 #db2.example.com
3069 192.12.105.55 #db3.example.com
3070 >example.org #Example Organization cell
3071 138.255.68.93 #serverA.example.org
3072 138.255.68.72 #serverB.example.org
3073 138.255.33.154 #serverC.example.org
3077 <primary>cache</primary>
3079 <secondary>configuring</secondary>
3081 <tertiary>first AFS machine</tertiary>
3085 <primary>configuring</primary>
3087 <secondary>cache</secondary>
3089 <tertiary>first AFS machine</tertiary>
3093 <primary>setting</primary>
3095 <secondary>cache size and location</secondary>
3097 <tertiary>first AFS machine</tertiary>
3101 <primary>first AFS machine</primary>
3103 <secondary>cache size and location</secondary>
3107 <sect1 id="HDRWQ67">
3108 <title>Configuring the Cache</title>
3110 <para>The Cache Manager uses a cache on the local disk or in machine memory to store local copies of files fetched from file
3111 server machines. As the <emphasis role="bold">afsd</emphasis> program initializes the Cache Manager, it sets basic cache
3112 configuration parameters according to definitions in the local <emphasis role="bold">/usr/vice/etc/cacheinfo</emphasis> file.
3113 The file has three fields: <orderedlist>
3115 <para>The first field names the local directory on which to mount the AFS filespace. The conventional location is the
3116 <emphasis role="bold">/afs</emphasis> directory.</para>
3120 <para>The second field defines the local disk directory to use for the disk cache. The conventional location is the
3121 <emphasis role="bold">/usr/vice/cache</emphasis> directory, but you can specify an alternate directory if another
3122 partition has more space available. There must always be a value in this field, but the Cache Manager ignores it if the
3123 machine uses a memory cache.</para>
3127 <para>The third field specifies the number of kilobyte (1024 byte) blocks to allocate for the cache.</para>
3129 </orderedlist></para>
3131 <para>The values you define must meet the following requirements. <itemizedlist>
3133 <para>On a machine using a disk cache, the Cache Manager expects always to be able to use the amount of space specified in
3134 the third field. Failure to meet this requirement can cause serious problems, some of which can be repaired only by
3135 rebooting. You must prevent non-AFS processes from filling up the cache partition. The simplest way is to devote a
3136 partition to the cache exclusively.</para>
3140 <para>The amount of space available in memory or on the partition housing the disk cache directory imposes an absolute
3141 limit on cache size.</para>
3145 <para>The maximum supported cache size can vary in each AFS release; see the <emphasis>OpenAFS Release Notes</emphasis>
3146 for the current version.</para>
3150 <para>For a disk cache, you cannot specify a value in the third field that exceeds 95% of the space available on the
3151 partition mounted at the directory named in the second field. If you violate this restriction, the <emphasis
3152 role="bold">afsd</emphasis> program exits without starting the Cache Manager and prints an appropriate message on the
3153 standard output stream. A value of 90% is more appropriate on most machines. Some operating systems do not
3154 automatically reserve some space to prevent the partition from filling completely; for them, a smaller value (say, 80% to
3155 85% of the space available) is more appropriate.</para>
3159 <para>For a memory cache, you must leave enough memory for other processes and applications to run. If you try to allocate
3160 more memory than is actually available, the <emphasis role="bold">afsd</emphasis> program exits without initializing the
3161 Cache Manager and produces the following message on the standard output stream. <programlisting>
3162 afsd: memCache allocation failure at <replaceable>number</replaceable> KB
3163 </programlisting></para>
3165 <para>The <replaceable>number</replaceable> value is how many kilobytes were allocated just before the failure, and so
3166 indicates the approximate amount of memory available.</para>
3168 </itemizedlist></para>
3170 <para>Within these hard limits, the factors that determine appropriate cache size include the number of users working on the
3171 machine, the size of the files with which they work, and (for a memory cache) the number of processes that run on the machine.
3172 The higher the demand from these factors, the larger the cache needs to be to maintain good performance.</para>
3174 <para>Disk caches smaller than 10 MB do not generally perform well. Machines serving multiple users usually perform better with
3175 a cache of at least 60 to 70 MB. The point at which enlarging the cache further does not really improve performance depends on
3176 the factors mentioned previously and is difficult to predict.</para>
3178 <para>Memory caches smaller than 1 MB are nonfunctional, and the performance of caches smaller than 5 MB is usually
3179 unsatisfactory. Suitable upper limits are similar to those for disk caches but are probably determined more by the demands on
3180 memory from other sources on the machine (number of users and processes). Machines running only a few processes possibly can use
3181 a smaller memory cache.</para>
3183 <sect2 id="HDRWQ68">
3184 <title>Configuring a Disk Cache</title>
3187 <para>Not all file system types that an operating system supports are necessarily supported for use as the cache partition.
3188 For possible restrictions, see the <emphasis>OpenAFS Release Notes</emphasis>.</para>
3191 <para>To configure the disk cache, perform the following procedures: <orderedlist>
3193 <para>Create the local directory to use for caching. The following instruction shows the conventional location,
3194 <emphasis role="bold">/usr/vice/cache</emphasis>. If you are devoting a partition exclusively to caching, as
3195 recommended, you must also configure it, make a file system on it, and mount it at the directory created in this step.
3197 # <emphasis role="bold">mkdir /usr/vice/cache</emphasis>
3198 </programlisting></para>
3202 <para>Create the <emphasis role="bold">cacheinfo</emphasis> file to define the configuration parameters discussed
3203 previously. The following instruction shows the standard mount location, <emphasis role="bold">/afs</emphasis>, and the
3204 standard cache location, <emphasis role="bold">/usr/vice/cache</emphasis>. <programlisting>
3205 # <emphasis role="bold">echo "/afs:/usr/vice/cache:</emphasis><replaceable>#blocks</replaceable><emphasis role="bold">" > /usr/vice/etc/cacheinfo</emphasis>
3206 </programlisting></para>
3208 <para>The following example defines the disk cache size as 50,000 KB:</para>
3211 # <emphasis role="bold">echo "/afs:/usr/vice/cache:50000" > /usr/vice/etc/cacheinfo</emphasis>
3214 </orderedlist></para>
3217 <sect2 id="HDRWQ69">
3218 <title>Configuring a Memory Cache</title>
3220 <para>To configure a memory cache, create the <emphasis role="bold">cacheinfo</emphasis> file to define the configuration
3221 parameters discussed previously. The following instruction shows the standard mount location, <emphasis
3222 role="bold">/afs</emphasis>, and the standard cache location, <emphasis role="bold">/usr/vice/cache</emphasis> (though the
3223 exact value of the latter is irrelevant for a memory cache).</para>
3226 # <emphasis role="bold">echo "/afs:/usr/vice/cache:</emphasis><replaceable>#blocks</replaceable><emphasis role="bold">" > /usr/vice/etc/cacheinfo</emphasis>
3229 <para>The following example allocates 25,000 KB of memory for the cache.</para>
3232 # <emphasis role="bold">echo "/afs:/usr/vice/cache:25000" > /usr/vice/etc/cacheinfo</emphasis>
3236 <primary>Cache Manager</primary>
3238 <secondary>first AFS machine</secondary>
3242 <primary>configuring</primary>
3244 <secondary>Cache Manager</secondary>
3246 <tertiary>first AFS machine</tertiary>
3250 <primary>first AFS machine</primary>
3252 <secondary>Cache Manager</secondary>
3256 <primary>afs (/afs) directory</primary>
3258 <secondary>creating</secondary>
3260 <tertiary>first AFS machine</tertiary>
3264 <primary>AFS initialization script</primary>
3266 <secondary>setting afsd parameters</secondary>
3268 <tertiary>first AFS machine</tertiary>
3272 <primary>first AFS machine</primary>
3274 <secondary>afsd command parameters</secondary>
3279 <sect1 id="HDRWQ70">
3280 <title>Configuring the Cache Manager</title>
3282 <para>By convention, the Cache Manager mounts the AFS filespace on the local <emphasis role="bold">/afs</emphasis> directory. In
3283 this section you create that directory.</para>
3285 <para>The <emphasis role="bold">afsd</emphasis> program sets several cache configuration parameters as it initializes the Cache
3286 Manager, and starts daemons that improve performance. You can use the <emphasis role="bold">afsd</emphasis> command's arguments
3287 to override the parameters' default values and to change the number of some of the daemons. Depending on the machine's cache
3288 size, its amount of RAM, and how many people work on it, you can sometimes improve Cache Manager performance by overriding the
3289 default values. For a discussion of all of the <emphasis role="bold">afsd</emphasis> command's arguments, see its reference page
3290 in the <emphasis>OpenAFS Administration Reference</emphasis>.</para>
3292 <para>On platforms using the standard 'afs' initialisation script (this does not apply to Fedora or RHEL based distributions), the <emphasis role="bold">afsd</emphasis> command line in the AFS initialization script on each system type includes an
3293 <computeroutput>OPTIONS</computeroutput> variable. You can use it to set nondefault values for the command's arguments, in one
3294 of the following ways: <itemizedlist>
3296 <para>You can create an <emphasis role="bold">afsd</emphasis> <emphasis>options file</emphasis> that sets values for
3297 arguments to the <emphasis role="bold">afsd</emphasis> command. If the file exists, its contents are automatically
3298 substituted for the <computeroutput>OPTIONS</computeroutput> variable in the AFS initialization script. The AFS
3299 distribution for some system types includes an options file; on other system types, you must create it.</para>
3301 <para>You use two variables in the AFS initialization script to specify the path to the options file:
3302 <computeroutput>CONFIG</computeroutput> and <computeroutput>AFSDOPT</computeroutput>. On system types that define a
3303 conventional directory for configuration files, the <computeroutput>CONFIG</computeroutput> variable indicates it by
3304 default; otherwise, the variable indicates an appropriate location.</para>
3306 <para>List the desired <emphasis role="bold">afsd</emphasis> options on a single line in the options file, separating each
3307 option with one or more spaces. The following example sets the <emphasis role="bold">-stat</emphasis> argument to 2500,
3308 the <emphasis role="bold">-daemons</emphasis> argument to 4, and the <emphasis role="bold">-volumes</emphasis> argument to
3312 -stat 2500 -daemons 4 -volumes 100
3317 <para>On a machine that uses a disk cache, you can set the <computeroutput>OPTIONS</computeroutput> variable in the AFS
3318 initialization script to one of <computeroutput>$SMALL</computeroutput>, <computeroutput>$MEDIUM</computeroutput>, or
3319 <computeroutput>$LARGE</computeroutput>. The AFS initialization script uses one of these settings if the <emphasis
3320 role="bold">afsd</emphasis> options file named by the <computeroutput>AFSDOPT</computeroutput> variable does not exist. In
3321 the script as distributed, the <computeroutput>OPTIONS</computeroutput> variable is set to the value
3322 <computeroutput>$MEDIUM</computeroutput>.</para>
3325 <para>Do not set the <computeroutput>OPTIONS</computeroutput> variable to <computeroutput>$SMALL</computeroutput>,
3326 <computeroutput>$MEDIUM</computeroutput>, or <computeroutput>$LARGE</computeroutput> on a machine that uses a memory
3327 cache. The arguments it sets are appropriate only on a machine that uses a disk cache.</para>
3330 <para>The script (or on some system types the <emphasis role="bold">afsd</emphasis> options file named by the
3331 <computeroutput>AFSDOPT</computeroutput> variable) defines a value for each of <computeroutput>SMALL</computeroutput>,
3332 <computeroutput>MEDIUM</computeroutput>, and <computeroutput>LARGE</computeroutput> that sets <emphasis
3333 role="bold">afsd</emphasis> command arguments appropriately for client machines of different sizes: <itemizedlist>
3335 <para><computeroutput>SMALL</computeroutput> is suitable for a small machine that serves one or two users and has
3336 approximately 8 MB of RAM and a 20-MB cache</para>
3340 <para><computeroutput>MEDIUM</computeroutput> is suitable for a medium-sized machine that serves two to six users
3341 and has 16 MB of RAM and a 40-MB cache</para>
3345 <para><computeroutput>LARGE</computeroutput> is suitable for a large machine that serves five to ten users and has
3346 32 MB of RAM and a 100-MB cache</para>
3348 </itemizedlist></para>
3352 <para>You can choose not to create an <emphasis role="bold">afsd</emphasis> options file and to set the
3353 <computeroutput>OPTIONS</computeroutput> variable in the initialization script to a null value rather than to the default
3354 <computeroutput>$MEDIUM</computeroutput> value. You can then either set arguments directly on the <emphasis
3355 role="bold">afsd</emphasis> command line in the script, or set no arguments (and so accept default values for all Cache
3356 Manager parameters).</para>
3361 <para>If you are running on a Fedora or RHEL based system, the
3362 openafs-client initialization script behaves differently from that
3363 described above. It sources /etc/sysconfig/openafs, in which the
3364 AFSD_ARGS variable may be set to contain any, or all, of the afsd options
3365 detailed. Note that this script does not support setting an OPTIONS
3366 variable, or the SMALL, MEDIUM and LARGE methods of defining cache size
3372 <para>Create the local directory on which to mount the AFS filespace, by convention <emphasis role="bold">/afs</emphasis>.
3373 If the directory already exists, verify that it is empty. <programlisting>
3374 # <emphasis role="bold">mkdir /afs</emphasis>
3375 </programlisting></para>
3379 <para>On non-package based Linux systems, copy the <emphasis role="bold">afsd</emphasis> options file from the <emphasis
3380 role="bold">/usr/vice/etc</emphasis> directory to the <emphasis role="bold">/etc/sysconfig</emphasis> directory, removing
3381 the <emphasis role="bold">.conf</emphasis> extension as you do so. <programlisting>
3382 # <emphasis role="bold">cp /usr/vice/etc/afs.conf /etc/sysconfig/afs</emphasis>
3383 </programlisting></para>
3387 <para>Edit the machine's AFS initialization script or <emphasis role="bold">afsd</emphasis> options file to set
3388 appropriate values for <emphasis role="bold">afsd</emphasis> command parameters. The script resides in the indicated
3389 location on each system type: <itemizedlist>
3391 <para>On Fedora and RHEL systems, <emphasis role="bold">/etc/sysconfg/openafs</emphasis></para>
3395 <para>On non-package based Linux systems, <emphasis role="bold">/etc/sysconfig/afs</emphasis> (the <emphasis
3396 role="bold">afsd</emphasis> options file)</para>
3400 <para>On Solaris systems, <emphasis role="bold">/etc/init.d/afs</emphasis></para>
3402 </itemizedlist></para>
3404 <para>Use one of the methods described in the introduction to this section to add the following flags to the <emphasis
3405 role="bold">afsd</emphasis> command line. If you intend for the machine to remain an AFS client, also set any
3406 performance-related arguments you wish. <itemizedlist>
3408 <para>Add the <emphasis role="bold">-memcache</emphasis> flag if the machine is to use a memory cache.</para>
3412 <para>Add the <emphasis role="bold">-verbose</emphasis> flag to display a trace of the Cache Manager's
3413 initialization on the standard output stream.</para>
3415 </itemizedlist></para>
3418 <note><para>In order to successfully complete the instructions in the
3419 remainder of this guide, it is important that the machine does not have
3420 a synthetic root (as discussed in <link linkend="HDRWQ91">Enabling Access
3421 to Foreign Cells</link>). As some distributions ship with this enabled, it
3422 may be necessary to remove any occurences of the
3423 <emphasis role="bold">-dynroot</emphasis> and
3424 <emphasis role="bold">-afsdb</emphasis> options from both the AFS
3425 initialisation script and options file. If this functionality is
3426 required it may be renabled as detailed in
3427 <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>.
3432 <primary>overview</primary>
3434 <secondary>completing installation of first machine</secondary>
3438 <primary>first AFS machine</primary>
3440 <secondary>completion of installation</secondary>
3444 <sect1 id="HDRWQ71">
3445 <title>Overview: Completing the Installation of the First AFS Machine</title>
3447 <para>The machine is now configured as an AFS file server and client machine. In this final phase of the installation, you
3448 initialize the Cache Manager and then create the upper levels of your AFS filespace, among other procedures. The procedures are:
3451 <para>Verify that the initialization script works correctly, and incorporate it into the operating system's startup and
3452 shutdown sequence</para>
3456 <para>Create and mount top-level volumes</para>
3460 <para>Create and mount volumes to store system binaries in AFS</para>
3464 <para>Enable access to foreign cells</para>
3468 <para>Institute additional security measures</para>
3472 <para>Remove client functionality if desired</para>
3474 </orderedlist></para>
3477 <primary>AFS initialization script</primary>
3479 <secondary>verifying on first AFS machine</secondary>
3483 <primary>AFS initialization script</primary>
3485 <secondary>running</secondary>
3487 <tertiary>first AFS machine</tertiary>
3491 <primary>first AFS machine</primary>
3493 <secondary>AFS initialization script</secondary>
3495 <tertiary>running/verifying</tertiary>
3499 <primary>running AFS init. script</primary>
3501 <secondary>first AFS machine</secondary>
3505 <primary>invoking AFS init. script</primary>
3511 <sect1 id="HDRWQ72">
3512 <title>Verifying the AFS Initialization Script</title>
3514 <para>At this point you run the AFS initialization script to verify that it correctly invokes all of the necessary programs and
3515 AFS processes, and that they start correctly. The following are the relevant commands: <itemizedlist>
3517 <para>The command that dynamically loads AFS modifications into the kernel, on some system types (not applicable if the
3518 kernel has AFS modifications built in)</para>
3522 <para>The <emphasis role="bold">bosserver</emphasis> command, which starts the BOS Server; it in turn starts the server
3523 processes for which you created entries in the <emphasis role="bold">/usr/afs/local/BosConfig</emphasis> file</para>
3527 <para>The <emphasis role="bold">afsd</emphasis> command, which initializes the Cache Manager</para>
3529 </itemizedlist></para>
3531 <para>On system types that use a dynamic loader program, you must reboot the machine before running the initialization script,
3532 so that it can freshly load AFS modifications into the kernel.</para>
3534 <para>If there are problems during the initialization, attempt to resolve them. The OpenAFS mailing lists can provide assistance if necessary.
3538 <primary>commands</primary>
3540 <secondary>bos shutdown</secondary>
3544 <primary>bos commands</primary>
3546 <secondary>shutdown</secondary>
3550 <para>Issue the <emphasis role="bold">bos shutdown</emphasis> command to shut down the AFS server processes other than the
3551 BOS Server. Include the <emphasis role="bold">-wait</emphasis> flag to delay return of the command shell prompt until all
3552 processes shut down completely. <programlisting>
3553 # <emphasis role="bold">/usr/afs/bin/bos shutdown</emphasis> <<replaceable>machine name</replaceable>> <emphasis
3554 role="bold">-wait</emphasis>
3555 </programlisting></para>
3559 <para>Issue the <emphasis role="bold">ps</emphasis> command to learn the <emphasis role="bold">bosserver</emphasis>
3560 process's process ID number (PID), and then the <emphasis role="bold">kill</emphasis> command to stop it. <programlisting>
3561 # <emphasis role="bold">ps</emphasis> <replaceable>appropriate_ps_options</replaceable> <emphasis role="bold">| grep bosserver</emphasis>
3562 # <emphasis role="bold">kill</emphasis> <replaceable>bosserver_PID</replaceable>
3563 </programlisting></para>
3567 <para>Issue the appropriate commands to run the AFS initialization script for this system type.</para>
3569 <para><emphasis role="bold">On Linux systems:</emphasis> <orderedlist>
3571 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
3573 # <emphasis role="bold">cd /</emphasis>
3574 # <emphasis role="bold">shutdown -r now</emphasis>
3575 login: <emphasis role="bold">root</emphasis>
3576 Password: <replaceable>root_password</replaceable>
3577 </programlisting></para>
3581 <para>Run the AFS initialization scripts.
3583 # <emphasis role="bold">/etc/rc.d/init.d/openafs-client start</emphasis>
3584 # <emphasis role="bold">/etc/rc.d/init.d/openafs-server start</emphasis>
3585 </programlisting></para>
3587 </orderedlist></para>
3590 <primary>Solaris</primary>
3592 <secondary>AFS initialization script</secondary>
3594 <tertiary>on first AFS machine</tertiary>
3597 <para><emphasis role="bold">On Solaris systems:</emphasis> <orderedlist>
3599 <para>Reboot the machine and log in again as the local superuser <emphasis role="bold">root</emphasis>.
3601 # <emphasis role="bold">cd /</emphasis>
3602 # <emphasis role="bold">shutdown -i6 -g0 -y</emphasis>
3603 login: <emphasis role="bold">root</emphasis>
3604 Password: <replaceable>root_password</replaceable>
3605 </programlisting></para>
3609 <para>Run the AFS initialization script. <programlisting>
3610 # <emphasis role="bold">/etc/init.d/afs start</emphasis>
3611 </programlisting></para>
3613 </orderedlist></para>
3617 <para>Wait for the message that confirms that Cache Manager initialization is complete.</para>
3619 <para>On machines that use a disk cache, it can take a while to initialize the Cache Manager for the first time, because
3620 the <emphasis role="bold">afsd</emphasis> program must create all of the <emphasis
3621 role="bold">V</emphasis><replaceable>n</replaceable> files in the cache directory. Subsequent Cache Manager
3622 initializations do not take nearly as long, because the <emphasis role="bold">V</emphasis><replaceable>n</replaceable>
3623 files already exist.</para>
3628 <primary>commands</primary>
3629 <secondary>aklog</secondary>
3633 <primary>aklog command</primary>
3636 <para>If you are working with an existing cell which uses
3637 <emphasis role="bold">kaserver</emphasis> for authentication,
3638 please recall the note in
3639 <link linkend="KAS003">Using this Appendix</link> detailing the
3640 substitution of <emphasis role="bold">kinit</emphasis> and
3641 <emphasis role="bold">aklog</emphasis> with
3642 <emphasis role="bold">klog</emphasis>.</para>
3644 <para>As a basic test of correct AFS functioning, issue the
3645 <emphasis role="bold">kinit</emphasis> and
3646 <emphasis role="bold">aklog</emphasis> commands to authenticate
3647 as the <emphasis role="bold">admin</emphasis> user.
3648 Provide the password (<replaceable>admin_passwd</replaceable>) you
3649 defined in <link linkend="HDRWQ53">Initializing Cell Security</link>.</para>
3652 # <emphasis role="bold">kinit admin</emphasis>
3653 Password: <replaceable>admin_passwd</replaceable>
3654 # <emphasis role="bold">aklog</emphasis>
3658 <primary>commands</primary>
3660 <secondary>tokens</secondary>
3664 <primary>tokens command</primary>
3669 <para>Issue the <emphasis role="bold">tokens</emphasis> command to
3670 verify that the <emphasis role="bold">aklog</emphasis>
3671 command worked correctly. If it did, the output looks similar to the following example for the <emphasis
3672 role="bold">example.com</emphasis> cell, where <emphasis role="bold">admin</emphasis>'s AFS UID is 1. If the output does not
3673 seem correct, resolve the problem. Changes to the AFS initialization script are possibly necessary. The OpenAFS mailing lists can provide assistance as necessary. <programlisting>
3674 # <emphasis role="bold">tokens</emphasis>
3675 Tokens held by the Cache Manager:
3676 User's (AFS ID 1) tokens for afs@example.com [Expires May 22 11:52]
3678 </programlisting></para>
3682 <para>Issue the <emphasis role="bold">bos status</emphasis> command to verify that the output for each process reads
3683 <computeroutput>Currently running normally</computeroutput>. <programlisting>
3684 # <emphasis role="bold">/usr/afs/bin/bos status</emphasis> <<replaceable>machine name</replaceable>>
3685 </programlisting> <indexterm>
3686 <primary>fs commands</primary>
3688 <secondary>checkvolumes</secondary>
3689 </indexterm> <indexterm>
3690 <primary>commands</primary>
3692 <secondary>fs checkvolumes</secondary>
3697 <para>Change directory to the local file system root (<emphasis role="bold">/</emphasis>) and issue the <emphasis
3698 role="bold">fs checkvolumes</emphasis> command. <programlisting>
3699 # <emphasis role="bold">cd /</emphasis>
3700 # <emphasis role="bold">/usr/afs/bin/fs checkvolumes</emphasis>
3701 </programlisting></para>
3703 </orderedlist></para>
3706 <primary>AFS initialization script</primary>
3708 <secondary>adding to machine startup sequence</secondary>
3710 <tertiary>first AFS machine</tertiary>
3714 <primary>installing</primary>
3716 <secondary>AFS initialization script</secondary>
3718 <tertiary>first AFS machine</tertiary>
3722 <primary>first AFS machine</primary>
3724 <secondary>AFS initialization script</secondary>
3726 <tertiary>activating</tertiary>
3730 <primary>activating AFS init. script</primary>
3732 <see>installing</see>
3736 <sect1 id="HDRWQ73">
3737 <title>Activating the AFS Initialization Script</title>
3739 <para>Now that you have confirmed that the AFS initialization script works correctly, take the action necessary to have it run
3740 automatically at each reboot. Proceed to the instructions for your system type: <itemizedlist>
3742 <para><link linkend="HDRWQ78">Activating the Script on Linux Systems</link></para>
3746 <para><link linkend="HDRWQ79">Activating the Script on Solaris Systems</link></para>
3748 </itemizedlist></para>
3750 <primary>Linux</primary>
3752 <secondary>AFS initialization script</secondary>
3754 <tertiary>on first AFS machine</tertiary>
3757 <sect2 id="HDRWQ78">
3758 <title>Activating the Script on Linux Systems</title>
3762 <para>Issue the <emphasis role="bold">chkconfig</emphasis> command to activate the <emphasis role="bold">openafs-client</emphasis> and <emphasis role="bold">openafs-server</emphasis>
3763 configuration variables. Based on the instruction in the AFS initialization file that begins with the string
3764 <computeroutput>#chkconfig</computeroutput>, the command automatically creates the symbolic links that incorporate the
3765 script into the Linux startup and shutdown sequence. <programlisting>
3766 # <emphasis role="bold">/sbin/chkconfig --add openafs-client</emphasis>
3767 # <emphasis role="bold">/sbin/chkconfig --add openafs-server</emphasis>
3768 </programlisting></para>
3772 <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
3773 <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/rc.d/init.d</emphasis> directories, and
3774 copies of the <emphasis role="bold">afsd</emphasis> options file in both the <emphasis
3775 role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/sysconfig</emphasis> directories. If you want to avoid
3776 potential confusion by guaranteeing that the two copies of each file are always the same, create a link between them. You
3777 can always retrieve the original script or options file from the AFS CD-ROM if necessary. <programlisting>
3778 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
3779 # <emphasis role="bold">rm afs.rc afs.conf</emphasis>
3780 # <emphasis role="bold">ln -s /etc/rc.d/init.d/afs afs.rc</emphasis>
3781 # <emphasis role="bold">ln -s /etc/sysconfig/afs afs.conf</emphasis>
3782 </programlisting></para>
3786 <para>Proceed to <link linkend="HDRWQ80">Configuring the Top Levels of the AFS Filespace</link>.</para>
3791 <primary>Solaris</primary>
3793 <secondary>AFS initialization script</secondary>
3795 <tertiary>on first AFS machine</tertiary>
3799 <sect2 id="HDRWQ79">
3800 <title>Activating the Script on Solaris Systems</title>
3804 <para>Change to the <emphasis role="bold">/etc/init.d</emphasis> directory and issue the <emphasis role="bold">ln
3805 -s</emphasis> command to create symbolic links that incorporate the AFS initialization script into the Solaris startup and
3806 shutdown sequence. <programlisting>
3807 # <emphasis role="bold">cd /etc/init.d</emphasis>
3808 # <emphasis role="bold">ln -s ../init.d/afs /etc/rc3.d/S99afs</emphasis>
3809 # <emphasis role="bold">ln -s ../init.d/afs /etc/rc0.d/K66afs</emphasis>
3810 </programlisting></para>
3814 <para><emphasis role="bold">(Optional)</emphasis> There are now copies of the AFS initialization file in both the
3815 <emphasis role="bold">/usr/vice/etc</emphasis> and <emphasis role="bold">/etc/init.d</emphasis> directories. If you want
3816 to avoid potential confusion by guaranteeing that they are always the same, create a link between them. You can always
3817 retrieve the original script from the AFS CD-ROM if necessary. <programlisting>
3818 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
3819 # <emphasis role="bold">rm afs.rc</emphasis>
3820 # <emphasis role="bold">ln -s /etc/init.d/afs afs.rc</emphasis>
3821 </programlisting></para>
3826 <primary>AFS filespace</primary>
3828 <secondary>configuring top levels</secondary>
3832 <primary>configuring</primary>
3834 <secondary>AFS filespace (top levels)</secondary>
3839 <sect1 id="HDRWQ80">
3840 <title>Configuring the Top Levels of the AFS Filespace</title>
3842 <para>If you have not previously run AFS in your cell, you now configure the top levels of your cell's AFS filespace. If you
3843 have run a previous version of AFS, the filespace is already configured. Proceed to <link linkend="HDRWQ83">Storing AFS Binaries
3844 in AFS</link>. <indexterm>
3845 <primary>root.cell volume</primary>
3847 <secondary>creating and replicating</secondary>
3848 </indexterm> <indexterm>
3849 <primary>volume</primary>
3851 <secondary>creating</secondary>
3853 <tertiary>root.cell</tertiary>
3854 </indexterm> <indexterm>
3855 <primary>creating</primary>
3857 <secondary>root.cell volume</secondary>
3860 <para>You created the <emphasis role="bold">root.afs</emphasis> volume in <link linkend="HDRWQ60">Starting the File Server,
3861 Volume Server, and Salvager</link>, and the Cache Manager mounted it automatically on the local <emphasis
3862 role="bold">/afs</emphasis> directory when you ran the AFS initialization script in <link linkend="HDRWQ72">Verifying the AFS
3863 Initialization Script</link>. You now set the access control list (ACL) on the <emphasis role="bold">/afs</emphasis> directory;
3864 creating, mounting, and setting the ACL are the three steps required when creating any volume.</para>
3866 <para>After setting the ACL on the <emphasis role="bold">root.afs</emphasis> volume, you create your cell's <emphasis
3867 role="bold">root.cell</emphasis> volume, mount it as a subdirectory of the <emphasis role="bold">/afs</emphasis> directory, and
3868 set the ACL. Create both a read/write and a regular mount point for the <emphasis role="bold">root.cell</emphasis> volume. The
3869 read/write mount point enables you to access the read/write version of replicated volumes when necessary. Creating both mount
3870 points essentially creates separate read-only and read-write copies of your filespace, and enables the Cache Manager to traverse
3871 the filespace on a read-only path or read/write path as appropriate. For further discussion of these concepts, see the chapter
3872 in the <emphasis>OpenAFS Administration Guide</emphasis> about administering volumes. <indexterm>
3873 <primary>root.afs volume</primary>
3875 <secondary>replicating</secondary>
3876 </indexterm> <indexterm>
3877 <primary>volume</primary>
3879 <secondary>replicating root.afs and root.cell</secondary>
3880 </indexterm> <indexterm>
3881 <primary>replicating volumes</primary>
3884 <para>Then replicate both the <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes.
3885 This is required if you want to replicate any other volumes in your cell, because all volumes mounted above a replicated volume
3886 must themselves be replicated in order for the Cache Manager to access the replica.</para>
3888 <para>When the <emphasis role="bold">root.afs</emphasis> volume is replicated, the Cache Manager is programmed to access its
3889 read-only version (<emphasis role="bold">root.afs.readonly</emphasis>) whenever possible. To make changes to the contents of the
3890 <emphasis role="bold">root.afs</emphasis> volume (when, for example, you mount another cell's <emphasis
3891 role="bold">root.cell</emphasis> volume at the second level in your filespace), you must mount the <emphasis
3892 role="bold">root.afs</emphasis> volume temporarily, make the changes, release the volume and remove the temporary mount point.
3893 For instructions, see <link linkend="HDRWQ91">Enabling Access to Foreign Cells</link>. <indexterm>
3894 <primary>fs commands</primary>
3896 <secondary>setacl</secondary>
3897 </indexterm> <indexterm>
3898 <primary>commands</primary>
3900 <secondary>fs setacl</secondary>
3901 </indexterm> <indexterm>
3902 <primary>access control list (ACL), setting</primary>
3903 </indexterm> <indexterm>
3904 <primary>setting</primary>
3906 <secondary>ACL</secondary>
3907 </indexterm> <orderedlist>
3909 <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to edit the ACL on the <emphasis
3910 role="bold">/afs</emphasis> directory. Add an entry that grants the <emphasis role="bold">l</emphasis> (<emphasis
3911 role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>) permissions
3912 to the <emphasis role="bold">system:anyuser</emphasis> group, to enable all AFS users who can reach your cell to traverse
3913 through the directory. If you prefer to enable access only to locally authenticated users, substitute the <emphasis
3914 role="bold">system:authuser</emphasis> group.</para>
3916 <para>Note that there is already an ACL entry that grants all seven access rights to the <emphasis
3917 role="bold">system:administrators</emphasis> group. It is a default entry that AFS places on every new volume's root
3920 <para>The top-level AFS directory, typically /afs, is a special case:
3921 when the client is configured to run in dynroot mode (e.g.
3922 <emphasis role="bold">afsd -dynroot</emphasis>, attempts to set
3923 the ACL on this directory will return <emphasis role="bold">
3924 Connection timed out</emphasis>. This is because the dynamically-
3925 generated root directory is not a part of the global AFS space,
3926 and cannot have an access control list set on it.</para>
3929 # <emphasis role="bold">/usr/afs/bin/fs setacl /afs system:anyuser rl</emphasis>
3933 <primary>commands</primary>
3935 <secondary>vos create</secondary>
3937 <tertiary>root.cell volume</tertiary>
3941 <primary>vos commands</primary>
3943 <secondary>create</secondary>
3945 <tertiary>root.cell volume</tertiary>
3949 <primary>fs commands</primary>
3951 <secondary>mkmount</secondary>
3955 <primary>commands</primary>
3957 <secondary>fs mkmount</secondary>
3961 <primary>mount point</primary>
3965 <primary>creating</primary>
3967 <secondary>mount point</secondary>
3971 <primary>volume</primary>
3973 <secondary>mounting</secondary>
3977 <listitem id="LIWQ81">
3978 <para>Issue the <emphasis role="bold">vos create</emphasis> command to create the <emphasis
3979 role="bold">root.cell</emphasis> volume. Then issue the <emphasis role="bold">fs mkmount</emphasis> command to mount it as
3980 a subdirectory of the <emphasis role="bold">/afs</emphasis> directory, where it serves as the root of your cell's local
3981 AFS filespace. Finally, issue the <emphasis role="bold">fs setacl</emphasis> command to create an ACL entry for the
3982 <emphasis role="bold">system:anyuser</emphasis> group (or <emphasis role="bold">system:authuser</emphasis> group).</para>
3984 <para>For the <replaceable>partition name</replaceable> argument, substitute the name of one of the machine's AFS server
3985 partitions (such as <emphasis role="bold">/vicepa</emphasis>). For the <replaceable>cellname</replaceable> argument,
3986 substitute your cell's fully-qualified Internet domain name (such as <emphasis role="bold">example.com</emphasis>).</para>
3989 # <emphasis role="bold">/usr/afs/bin/vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
3990 role="bold">root.cell</emphasis>
3991 # <emphasis role="bold">/usr/afs/bin/fs mkmount /afs/</emphasis><replaceable>cellname</replaceable> <emphasis role="bold">root.cell</emphasis>
3992 # <emphasis role="bold">/usr/afs/bin/fs setacl /afs/</emphasis><replaceable>cellname</replaceable> <emphasis role="bold">system:anyuser rl</emphasis>
3996 <primary>creating</primary>
3998 <secondary>symbolic link</secondary>
4000 <tertiary>for abbreviated cell name</tertiary>
4004 <primary>symbolic link</primary>
4006 <secondary>for abbreviated cell name</secondary>
4010 <primary>cell name</primary>
4012 <secondary>symbolic link for abbreviated</secondary>
4017 <para><emphasis role="bold">(Optional)</emphasis> Create a symbolic link to a shortened cell name, to reduce the length of
4018 pathnames for users in the local cell. For example, in the <emphasis role="bold">example.com</emphasis> cell, <emphasis
4019 role="bold">/afs/example</emphasis> is a link to <emphasis role="bold">/afs/example.com</emphasis>. <programlisting>
4020 # <emphasis role="bold">cd /afs</emphasis>
4021 # <emphasis role="bold">ln -s</emphasis> <replaceable>full_cellname</replaceable> <replaceable>short_cellname</replaceable>
4022 </programlisting> <indexterm>
4023 <primary>read/write mount point for root.afs volume</primary>
4024 </indexterm> <indexterm>
4025 <primary>root.afs volume</primary>
4027 <secondary>read/write mount point</secondary>
4028 </indexterm> <indexterm>
4029 <primary>creating</primary>
4031 <secondary>read/write mount point</secondary>
4036 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to create a read/write mount point for the <emphasis
4037 role="bold">root.cell</emphasis> volume (you created a regular mount point in Step <link
4038 linkend="LIWQ81">2</link>).</para>
4040 <para>By convention, the name of a read/write mount point begins with a period, both to distinguish it from the regular
4041 mount point and to make it visible only when the <emphasis role="bold">-a</emphasis> flag is used on the <emphasis
4042 role="bold">ls</emphasis> command.</para>
4044 <para>Change directory to <emphasis role="bold">/usr/afs/bin</emphasis> to make it easier to access the command
4048 # <emphasis role="bold">cd /usr/afs/bin</emphasis>
4049 # <emphasis role="bold">./fs mkmount /afs/.</emphasis><replaceable>cellname</replaceable> <emphasis role="bold">root.cell -rw</emphasis>
4053 <primary>commands</primary>
4055 <secondary>vos addsite</secondary>
4059 <primary>vos commands</primary>
4061 <secondary>addsite</secondary>
4065 <primary>volume</primary>
4067 <secondary>defining replication site</secondary>
4071 <primary>defining</primary>
4073 <secondary>replication site for volume</secondary>
4077 <listitem id="LIWQ82">
4078 <para>Issue the <emphasis role="bold">vos addsite</emphasis> command to define a replication site
4079 for both the <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes. In each
4080 case, substitute for the <replaceable>partition name</replaceable> argument the partition where the volume's read/write
4081 version resides. When you install additional file server machines, it is a good idea to create replication sites on them
4082 as well. <programlisting>
4083 # <emphasis role="bold">./vos addsite</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
4084 role="bold">root.afs</emphasis>
4085 # <emphasis role="bold">./vos addsite</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
4086 role="bold">root.cell</emphasis>
4087 </programlisting> <indexterm>
4088 <primary>fs commands</primary>
4090 <secondary>examine</secondary>
4091 </indexterm> <indexterm>
4092 <primary>commands</primary>
4094 <secondary>fs examine</secondary>
4099 <para>Issue the <emphasis role="bold">fs examine</emphasis> command to verify that the Cache Manager can access both the
4100 <emphasis role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes, before you attempt to
4101 replicate them. The output lists each volume's name, volumeID number, quota, size, and the size of the partition that
4102 houses them. If you get an error message instead, do not continue before taking corrective action. <programlisting>
4103 # <emphasis role="bold">./fs examine /afs</emphasis>
4104 # <emphasis role="bold">./fs examine /afs/</emphasis><replaceable>cellname</replaceable>
4105 </programlisting> <indexterm>
4106 <primary>commands</primary>
4108 <secondary>vos release</secondary>
4109 </indexterm> <indexterm>
4110 <primary>vos commands</primary>
4112 <secondary>release</secondary>
4113 </indexterm> <indexterm>
4114 <primary>volume</primary>
4116 <secondary>releasing replicated</secondary>
4117 </indexterm> <indexterm>
4118 <primary>releasing replicated volume</primary>
4123 <para>Issue the <emphasis role="bold">vos release</emphasis> command to release a replica of the <emphasis
4124 role="bold">root.afs</emphasis> and <emphasis role="bold">root.cell</emphasis> volumes to the sites you defined in Step
4125 <link linkend="LIWQ82">5</link>. <programlisting>
4126 # <emphasis role="bold">./vos release root.afs</emphasis>
4127 # <emphasis role="bold">./vos release root.cell</emphasis>
4128 </programlisting> <indexterm>
4129 <primary>fs commands</primary>
4131 <secondary>checkvolumes</secondary>
4132 </indexterm> <indexterm>
4133 <primary>commands</primary>
4135 <secondary>fs checkvolumes</secondary>
4140 <para>Issue the <emphasis role="bold">fs checkvolumes</emphasis> to force the Cache Manager to notice that you have
4141 released read-only versions of the volumes, then issue the <emphasis role="bold">fs examine</emphasis> command again. This
4142 time its output mentions the read-only version of the volumes (<emphasis role="bold">root.afs.readonly</emphasis> and
4143 <emphasis role="bold">root.cell.readonly</emphasis>) instead of the read/write versions, because of the Cache Manager's
4144 bias to access the read-only version of the <emphasis role="bold">root.afs</emphasis> volume if it exists.
4146 # <emphasis role="bold">./fs checkvolumes</emphasis>
4147 # <emphasis role="bold">./fs examine /afs</emphasis>
4148 # <emphasis role="bold">./fs examine /afs/</emphasis><replaceable>cellname</replaceable>
4149 </programlisting></para>
4151 </orderedlist></para>
4154 <primary>storing</primary>
4156 <secondary>AFS binaries in volumes</secondary>
4160 <primary>creating</primary>
4162 <secondary>volume</secondary>
4164 <tertiary>for AFS binaries</tertiary>
4168 <primary>volume</primary>
4170 <secondary>for AFS binaries</secondary>
4174 <primary>binaries</primary>
4176 <secondary>storing AFS in volume</secondary>
4180 <primary>usr/afsws directory</primary>
4184 <primary>directories</primary>
4186 <secondary>/usr/afsws</secondary>
4190 <sect1 id="HDRWQ83">
4191 <title>Storing AFS Binaries in AFS</title>
4193 <note><para>Sites with existing binary distribution mechanisms, including
4194 those which use packaging systems such as RPM, may wish to skip this step,
4195 and use tools native to their operating system to manage AFS configuration
4196 information.</para></note>
4198 <para>In the conventional configuration, you make AFS client binaries and configuration files available in the subdirectories of
4199 the <emphasis role="bold">/usr/afsws</emphasis> directory on client machines (<emphasis role="bold">afsws</emphasis> is an
4200 acronym for <emphasis role="bold">AFS w</emphasis><emphasis>ork</emphasis><emphasis
4201 role="bold">s</emphasis><emphasis>tation</emphasis>). You can conserve local disk space by creating <emphasis
4202 role="bold">/usr/afsws</emphasis> as a link to an AFS volume that houses the AFS client binaries and configuration files for
4203 this system type.</para>
4205 <para>In this section you create the necessary volumes. The conventional location to which to link <emphasis
4206 role="bold">/usr/afsws</emphasis> is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4207 role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis>, where
4208 <replaceable>sysname</replaceable> is the appropriate system type name as specified in the <emphasis>OpenAFS Release
4209 Notes</emphasis>. The instructions in <link linkend="HDRWQ133">Installing Additional Client Machines</link> assume that you have
4210 followed the instructions in this section.</para>
4212 <para>If you have previously run AFS in the cell, the volumes possibly already exist. If so, you need to perform Step <link
4213 linkend="LIWQ86">8</link> only.</para>
4215 <para>The current working directory is still <emphasis role="bold">/usr/afs/bin</emphasis>, which houses the <emphasis
4216 role="bold">fs</emphasis> and <emphasis role="bold">vos</emphasis> command suite binaries. In the following commands, it is
4217 possible you still need to specify the pathname to the commands, depending on how your PATH environment variable is set.
4220 <primary>commands</primary>
4222 <secondary>vos create</secondary>
4224 <tertiary>volume for AFS binaries</tertiary>
4228 <primary>vos commands</primary>
4230 <secondary>create</secondary>
4232 <tertiary>volume for AFS binaries</tertiary>
4235 <listitem id="LIWQ84">
4236 <para>Issue the <emphasis role="bold">vos create</emphasis> command to create volumes for storing
4237 the AFS client binaries for this system type. The following example instruction creates volumes called
4238 <replaceable>sysname</replaceable>, <replaceable>sysname</replaceable>.<emphasis role="bold">usr</emphasis>, and
4239 <replaceable>sysname</replaceable>.<emphasis role="bold">usr.afsws</emphasis>. Refer to the <emphasis>OpenAFS Release
4240 Notes</emphasis> to learn the proper value of <replaceable>sysname</replaceable> for this system type. <programlisting>
4241 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <replaceable>sysname</replaceable>
4242 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <replaceable>sysname</replaceable><emphasis
4243 role="bold">.usr</emphasis>
4244 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <replaceable>sysname</replaceable><emphasis
4245 role="bold">.usr.afsws</emphasis>
4246 </programlisting></para>
4250 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount the newly created volumes. Because the
4251 <emphasis role="bold">root.cell</emphasis> volume is replicated, you must precede the <emphasis>cellname</emphasis> part
4252 of the pathname with a period to specify the read/write mount point, as shown. Then issue the <emphasis role="bold">vos
4253 release</emphasis> command to release a new replica of the <emphasis role="bold">root.cell</emphasis> volume, and the
4254 <emphasis role="bold">fs checkvolumes</emphasis> command to force the local Cache Manager to access them. <programlisting>
4255 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable> <emphasis
4256 role="bold">-vol</emphasis> <replaceable>sysname</replaceable>
4257 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
4258 role="bold">/usr</emphasis> <emphasis role="bold">-vol</emphasis> <replaceable>sysname</replaceable><emphasis
4259 role="bold">.usr</emphasis>
4260 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
4261 role="bold">/usr/afsws</emphasis> <emphasis role="bold">-vol</emphasis> <replaceable>sysname</replaceable><emphasis
4262 role="bold">.usr.afsws</emphasis>
4263 # <emphasis role="bold">vos release root.cell</emphasis>
4264 # <emphasis role="bold">fs checkvolumes</emphasis>
4265 </programlisting></para>
4269 <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to grant the <emphasis role="bold">l</emphasis>
4270 (<emphasis role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis role="bold">read</emphasis>)
4271 permissions to the <emphasis role="bold">system:anyuser</emphasis> group on each new directory's ACL. <programlisting>
4272 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable>
4273 # <emphasis role="bold">fs setacl -dir . usr usr/afsws -acl system:anyuser rl</emphasis>
4274 </programlisting> <indexterm>
4275 <primary>commands</primary>
4277 <secondary>fs setquota</secondary>
4278 </indexterm> <indexterm>
4279 <primary>fs commands</primary>
4281 <secondary>setquota</secondary>
4282 </indexterm> <indexterm>
4283 <primary>quota for volume</primary>
4284 </indexterm> <indexterm>
4285 <primary>volume</primary>
4287 <secondary>setting quota</secondary>
4288 </indexterm> <indexterm>
4289 <primary>setting</primary>
4291 <secondary>volume quota</secondary>
4295 <listitem id="LIWQ85">
4296 <para>Issue the <emphasis role="bold">fs setquota</emphasis> command to set an unlimited quota on
4297 the volume mounted at the <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4298 role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis> directory. This
4299 enables you to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's
4302 <para>If you wish, you can set the volume's quota to a finite value after you complete the copying operation. At that
4303 point, use the <emphasis role="bold">vos examine</emphasis> command to determine how much space the volume is occupying.
4304 Then issue the <emphasis role="bold">fs setquota</emphasis> command to set a quota that is slightly larger.</para>
4307 # <emphasis role="bold">fs setquota /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
4308 role="bold">/usr/afsws 0</emphasis>
4313 <para>Unpack the distribution tarball into the <emphasis role="bold">/tmp/afsdist</emphasis> directory,
4314 if it is not already. <indexterm>
4315 <primary>copying</primary>
4317 <secondary>AFS binaries into volume</secondary>
4318 </indexterm> <indexterm>
4319 <primary>CD-ROM</primary>
4321 <secondary>copying AFS binaries into volume</secondary>
4322 </indexterm> <indexterm>
4323 <primary>first AFS machine</primary>
4325 <secondary>copying</secondary>
4327 <tertiary>AFS binaries into volume</tertiary>
4332 <para>Copy the contents of the indicated directories from the
4333 distribution into the <emphasis
4334 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4335 role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/usr/afsws</emphasis> directory.
4337 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/</emphasis><replaceable>sysname</replaceable><emphasis
4338 role="bold">/usr/afsws</emphasis>
4339 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/bin .</emphasis>
4340 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/etc .</emphasis>
4341 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/include .</emphasis>
4342 # <emphasis role="bold">cp -rp /tmp/afsdist/</emphasis><replaceable>sysname</replaceable><emphasis role="bold">/lib .</emphasis>
4345 <primary>creating</primary>
4347 <secondary>symbolic link</secondary>
4349 <tertiary>to AFS binaries</tertiary>
4350 </indexterm> <indexterm>
4351 <primary>symbolic link</primary>
4353 <secondary>to AFS binaries from local disk</secondary>
4357 <listitem id="LIWQ86">
4358 <para>Create <emphasis role="bold">/usr/afsws</emphasis> on the local disk as a symbolic link to the
4359 directory <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4360 role="bold">/@sys/usr/afsws</emphasis>. You can specify the actual system name instead of <emphasis
4361 role="bold">@sys</emphasis> if you wish, but the advantage of using <emphasis role="bold">@sys</emphasis> is that it
4362 remains valid if you upgrade this machine to a different system type. <programlisting>
4363 # <emphasis role="bold">ln -s /afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/@sys/usr/afsws /usr/afsws</emphasis>
4364 </programlisting> <indexterm>
4365 <primary>PATH environment variable for users</primary>
4366 </indexterm> <indexterm>
4367 <primary>variables</primary>
4369 <secondary>PATH, setting for users</secondary>
4374 <para><emphasis role="bold">(Optional)</emphasis> To enable users to issue commands from the AFS suites (such as <emphasis
4375 role="bold">fs</emphasis>) without having to specify a pathname to their binaries, include the <emphasis
4376 role="bold">/usr/afsws/bin</emphasis> and <emphasis role="bold">/usr/afsws/etc</emphasis> directories in the PATH
4377 environment variable you define in each user's shell initialization file (such as <emphasis
4378 role="bold">.cshrc</emphasis>).</para>
4380 </orderedlist></para>
4383 <primary>storing</primary>
4385 <secondary>AFS documentation in volumes</secondary>
4389 <primary>creating</primary>
4391 <secondary>volume</secondary>
4393 <tertiary>for AFS documentation</tertiary>
4397 <primary>volume</primary>
4399 <secondary>for AFS documentation</secondary>
4403 <primary>documentation, creating volume for AFS</primary>
4407 <primary>usr/afsdoc directory</primary>
4411 <primary>directories</primary>
4413 <secondary>/usr/afsdoc</secondary>
4417 <sect1 id="HDRWQ87">
4418 <title>Storing AFS Documents in AFS</title>
4420 <para>The AFS distribution includes the following documents: <itemizedlist>
4422 <para><emphasis>OpenAFS Release Notes</emphasis></para>
4426 <para><emphasis>OpenAFS Quick Beginnings</emphasis></para>
4430 <para><emphasis>OpenAFS User Guide</emphasis></para>
4434 <para><emphasis>OpenAFS Administration Reference</emphasis></para>
4438 <para><emphasis>OpenAFS Administration Guide</emphasis></para>
4440 </itemizedlist></para>
4442 <note><para>OpenAFS Documentation is not currently provided with all
4443 distributions, but may be downloaded separately from the OpenAFS
4444 website</para></note>
4446 <para>The OpenAFS Documentation Distribution has a directory for each
4447 document format provided. The different formats are suitable for online
4448 viewing, printing, or both.</para>
4450 <para>This section explains how to create and mount a volume to house the documents, making them available to your users. The
4451 recommended mount point for the volume is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4452 role="bold">/afsdoc</emphasis>. If you wish, you can create a link to the mount point on each client machine's local disk,
4453 called <emphasis role="bold">/usr/afsdoc</emphasis>. Alternatively, you can create a link to the mount point in each user's home
4454 directory. You can also choose to permit users to access only certain documents (most probably, the <emphasis>OpenAFS User
4455 Guide</emphasis>) by creating different mount points or setting different ACLs on different document directories.</para>
4457 <para>The current working directory is still <emphasis role="bold">/usr/afs/bin</emphasis>, which houses the <emphasis
4458 role="bold">fs</emphasis> and <emphasis role="bold">vos</emphasis> command suite binaries you use to create and mount volumes.
4459 In the following commands, it is possible you still need to specify the pathname to the commands, depending on how your PATH
4460 environment variable is set. <orderedlist>
4462 <primary>commands</primary>
4464 <secondary>vos create</secondary>
4466 <tertiary>volume for AFS documentation</tertiary>
4470 <primary>vos commands</primary>
4472 <secondary>create</secondary>
4474 <tertiary>volume for AFS documentation</tertiary>
4478 <para>Issue the <emphasis role="bold">vos create</emphasis> command to create a volume for storing the AFS documentation.
4479 Include the <emphasis role="bold">-maxquota</emphasis> argument to set an unlimited quota on the volume. This enables you
4480 to copy all of the appropriate files from the CD-ROM into the volume without exceeding the volume's quota.</para>
4482 <para>If you wish, you can set the volume's quota to a finite value after you complete the copying operations. At that
4483 point, use the <emphasis role="bold">vos examine</emphasis> command to determine how much space the volume is occupying.
4484 Then issue the <emphasis role="bold">fs setquota</emphasis> command to set a quota that is slightly larger.</para>
4487 # <emphasis role="bold">vos create</emphasis> <<replaceable>machine name</replaceable>> <<replaceable>partition name</replaceable>> <emphasis
4488 role="bold">afsdoc -maxquota 0</emphasis>
4493 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount the new volume. Because the <emphasis
4494 role="bold">root.cell</emphasis> volume is replicated, you must precede the <emphasis>cellname</emphasis> with a period to
4495 specify the read/write mount point, as shown. Then issue the <emphasis role="bold">vos release</emphasis> command to
4496 release a new replica of the <emphasis role="bold">root.cell</emphasis> volume, and the <emphasis role="bold">fs
4497 checkvolumes</emphasis> command to force the local Cache Manager to access them. <programlisting>
4498 # <emphasis role="bold">fs mkmount -dir /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis> <emphasis
4499 role="bold">-vol</emphasis> <emphasis role="bold">afsdoc</emphasis>
4500 # <emphasis role="bold">vos release root.cell</emphasis>
4501 # <emphasis role="bold">fs checkvolumes</emphasis>
4502 </programlisting></para>
4506 <para>Issue the <emphasis role="bold">fs setacl</emphasis> command to grant the <emphasis role="bold">rl</emphasis>
4507 permissions to the <emphasis role="bold">system:anyuser</emphasis> group on the new directory's ACL. <programlisting>
4508 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis>
4509 # <emphasis role="bold">fs setacl . system:anyuser rl</emphasis>
4510 </programlisting></para>
4514 <para>Unpack the OpenAFS documentation distribution into the
4515 <emphasis role="bold">/tmp/afsdocs</emphasis> directory. You may use
4516 a different directory, in which case the location you use should be
4517 subsituted in the following examples. For instructions on unpacking
4518 the distribution, consult the documentation for your operating
4519 system's <emphasis role="bold">tar</emphasis> command.
4521 <primary>copying</primary>
4523 <secondary>AFS documentation from distribution</secondary>
4524 </indexterm> <indexterm>
4525 <primary>OpenAFS Distribution</primary>
4527 <secondary>copying AFS documentation from</secondary>
4528 </indexterm> <indexterm>
4529 <primary>first AFS machine</primary>
4531 <secondary>copying</secondary>
4533 <tertiary>AFS documentation from OpenAFS distribution</tertiary>
4534 </indexterm> <indexterm>
4535 <primary>index.htm file</primary>
4536 </indexterm> <indexterm>
4537 <primary>files</primary>
4539 <secondary>index.htm</secondary>
4544 <para>Copy the AFS documents in one or more formats from the unpacked distribution into subdirectories of the <emphasis
4545 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc</emphasis> directory. Repeat
4546 the commands for each format. <programlisting>
4547 # <emphasis role="bold">mkdir</emphasis> <replaceable>format_name</replaceable>
4548 # <emphasis role="bold">cd</emphasis> <replaceable>format_name</replaceable>
4549 # <emphasis role="bold">cp -rp /tmp/afsdocs/</emphasis><replaceable>format</replaceable> <emphasis role="bold">.</emphasis>
4550 </programlisting></para>
4552 <para>If you choose to store the HTML version of the documents in AFS, note that in addition to a subdirectory for each
4553 document there are several files with a <emphasis role="bold">.gif</emphasis> extension, which enable readers to move
4554 easily between sections of a document. The file called <emphasis role="bold">index.htm</emphasis> is an introductory HTML
4555 page that contains a hyperlink to each of the documents. For online viewing to work properly, these files must remain in
4556 the top-level HTML directory (the one named, for example, <emphasis
4557 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc/html</emphasis>).</para>
4561 <para><emphasis role="bold">(Optional)</emphasis> If you believe it is helpful to your users to access the AFS documents
4562 in a certain format via a local disk directory, create <emphasis role="bold">/usr/afsdoc</emphasis> on the local disk as a
4563 symbolic link to the documentation directory in AFS (<emphasis
4564 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4565 role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable>). <programlisting>
4566 # <emphasis role="bold">ln -s /afs/</emphasis><replaceable>cellname</replaceable><emphasis role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable> <emphasis
4567 role="bold">/usr/afsdoc</emphasis>
4568 </programlisting></para>
4570 <para>An alternative is to create a link in each user's home directory to the <emphasis
4571 role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4572 role="bold">/afsdoc/</emphasis><replaceable>format_name</replaceable> directory.</para>
4574 </orderedlist></para>
4577 <primary>storing</primary>
4579 <secondary>system binaries in volumes</secondary>
4583 <primary>creating</primary>
4585 <secondary>volume</secondary>
4587 <tertiary>for system binaries</tertiary>
4591 <primary>volume</primary>
4593 <secondary>for system binaries</secondary>
4597 <primary>binaries</primary>
4599 <secondary>storing system in volumes</secondary>
4603 <sect1 id="HDRWQ88">
4604 <title>Storing System Binaries in AFS</title>
4606 <para>You can also choose to store other system binaries in AFS volumes, such as the standard UNIX programs conventionally
4607 located in local disk directories such as <emphasis role="bold">/etc</emphasis>, <emphasis role="bold">/bin</emphasis>, and
4608 <emphasis role="bold">/lib</emphasis>. Storing such binaries in an AFS volume not only frees local disk space, but makes it
4609 easier to update binaries on all client machines.</para>
4611 <para>The following is a suggested scheme for storing system binaries in AFS. It does not include instructions, but you can use
4612 the instructions in <link linkend="HDRWQ83">Storing AFS Binaries in AFS</link> (which are for AFS-specific binaries) as a
4615 <para>Some files must remain on the local disk for use when AFS is inaccessible (during bootup and file server or network
4616 outages). The required binaries include the following: <itemizedlist>
4618 <para>A text editor, network commands, and so on</para>
4622 <para>Files used during the boot sequence before the <emphasis role="bold">afsd</emphasis> program runs, such as
4623 initialization and configuration files, and binaries for commands that mount file systems</para>
4627 <para>Files used by dynamic kernel loader programs</para>
4629 </itemizedlist></para>
4631 <para>In most cases, it is more secure to enable only locally authenticated users to access system binaries, by granting the
4632 <emphasis role="bold">l</emphasis> (<emphasis role="bold">lookup</emphasis>) and <emphasis role="bold">r</emphasis> (<emphasis
4633 role="bold">read</emphasis>) permissions to the <emphasis role="bold">system:authuser</emphasis> group on the ACLs of
4634 directories that contain the binaries. If users need to access a binary while unauthenticated, however, the ACL on its directory
4635 must grant those permissions to the <emphasis role="bold">system:anyuser</emphasis> group.</para>
4637 <para>The following chart summarizes the suggested volume and mount point names for storing system binaries. It uses a separate
4638 volume for each directory. You already created a volume called <replaceable>sysname</replaceable> for this machine's system type
4639 when you followed the instructions in <link linkend="HDRWQ83">Storing AFS Binaries in AFS</link>.</para>
4641 <para>You can name volumes in any way you wish, and mount them at other locations than those suggested here. However, this
4642 scheme has several advantages: <itemizedlist>
4644 <para>Volume names clearly identify volume contents</para>
4648 <para>Using the <replaceable>sysname</replaceable> prefix on every volume makes it is easy to back up all of the volumes
4649 together, because the AFS Backup System enables you to define sets of volumes based on a string included in all of their
4654 <para>It makes it easy to track related volumes, keeping them together on the same file server machine if desired</para>
4658 <para>There is a clear relationship between volume name and mount point name</para>
4660 </itemizedlist></para>
4662 <informaltable frame="none">
4664 <colspec colwidth="50*" />
4666 <colspec colwidth="50*" />
4670 <entry><emphasis role="bold">Volume Name</emphasis></entry>
4672 <entry><emphasis role="bold">Mount Point</emphasis></entry>
4678 <entry><replaceable>sysname</replaceable></entry>
4681 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable></entry>
4685 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">bin</emphasis></entry>
4688 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4689 role="bold">/bin</emphasis></entry>
4693 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">etc</emphasis></entry>
4696 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4697 role="bold">/etc</emphasis></entry>
4701 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr</emphasis></entry>
4704 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4705 role="bold">/usr</emphasis></entry>
4709 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.afsws</emphasis></entry>
4712 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4713 role="bold">/usr/afsws</emphasis></entry>
4717 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.bin</emphasis></entry>
4720 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4721 role="bold">/usr/bin</emphasis></entry>
4725 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.etc</emphasis></entry>
4728 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4729 role="bold">/usr/etc</emphasis></entry>
4733 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.inc</emphasis></entry>
4736 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4737 role="bold">/usr/include</emphasis></entry>
4741 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.lib</emphasis></entry>
4744 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4745 role="bold">/usr/lib</emphasis></entry>
4749 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.loc</emphasis></entry>
4752 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4753 role="bold">/usr/local</emphasis></entry>
4757 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.man</emphasis></entry>
4760 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4761 role="bold">/usr/man</emphasis></entry>
4765 <entry><replaceable>sysname</replaceable>.<emphasis role="bold">usr.sys</emphasis></entry>
4768 role="bold">/afs/</emphasis><replaceable>cellname</replaceable>/<replaceable>sysname</replaceable><emphasis
4769 role="bold">/usr/sys</emphasis></entry>
4776 <primary>foreign cell, enabling access</primary>
4780 <primary>cell</primary>
4782 <secondary>enabling access to foreign</secondary>
4786 <primary>access</primary>
4788 <secondary>to local and foreign cells</secondary>
4792 <primary>AFS filespace</primary>
4794 <secondary>enabling access to foreign cells</secondary>
4798 <primary>root.cell volume</primary>
4800 <secondary>mounting for foreign cells in local filespace</secondary>
4804 <primary>database server machine</primary>
4806 <secondary>entry in client CellServDB file</secondary>
4808 <tertiary>for foreign cell</tertiary>
4812 <primary>CellServDB file (client)</primary>
4814 <secondary>adding entry</secondary>
4816 <tertiary>for foreign cell</tertiary>
4820 <sect1 id="HDRWQ91">
4821 <title>Enabling Access to Foreign Cells</title>
4823 <para>With current OpenAFS releases, there exist a number of mechanisms for
4824 providing access to foreign cells. You may add mount points in your AFS
4825 filespace for each foreign cell you wish users to access, or you can
4826 enable a 'synthetic' AFS root, which contains mountpoints for either all
4827 AFS cells defined in the client machine's local
4828 <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis>, or for all cells
4829 providing location information in the DNS.
4833 <title>Enabling a Synthetic AFS root</title>
4835 <para>When a synthetic root is enabled, the client cache machine creates its
4836 own root.afs volume, rather than using the one provided with your cell. This
4837 allows clients to access all cells in the
4838 <emphasis role="bold">CellServDB</emphasis> file and, optionally, all cells
4839 registered in the DNS, without requiring system administrator action to
4840 enable this access. Using a synthetic root has the additional advantage that
4841 it allows a client to start its AFS service without a network available, as
4842 it is no longer necessary to contact a fileserver to obtain the root volume.
4845 <para>OpenAFS supports two complimentary mechanisms for creating the
4846 synthetic root. Starting the cache manager with the
4847 <emphasis role="bold">-dynroot</emphasis> option adds all cells listed
4848 in <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> to the client's
4849 AFS root. Adding the <emphasis role="bold">-afsdb</emphasis> option in
4850 addition to this enables DNS lookups for any cells that are not found in
4851 the client's CellServDB file. Both of these options are added to the AFS
4852 initialisation script, or options file, as detailed in
4853 <link linkend="HDRWQ70">Configuring the Cache Manager</link>.</para>
4856 <title>Adding foreign cells to a conventional root volume</title>
4858 <para>In this section you create a mount point in your AFS filespace for the <emphasis role="bold">root.cell</emphasis> volume
4859 of each foreign cell that you want to enable your users to access. For users working on a client machine to access the cell,
4860 there must in addition be an entry for it in the client machine's local <emphasis
4861 role="bold">/usr/vice/etc/CellServDB</emphasis> file. (The instructions in <link linkend="HDRWQ66">Creating the Client
4862 CellServDB File</link> suggest that you use the <emphasis role="bold">CellServDB.sample</emphasis> file included in the AFS
4863 distribution as the basis for your cell's client <emphasis role="bold">CellServDB</emphasis> file. The sample file lists all of
4864 the cells that had agreed to participate in the AFS global namespace at the time your AFS CD-ROM was created. As mentioned in
4865 that section, the AFS Product Support group also maintains a copy of the file, updating it as necessary.)</para>
4867 <para>The chapter in the <emphasis>OpenAFS Administration Guide</emphasis> about cell administration and configuration issues
4868 discusses the implications of participating in the global AFS namespace. The chapter about administering client machines
4869 explains how to maintain knowledge of foreign cells on client machines, and includes suggestions for maintaining a central
4870 version of the file in AFS. <orderedlist>
4872 <para>Issue the <emphasis role="bold">fs mkmount</emphasis> command to mount each foreign cell's <emphasis
4873 role="bold">root.cell</emphasis> volume on a directory called <emphasis
4874 role="bold">/afs/</emphasis><replaceable>foreign_cell</replaceable>. Because the <emphasis role="bold">root.afs</emphasis>
4875 volume is replicated, you must create a temporary mount point for its read/write version in a directory to which you have
4876 write access (such as your cell's <emphasis role="bold">/afs/.</emphasis><replaceable>cellname</replaceable> directory).
4877 Create the mount points, issue the <emphasis role="bold">vos release</emphasis> command to release new replicas to the
4878 read-only sites for the <emphasis role="bold">root.afs</emphasis> volume, and issue the <emphasis role="bold">fs
4879 checkvolumes</emphasis> command to force the local Cache Manager to access the new replica.</para>
4882 <para>You need to issue the <emphasis role="bold">fs mkmount</emphasis> command only once for each foreign cell's
4883 <emphasis role="bold">root.cell</emphasis> volume. You do not need to repeat the command on each client machine.</para>
4886 <para>Substitute your cell's name for <replaceable>cellname</replaceable>.</para>
4889 # <emphasis role="bold">cd /afs/.</emphasis><replaceable>cellname</replaceable>
4890 # <emphasis role="bold">/usr/afs/bin/fs mkmount temp root.afs</emphasis>
4893 <para>Repeat the <emphasis role="bold">fs mkmount</emphasis> command for each foreign cell you wish to mount at this
4897 # <emphasis role="bold">/usr/afs/bin/fs mkmount temp/</emphasis><replaceable>foreign_cell</replaceable> <emphasis role="bold">root.cell -c</emphasis> <replaceable>foreign_cell</replaceable>
4900 <para>Issue the following commands only once.</para>
4903 # <emphasis role="bold">/usr/afs/bin/fs rmmount temp</emphasis>
4904 # <emphasis role="bold">/usr/afs/bin/vos release root.afs</emphasis>
4905 # <emphasis role="bold">/usr/afs/bin/fs checkvolumes</emphasis>
4909 <primary>fs commands</primary>
4911 <secondary>newcell</secondary>
4915 <primary>commands</primary>
4917 <secondary>fs newcell</secondary>
4921 <listitem id="LIWQ92">
4922 <para>If this machine is going to remain an AFS client after you complete the installation, verify
4923 that the local <emphasis role="bold">/usr/vice/etc/CellServDB</emphasis> file includes an entry for each foreign
4926 <para>For each cell that does not already have an entry, complete the following instructions: <orderedlist>
4928 <para>Create an entry in the <emphasis role="bold">CellServDB</emphasis> file. Be sure to comply with the formatting
4929 instructions in <link linkend="HDRWQ66">Creating the Client CellServDB File</link>.</para>
4933 <para>Issue the <emphasis role="bold">fs newcell</emphasis> command to add an entry for the cell directly to the
4934 list that the Cache Manager maintains in kernel memory. Provide each database server machine's fully qualified
4935 hostname. <programlisting>
4936 # <emphasis role="bold">/usr/afs/bin/fs newcell</emphasis> <<replaceable>foreign_cell</replaceable>> <<replaceable>dbserver1></replaceable> \
4937 [<<replaceable>dbserver2></replaceable>] [<<replaceable>dbserver3></replaceable>]
4938 </programlisting></para>
4942 <para>If you plan to maintain a central version of the <emphasis role="bold">CellServDB</emphasis> file (the
4943 conventional location is <emphasis role="bold">/afs/</emphasis><replaceable>cellname</replaceable><emphasis
4944 role="bold">/common/etc/CellServDB</emphasis>), create it now as a copy of the local <emphasis
4945 role="bold">/usr/vice/etc/CellServDB</emphasis> file. Verify that it includes an entry for each foreign cell you
4946 want your users to be able to access. <programlisting>
4947 # <emphasis role="bold">mkdir common</emphasis>
4948 # <emphasis role="bold">mkdir common/etc</emphasis>
4949 # <emphasis role="bold">cp /usr/vice/etc/CellServDB common/etc</emphasis>
4950 # <emphasis role="bold">/usr/afs/bin/vos release root.cell</emphasis>
4951 </programlisting></para>
4953 </orderedlist></para>
4957 <para>Issue the <emphasis role="bold">ls</emphasis> command to verify that the new cell's mount point is visible in your
4958 filespace. The output lists the directories at the top level of the new cell's AFS filespace. <programlisting>
4959 # <emphasis role="bold">ls /afs/</emphasis><replaceable>foreign_cell</replaceable>
4960 </programlisting></para>
4964 <para>If you wish to participate in the global AFS namespace, and only
4965 intend running one database server, please
4966 register your cell with grand.central.org at this time.
4967 To do so, email the <emphasis role="bold">CellServDB</emphasis> fragment
4968 describing your cell, together with a contact name and email address
4969 for any queries, to cellservdb@grand.central.org. If you intend
4970 on deploying multiple database servers, please wait until you have
4971 installed all of them before registering your cell.</para>
4974 <para>If you wish to allow your cell to be located through DNS lookups,
4975 at this time you should also add the necessary configuration to your
4978 <para>AFS database servers may be located by creating AFSDB records
4979 in the DNS for the domain name corresponding to the name of your cell.
4980 It's outside the scope of this guide to give an indepth description of
4981 managing, or configuring, your site's DNS. You should consult the
4982 documentation for your DNS server for further details on AFSDB
4985 </orderedlist></para>
4989 <sect1 id="HDRWQ93">
4990 <title>Improving Cell Security</title>
4993 <primary>cell</primary>
4995 <secondary>improving security</secondary>
4999 <primary>security</primary>
5001 <secondary>improving</secondary>
5005 <primary>root superuser</primary>
5007 <secondary>controlling access</secondary>
5011 <primary>access</primary>
5013 <secondary>to root and admin accounts</secondary>
5017 <primary>admin account</primary>
5019 <secondary>controlling access to</secondary>
5023 <primary>AFS filespace</primary>
5025 <secondary>controlling access by root superuser</secondary>
5028 <para>This section discusses ways to improve the security of AFS data
5029 in your cell. Also see the chapter in the <emphasis>OpenAFS
5030 Administration Guide</emphasis> about configuration and administration
5033 <sect2 id="HDRWQ94">
5034 <title>Controlling root Access</title>
5036 <para>As on any machine, it is important to prevent unauthorized users from logging onto an AFS server or client machine as
5037 the local superuser <emphasis role="bold">root</emphasis>. Take care to keep the <emphasis role="bold">root</emphasis>
5038 password secret.</para>
5040 <para>The local <emphasis role="bold">root</emphasis> superuser does not have special access to AFS data through the Cache
5041 Manager (as members of the <emphasis role="bold">system:administrators</emphasis> group do), but it does have the following
5042 privileges: <itemizedlist>
5044 <para>On client machines, the ability to issue commands from the <emphasis role="bold">fs</emphasis> suite that affect
5045 AFS performance</para>
5049 <para>On server machines, the ability to disable authorization checking, or to install rogue process binaries</para>
5051 </itemizedlist></para>
5054 <sect2 id="HDRWQ95">
5055 <title>Controlling System Administrator Access</title>
5057 <para>Following are suggestions for managing AFS administrative privilege: <itemizedlist>
5059 <para>Create an administrative account for each administrator named
5061 <replaceable>username</replaceable><emphasis role="bold">.admin</emphasis>.
5062 Administrators authenticate under these identities only when
5063 performing administrative tasks, and destroy the administrative
5064 tokens immediately after finishing the task (either by issuing the
5065 <emphasis role="bold">unlog</emphasis> command, or the
5066 <emphasis role="bold">kinit</emphasis> and
5067 <emphasis role="bold">aklog</emphasis> commands to adopt their
5068 regular identity).</para>
5072 <para>Set a short ticket lifetime for administrator accounts (for example, 20 minutes) by using the
5073 facilities of your KDC. For instance, with a MIT Kerberos KDC, this
5074 can be performed using the
5075 <emphasis role="bold">--max-ticket-life</emphasis> argument to
5076 the <emphasis role="bold">kadmin modify_principal</emphasis>
5077 command. Do not however, use a short lifetime for users
5078 who issue long-running <emphasis role="bold">backup</emphasis> commands.</para>
5082 <para>Limit the number of system administrators in your cell, especially those who belong to the <emphasis
5083 role="bold">system:administrators</emphasis> group. By default they have all ACL rights on all directories in the local
5084 AFS filespace, and therefore must be trusted not to examine private files.</para>
5088 <para>Limit the use of system administrator accounts on machines in public areas. It is especially important not to
5089 leave such machines unattended without first destroying the administrative tokens.</para>
5093 <para>Limit the use by administrators of standard UNIX commands that make connections to remote machines (such as the
5094 <emphasis role="bold">telnet</emphasis> utility). Many of these programs send passwords across the network without
5095 encrypting them.</para>
5097 </itemizedlist></para>
5100 <primary>BOS Server</primary>
5102 <secondary>checking mode bits on AFS directories</secondary>
5106 <primary>mode bits on local AFS directories</primary>
5110 <primary>UNIX mode bits on local AFS directories</primary>
5114 <sect2 id="HDRWQ96">
5115 <title>Protecting Sensitive AFS Directories</title>
5117 <para>Some subdirectories of the <emphasis role="bold">/usr/afs</emphasis> directory contain files crucial to cell security.
5118 Unauthorized users must not read or write to these files because of the potential for misuse of the information they
5121 <para>As the BOS Server initializes for the first time on a server machine, it creates several files and directories (as
5122 mentioned in <link linkend="HDRWQ50">Starting the BOS Server</link>). It sets their owner to the local superuser <emphasis
5123 role="bold">root</emphasis> and sets their mode bits to enable writing by the owner only; in some cases, it also restricts
5126 <para>At each subsequent restart, the BOS Server checks that the owner and mode bits on these files are still set
5127 appropriately. If they are not, it write the following message to the <emphasis role="bold">/usr/afs/logs/BosLog</emphasis>
5131 Bosserver reports inappropriate access on server directories
5134 <para>The BOS Server does not reset the mode bits, which enables you to set alternate values if you wish.</para>
5136 <para>The following charts lists the expected mode bit settings. A question mark indicates that the BOS Server does not check
5137 that mode bit.</para>
5139 <informaltable frame="none">
5141 <colspec colwidth="30*" />
5143 <colspec colwidth="70*" />
5147 <entry><emphasis role="bold">/usr/afs</emphasis></entry>
5149 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
5153 <entry><emphasis role="bold">/usr/afs/backup</emphasis></entry>
5155 <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
5159 <entry><emphasis role="bold">/usr/afs/bin</emphasis></entry>
5161 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
5165 <entry><emphasis role="bold">/usr/afs/db</emphasis></entry>
5167 <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
5171 <entry><emphasis role="bold">/usr/afs/etc</emphasis></entry>
5173 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
5177 <entry><emphasis role="bold">/usr/afs/etc/KeyFile</emphasis></entry>
5179 <entry><computeroutput>-rw</computeroutput>????<computeroutput>---</computeroutput></entry>
5183 <entry><emphasis role="bold">/usr/afs/etc/UserList</emphasis></entry>
5185 <entry><computeroutput>-rw</computeroutput>?????<computeroutput>--</computeroutput></entry>
5189 <entry><emphasis role="bold">/usr/afs/local</emphasis></entry>
5191 <entry><computeroutput>drwx</computeroutput>???<computeroutput>---</computeroutput></entry>
5195 <entry><emphasis role="bold">/usr/afs/logs</emphasis></entry>
5197 <entry><computeroutput>drwxr</computeroutput>?<computeroutput>xr-x</computeroutput></entry>
5204 <primary>first AFS machine</primary>
5206 <secondary>client functionality</secondary>
5208 <tertiary>removing</tertiary>
5212 <primary>removing</primary>
5214 <secondary>client functionality from first AFS machine</secondary>
5219 <sect1 id="HDRWQ98">
5220 <title>Removing Client Functionality</title>
5222 <para>Follow the instructions in this section only if you do not wish this machine to remain an AFS client. Removing client
5223 functionality means that you cannot use this machine to access AFS files. <orderedlist>
5225 <para>Remove the files from the <emphasis role="bold">/usr/vice/etc</emphasis> directory. The command does not remove the
5226 directory for files used by the dynamic kernel loader program, if it exists on this system type. Those files are still
5227 needed on a server-only machine. <programlisting>
5228 # <emphasis role="bold">cd /usr/vice/etc</emphasis>
5229 # <emphasis role="bold">rm *</emphasis>
5230 # <emphasis role="bold">rm -rf C</emphasis>
5231 </programlisting></para>
5235 <para>Create symbolic links to the <emphasis role="bold">ThisCell</emphasis> and <emphasis
5236 role="bold">CellServDB</emphasis> files in the <emphasis role="bold">/usr/afs/etc</emphasis> directory. This makes it
5237 possible to issue commands from the AFS command suites (such as <emphasis role="bold">bos</emphasis> and <emphasis
5238 role="bold">fs</emphasis>) on this machine. <programlisting>
5239 # <emphasis role="bold">ln -s /usr/afs/etc/ThisCell ThisCell</emphasis>
5240 # <emphasis role="bold">ln -s /usr/afs/etc/CellServDB CellServDB</emphasis>
5241 </programlisting></para>
5245 <para>Reboot the machine. Most system types use the <emphasis role="bold">shutdown</emphasis> command, but the appropriate
5246 options vary. <programlisting>
5247 # <emphasis role="bold">cd /</emphasis>
5248 # <emphasis role="bold">shutdown</emphasis> <replaceable>appropriate_options</replaceable>
5249 </programlisting></para>
5251 </orderedlist></para>