Windows: Support new Cygwin docbook stylesheet location
[openafs.git] / doc / man-pages / pod1 / pagsh.pod
1 =head1 NAME
2
3 pagsh, pagsh.krb - Creates a new PAG
4
5 =head1 SYNOPSIS
6
7 =for html
8 <div class="synopsis">
9
10 B<pagsh>
11
12 B<pagsh.krb>
13
14 =for html
15 </div>
16
17 =head1 DESCRIPTION
18
19 The B<pagsh> command creates a new command shell (owned by the issuer of
20 the command) and associates a new I<process authentication group> (PAG)
21 with the shell and the user. A PAG is a number guaranteed to identify the
22 issuer of commands in the new shell uniquely to the local Cache
23 Manager. The PAG is used, instead of the issuer's UNIX UID, to identify
24 the issuer in the credential structure that the Cache Manager creates to
25 track each user.
26
27 Any tokens acquired subsequently (presumably for other cells) become
28 associated with the PAG, rather than with the user's UNIX UID.  This
29 method for distinguishing users has two advantages:
30
31 =over 2
32
33 =item *
34
35 It means that processes spawned by the user inherit the PAG and so share
36 the token; thus they gain access to AFS as the authenticated user.  In
37 many environments, for example, printer and other daemons run under
38 identities (such as the local superuser C<root>) that the AFS server
39 processes recognize only as C<anonymous>. Unless PAGs are used, such
40 daemons cannot access files in directories whose access control lists
41 (ACLs) do not extend permissions to the system:anyuser group.
42
43 =item *
44
45 It closes a potential security loophole: UNIX allows anyone already logged
46 in as the local superuser C<root> on a machine to assume any other
47 identity by issuing the UNIX B<su> command. If the credential structure is
48 identified by a UNIX UID rather than a PAG, then the local superuser
49 C<root> can assume a UNIX UID and use any tokens associated with that
50 UID. Use of a PAG as an identifier eliminates that possibility.
51
52 =back
53
54 The (mostly obsolete) B<pagsh.krb> command is the same as B<pagsh> except
55 that it also sets the KRBTKFILE environment variable, which controls the
56 default Kerberos v4 ticket cache, to F</tmp/tktpI<X>> where I<X> is the
57 number of the user's PAG.  This is only useful for AFS cells still using
58 Kerberos v4 outside of AFS and has no effect for cells using Kerberos v5
59 and B<aklog> or B<klog.krb5>.
60
61 =head1 CAUTIONS
62
63 Each PAG created uses two of the memory slots that the kernel uses to
64 record the UNIX groups associated with a user. If none of these slots are
65 available, the B<pagsh> command fails. This is not a problem with most
66 operating systems, which make at least 16 slots available per user.
67
68 In cells that do not use an AFS-modified login utility, use this command
69 to obtain a PAG before issuing the B<klog> command (or include the
70 B<-setpag> argument to the B<klog> command). If a PAG is not acquired, the
71 Cache Manager stores the token in a credential structure identified by
72 local UID rather than PAG. This creates the potential security exposure
73 described in L<DESCRIPTION>.
74
75 If users of NFS client machines for which AFS is supported are to issue
76 this command as part of authenticating with AFS, do not use the B<fs
77 exportafs> command's B<-uidcheck on> argument to enable UID checking on
78 NFS/AFS Translator machines. Enabling UID checking prevents this command
79 from succeeding. See L<klog(1)>.
80
81 If UID checking is not enabled on Translator machines, then by default it
82 is possible to issue this command on a properly configured NFS client
83 machine that is accessing AFS via the NFS/AFS Translator, assuming that
84 the NFS client machine is a supported system type. The B<pagsh> binary
85 accessed by the NFS client must be owned by, and grant setuid privilege
86 to, the local superuser C<root>. The complete set of mode bits must be
87 C<-rwsr-xr-x>. This is not a requirement when the command is issued on AFS
88 client machines.
89
90 However, if the translator machine's administrator has enabled UID
91 checking by including the B<-uidcheck on> argument to the B<fs exportafs>
92 command, the command fails with an error message similar to the following:
93
94    Warning: Remote setpag to <translator_machine> has failed (err=8). . .
95    setpag: Exec format error
96
97 =head1 EXAMPLES
98
99 In the following example, the issuer invokes the C shell instead of the
100 default Bourne shell:
101
102    # pagsh -c /bin/csh
103
104 =head1 PRIVILEGE REQUIRED
105
106 None
107
108 =head1 SEE ALSO
109
110 L<aklog(1)>,
111 L<fs_exportafs(1)>,
112 L<klog(1)>,
113 L<tokens(1)>
114
115 =head1 COPYRIGHT
116
117 IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
118
119 This documentation is covered by the IBM Public License Version 1.0.  It was
120 converted from HTML to POD by software written by Chas Williams and Russ
121 Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.