PAGSH(1) | AFS Command Reference | PAGSH(1) |
pagsh, pagsh.krb - Creates a new PAG
pagsh
pagsh.krb
The pagsh command creates a new command shell (owned by the issuer of the command) and associates a new process authentication group (PAG) with the shell and the user. A PAG is a number guaranteed to identify the issuer of commands in the new shell uniquely to the local Cache Manager. The PAG is used, instead of the issuer's UNIX UID, to identify the issuer in the credential structure that the Cache Manager creates to track each user.
Any tokens acquired subsequently (presumably for other cells) become associated with the PAG, rather than with the user's UNIX UID. This method for distinguishing users has two advantages:
The (mostly obsolete) pagsh.krb command is the same as pagsh except that it also sets the KRBTKFILE environment variable, which controls the default Kerberos v4 ticket cache, to /tmp/tktpX where X is the number of the user's PAG. This is only useful for AFS cells still using Kerberos v4 outside of AFS and has no effect for cells using Kerberos v5 and aklog or klog.krb5.
Each PAG created uses two of the memory slots that the kernel uses to record the UNIX groups associated with a user. If none of these slots are available, the pagsh command fails. This is not a problem with most operating systems, which make at least 16 slots available per user.
In cells that do not use an AFS-modified login utility, use this command to obtain a PAG before issuing the klog command (or include the -setpag argument to the klog command). If a PAG is not acquired, the Cache Manager stores the token in a credential structure identified by local UID rather than PAG. This creates the potential security exposure described in "DESCRIPTION".
If users of NFS client machines for which AFS is supported are to issue this command as part of authenticating with AFS, do not use the fs exportafs command's -uidcheck on argument to enable UID checking on NFS/AFS Translator machines. Enabling UID checking prevents this command from succeeding. See klog(1).
If UID checking is not enabled on Translator machines, then by default it is possible to issue this command on a properly configured NFS client machine that is accessing AFS via the NFS/AFS Translator, assuming that the NFS client machine is a supported system type. The pagsh binary accessed by the NFS client must be owned by, and grant setuid privilege to, the local superuser "root". The complete set of mode bits must be "-rwsr-xr-x". This is not a requirement when the command is issued on AFS client machines.
However, if the translator machine's administrator has enabled UID checking by including the -uidcheck on argument to the fs exportafs command, the command fails with an error message similar to the following:
Warning: Remote setpag to <translator_machine> has failed (err=8). . . setpag: Exec format error
In the following example, the issuer invokes the C shell instead of the default Bourne shell:
# pagsh -c /bin/csh
None
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
2021-01-14 | OpenAFS |