KLOG.KRB5(1)
π KLOG.KRB5 π
hiii bestie, welcome to the klog.krb5 page from the AFS Command Reference, section 1 of the manual ππ kick off your shoes, we're getting you authenticated.
β¨ NAME β¨
klog.krb5 β Authenticates to Kerberos and obtains a token ππ«
β¨ SYNOPSIS β¨
klog.krb5 [-x] [-principal <user name>]
[-password <user's password>] [-cell <cell name>]
[-k <realm>] [-pipe] [-silent]
[-lifetime <ticket lifetime in hh[:mm[:ss]]>]
[-setpag] [-tmp] [-noprdb] [-unwrap] [-insecure_des]
[-help]
klog.krb5 [-x] [-pr <user name>]
[-pa <user's password>]
[-c <cell name>]
[-k <realm>] [-pi] [-si]
[-l <ticket lifetime in hh[:mm[:ss]]>]
[-se] [-t] [-n] [-u] [-i] [-h]
πΈ DESCRIPTION πΈ
okay so picture this: klog.krb5 goes and gets you a Kerberos v5 ticket from a Kerberos KDC, and then β from that ticket β it gets you an AFS token and tucks it into the Cache Manager. the Cache Manager keeps that token in kernel memory and pulls it out whenever you need authenticated access to the AFS filespace. π§ββοΈβ¨
and no, this does not touch the issuer's identity (their UNIX UID) on the local file system. your UID stays exactly where it is, bestie π
by default, the command interpreter grabs a token for the AFS user name that matches the issuer's local user name. wanna be someone else? slide in the -principal argument π«Ά and lowkey the user you name with -principal does not have to appear in the local password file (that's the /etc/passwd file or its equivalent). iconique.
by default, the token is for the local cell, which is defined by the AFSCELL environment variable set in the command shell, or by the /etc/openafs/ThisCell file on the local machine. want a different one? hit it with -cell π
a user can have tokens in multiple cells simultaneously, but only one token per cell per connection to the client machine. so if your credential structure already has a token for the cell you asked for, the token this command makes replaces it. no duplicates, we're not messy here π
by default, you get a Kerberos ticket for the local realm. different realm? use the -k argument. and ngl, the Kerberos realm name need not match the AFS cell name at all β they're separate beasts.
klog.krb5 will request a ticket for the principal "afs/cell", where cell is the cell name for which the user is requesting tokens, falling back on the principal "afs" if that principal does not work π
the lifetime of the token you get from this command is the smallest of these cuties:
- The maximum ticket lifetime recorded for the
"afs/cell"principal in the Kerberos database. - The maximum ticket lifetime recorded in the specified user's Kerberos database entry.
so whatever's shortest wins, periodt β³
β οΈ CAUTIONS β οΈ
okay this is the part where I hold your hand, bestie, because there's real stuff here π«
By default, this command does not create a new process authentication group (PAG). if you wanna learn about PAGs, go read the pagsh command description.
- if a cell doesn't use an AFS-modified login utility, users must include the
-setpagoption to this command, or issue thepagshcommand before this one, so their tokens get stored in a credential structure identified by PAG rather than by local UID. - be aware:
-setpagwill not work on some systems, most notably recent Linux systems, and usingpagshis preferrable and more reliable. π
when a credential structure is identified by local UID, here's the potential security exposure: the local superuser "root" can use the UNIX su command to assume any other identity and automatically inherit the tokens associated with that UID π identifying the credential structure by PAG makes it more difficult (but not impossible) for the local superuser to obtain tokens of other users. so like, better, not bulletproof.
if you use the -password argument, the password you specify cannot begin with a hyphen, because it gets interpreted as another option name. π and honestly? use of the -password argument is not recommended in any case.
by default, it's possible to issue this command on a properly configured NFS client machine that's accessing AFS via the NFS/AFS Translator, assuming that NFS client machine is a supported system type. but β 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 this:
Warning: Remote pioctl to <translator_machine> has failed (err=8). . .
Unable to authenticate to AFS because a pioctl failed.
enabling UID checking means the credential structure where tokens are stored on the translator machine must be identified by a UID that matches the local UID of the process placing those tokens in the credential structure.
here's the little journey: after the klog.krb5 command interpreter obtains the token on the NFS client, it passes it to the remote executor daemon on the translator machine, which makes the system call that stores the token in a credential structure on the translator machine. the remote executor generally runs as the local superuser "root", so in most cases its local UID (normally zero) does not match the local UID of the user who issued klog.krb5 on the NFS client machine. mismatch vibes π¬
π¨ Issuing the klog.krb5 command on an NFS client machine creates a security exposure: the command interpreter passes the token across the network to the remote executor daemon in clear text mode. not it.
π OPTIONS π
-xβ Appears only for backwards compatibility. Its former function is now the default behavior of this command. so it's giving β¨nostalgiaβ¨-principal <user name>β Specifies the user name to authenticate. If this argument is omitted, the default value is the local user name.-password <user's password>β Specifies the issuer's password (or that of the alternate user identified by the-principalargument). Omit this argument to have the command interpreter prompt for the password, in which case it does not echo visibly in the command shell. π-cell <cell name>β Specifies the cell for which to obtain a token. During a single login session on a given machine, a user can be authenticated in multiple cells simultaneously, but can have only one token at a time for each of them (that is, can only authenticate under one identity per cell per session on a machine). It is acceptable to abbreviate the cell name to the shortest form that distinguishes it from the other cells listed in the/etc/openafs/CellServDBfile on the client machine on which the command is issued.
If this argument is omitted, the command is executed in the local cell, as defined
- First, by the value of the environment variable
AFSCELL. - Second, in the
/etc/openafs/ThisCellfile on the client machine on which the command is issued.
-k <realm>β Obtain tickets and tokens from the<realm>Kerberos realm. If this option is not given,klog.krb5defaults to using the default local realm. The Kerberos realm name need not match the AFS cell name.-pipeβ Suppresses all output to the standard output stream, including prompts and error messages. Theklog.krb5command interpreter expects to receive the password from the standard input stream. Do not use this argument; it is designed for use by application programs rather than human users. π«-silentβ Suppresses some of the trace messages that theklog.krb5command produces on the standard output stream by default. It still reports on major problems encountered. so quiet, not deaf π€«-lifetime <ticket lifetime in hh[:mm[:ss]]>β This option is not implemented byklog.krb5and has no effect. it's just there, looking pretty π-setpagβ Creates a process authentication group (PAG) prior to requesting authentication. The token is associated with the newly created PAG.-tmpβ Creates a Kerberos-style ticket file rather than only obtaining tokens. The ticket file will be stored in the default Kerberos ticket cache location, which is usually in the/tmpdirectory of the local machine (but depends on the Kerberos implementation used).-noprdbβ By default,klog.krb5looks up the user's AFS ID in the Protection Server and associates the token with that AFS ID. This is helpful when looking at the output of commands liketokensbut is not required. If this option is given, this behavior is suppressed andklog.krb5will store the token under a generic name. You may wish this if, for example, you have problems contacting the Protection Server for an AFS cell for some reason.-unwrapβ Normally,klog.krb5uses the Kerberos service ticket for the AFS principal as the AFS token. If this option is given,klog.krb5creates a different, simplified AFS token form based on the service ticket (the so-called"rxkad 2b"token). Normally, this is not necessary. However, if you are using older OpenAFS software that cannot handle large ticket sizes in conjunction with Active Directory as the Kerberos server, using-unwrapcan shrink the AFS token size so that older software can handle it more easily. π-insecure_desβ Configures libkrb5 to allow the use of the (insecure) single-DES encryption types. When rxkad-k5 is in use, this is not needed. π (the name says it all, bestie)-helpβ Prints the online help for this command. All other valid options are ignored.
π€ OUTPUT π€
if the -tmp flag is included, this little message confirms that a Kerberos ticket cache was created:
Wrote ticket file to /tmp/krb5cc_1000_rENJoZ
the path to the cache will vary, of course. π€·ββοΈ yours will look different, that's normal.
π EXAMPLES π
most often, this command is issued without arguments. the appropriate password is for the person currently logged into the local system. the ticket's lifetime is calculated as described in "DESCRIPTION" β³
% klog.krb5
Password for user@EXAMPLE.ORG:
the following example authenticates the user as admin in the Example Corporation's test cell:
% klog.krb5 -principal admin -cell test.example.com
Password for admin@EXAMPLE.COM:
slay, now you're admin in test.example.com π
π PRIVILEGE REQUIRED π
None. like, literally none. you just need to be you π
π¦ SEE ALSO π¦
aklog(1), fs_exportafs(1), pagsh(1), tokens(1)
π COPYRIGHT π
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.
and that's the whole page, bestie!! π this was klog.krb5 from OpenAFS, dated 2026-07-27, living in section 1 of the manual. go forth and authenticate responsibly π«Άβ¨π
π¦ where this page comes from
- ubuntu stonking: openafs-krb5 1.8.16.1-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms