initial-html-documentation-20010606
[openafs.git] / doc / html / AdminReference / auarf208.htm
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 4//EN">
2 <HTML><HEAD>
3 <TITLE>Administration Reference</TITLE>
4 <!-- Begin Header Records  ========================================== -->
5 <!-- /tmp/idwt3672/auarf000.scr converted by idb2h R4.2 (359) ID      -->
6 <!-- Workbench Version (AIX) on 3 Oct 2000 at 16:18:30                -->
7 <META HTTP-EQUIV="updated" CONTENT="Tue, 03 Oct 2000 16:18:29">
8 <META HTTP-EQUIV="review" CONTENT="Wed, 03 Oct 2001 16:18:29">
9 <META HTTP-EQUIV="expires" CONTENT="Thu, 03 Oct 2002 16:18:29">
10 </HEAD><BODY>
11 <!-- (C) IBM Corporation 2000. All Rights Reserved    --> 
12 <BODY bgcolor="ffffff"> 
13 <!-- End Header Records  ============================================ -->
14 <A NAME="Top_Of_Page"></A>
15 <H1>Administration Reference</H1>
16 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf207.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Bot_Of_Page"><IMG SRC="../bot.gif" BORDER="0" ALT="[Bottom of Topic]"></A> <A HREF="auarf209.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
17 <P>
18 <H2><A NAME="HDRPAGSH" HREF="auarf002.htm#ToC_222">pagsh</A></H2>
19 <A NAME="IDX5213"></A>
20 <A NAME="IDX5214"></A>
21 <A NAME="IDX5215"></A>
22 <A NAME="IDX5216"></A>
23 <P><STRONG>Purpose</STRONG>
24 <P>Creates a new PAG
25 <P><STRONG>Synopsis</STRONG>
26 <PRE><B>pagsh</B>
27 </PRE>
28 <P><STRONG>Description</STRONG>
29 <P>The <B>pagsh</B> command creates a new command shell (owned by the
30 issuer of the command) and associates a new <I>process authentication
31 group</I> (PAG) with the shell and the user. A PAG is a number
32 guaranteed to identify the issuer of commands in the new shell uniquely to the
33 local Cache Manager. The PAG is used, instead of the issuer's UNIX
34 UID, to identify the issuer in the credential structure that the Cache Manager
35 creates to track each user.
36 <P>Any tokens acquired subsequently (presumably for other cells) become
37 associated with the PAG, rather than with the user's UNIX UID.
38 This method for distinguishing users has two advantages.
39 <UL>
40 <P><LI>It means that processes spawned by the user inherit the PAG and so share
41 the token; thus they gain access to AFS as the authenticated user.
42 In many environments, for example, printer and other daemons run under
43 identities (such as the local superuser <B>root</B>) that the AFS server
44 processes recognize only as <B>anonymous</B>. Unless PAGs are used,
45 such daemons cannot access files in directories whose access control lists
46 (ACLs) do not extend permissions to the <B>system:anyuser</B>
47 group.
48 <P><LI>It closes a potential security loophole: UNIX allows anyone already
49 logged in as the local superuser <B>root</B> on a machine to assume any
50 other identity by issuing the UNIX <B>su</B> command. If the
51 credential structure is identified by a UNIX UID rather than a PAG, then the
52 local superuser <B>root</B> can assume a UNIX UID and use any tokens
53 associated with that UID. Use of a PAG as an identifier eliminates that
54 possibility.
55 </UL>
56 <TABLE><TR><TD ALIGN="LEFT" VALIGN="TOP"><B>Note:</B></TD><TD ALIGN="LEFT" VALIGN="TOP">The <B>pagsh.krb</B> version of this command is intended for use
57 by sites that employ standard Kerberos authentication for their
58 clients. The <B>pagsh.krb</B> command provides all the
59 functionality of the <B>pagsh</B> command. In addition, it defines
60 the environment variable KRBTKFILE (which specifies the storage location of
61 Kerberos tickets) to be the <B>/tmp/tktp</B><VAR>X</VAR> file (where
62 <VAR>X</VAR> is the number of the user's PAG). The functionality of
63 this command supports the placement of Kerberos tickets by the
64 <B>klog.krb</B> command and Kerberized AFS-modified login utilities
65 in the file specified by the environment variable KRBTKFILE.
66 </TD></TR></TABLE>
67 <P><STRONG>Cautions</STRONG>
68 <P>Each PAG created uses two of the memory slots that the kernel uses to
69 record the UNIX groups associated with a user. If none of these slots
70 are available, the <B>pagsh</B> command fails. This is not a
71 problem with most operating systems, which make at least 16 slots available
72 per user.
73 <P>In cells that do not use an AFS-modified login utility, use this command to
74 obtain a PAG before issuing the <B>klog</B> command (or include the
75 <B>-setpag</B> argument to the <B>klog</B> command). If a PAG
76 is not acquired, the Cache Manager stores the token in a credential structure
77 identified by local UID rather than PAG. This creates the potential
78 security exposure described in the <B>Description</B> section.
79 <P>If users of NFS client machines for which AFS is supported are to issue
80 this command as part of authenticating with AFS, do not use the <B>fs
81 exportafs</B> command's <B>-uidcheck on</B> argument to enable UID
82 checking on NFS/AFS Translator machines. Enabling UID checking prevents
83 this command from succeeding. See the reference page for the
84 <B>klog</B> command.
85 <P>If UID checking is not enabled on Translator machines, then by default it
86 is possible to issue this command on a properly configured NFS client machine
87 that is accessing AFS via the NFS/AFS Translator, assuming that the NFS client
88 machine is a supported system type. The <B>pagsh</B> binary
89 accessed by the NFS client must be owned by, and grant setuid privilege to,
90 the local superuser <B>root</B>. The complete set of mode bits must
91 be <B>-rwsr-xr-x</B>. This is not a requirement when the command is
92 issued on AFS client machines.
93 <P>However, if the translator machine's administrator has enabled UID
94 checking by including the <B>-uidcheck on</B> argument to the <B>fs
95 exportafs</B> command, the command fails with an error message similar to
96 the following:
97 <PRE>   
98    Warning: Remote setpag to <VAR>translator_machine</VAR>  has failed (err=8). . . 
99    setpag: Exec format error
100 </PRE>
101 <P><STRONG>Examples</STRONG>
102 <P>In the following example, the issuer invokes the C shell instead of the
103 default Bourne shell:
104 <PRE>   # <B>pagsh -c /bin/csh</B>
105    
106 </PRE>
107 <P><STRONG>Privilege Required</STRONG>
108 <P>None
109 <P><STRONG>Related Information</STRONG>
110 <P><A HREF="auarf139.htm#HDRFS_EXPORTAFS">fs exportafs</A>
111 <P><A HREF="auarf200.htm#HDRKLOG">klog</A>
112 <P><A HREF="auarf235.htm#HDRTOKENS">tokens</A>
113 <P>
114 <HR><P ALIGN="center"> <A HREF="../index.htm"><IMG SRC="../books.gif" BORDER="0" ALT="[Return to Library]"></A> <A HREF="auarf002.htm#ToC"><IMG SRC="../toc.gif" BORDER="0" ALT="[Contents]"></A> <A HREF="auarf207.htm"><IMG SRC="../prev.gif" BORDER="0" ALT="[Previous Topic]"></A> <A HREF="#Top_Of_Page"><IMG SRC="../top.gif" BORDER="0" ALT="[Top of Topic]"></A> <A HREF="auarf209.htm"><IMG SRC="../next.gif" BORDER="0" ALT="[Next Topic]"></A> <A HREF="auarf284.htm#HDRINDEX"><IMG SRC="../index.gif" BORDER="0" ALT="[Index]"></A> <P> 
115 <!-- Begin Footer Records  ========================================== -->
116 <P><HR><B> 
117 <br>&#169; <A HREF="http://www.ibm.com/">IBM Corporation 2000.</A>  All Rights Reserved 
118 </B> 
119 <!-- End Footer Records  ============================================ -->
120 <A NAME="Bot_Of_Page"></A>
121 </BODY></HTML>