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