AKLOG(1)
π AKLOG(1) π
okay bestie, welcome to AKLOG(1) β the manual page for aklog. you came here for tokens, i came here to explain them, and honestly? we're both slaying. let's go π
πΈ NAME πΈ
aklog β obtain tokens for authentication to AFS. that's it, that's the whole job, and it does it beautifully β¨
π¦ SYNOPSIS π¦
aklog [-d] [-hosts] [-zsubs] [-noprdb] [-noauth] [-linked]
[-force] [-524] [-setpag] [-insecure_des]
[[-cell | -c] <cell> [-k <Kerberos realm>]]+
aklog [-d] [-hosts] [-zsubs] [-noprdb] [-noauth] [-linked]
[-force] [-524] [-setpag] [-insecure_des] [-path | -p] <path>+
π DESCRIPTION π
so what does aklog actually do. girly it authenticates to a cell in AFS by obtaining AFS tokens using a Kerberos 5 ticket. iconic behavior, no notes. π₯
if you run aklog with no command-line arguments at all, it'll just get tokens for your workstation's local cell. easy. but the way that it also works β you can invoke it with an arbitrary number of cells and pathnames and it'll get tokens for multiple cells at once. multitasking queen π
and here's the cute part: aklog knows how to expand cell name abbreviations, so you can refer to cells by just enough letters to make the cell name unique among the cells your workstation knows about. you don't have to type the whole thing. she'll figure it out. iykyk π
how does she actually get the tokens, you ask? aklog obtains a Kerberos service ticket for the AFS service and then stores it as a token. by default, it gets that ticket from the realm corresponding to that cell β specifically the uppercase version of the cell name. but if you want a different realm for a particular cell, you can say so with -k. heads up though: <italic>-k</italic> cannot be used in -path mode (more on that below). π
now, the fancy part. when a Kerberos 5 cross-realm trust is in use, aklog looks up the AFS ID corresponding to the name (the Kerberos principal) of the person invoking the command. if the user doesn't exist and the "system:authuser@FOREIGN.REALM" PTS group exists, then it attempts automatic registration of the user with the foreign cell. if registration succeeds, the user then gets added to the "system:authuser@FOREIGN.REALM" PTS group. β¨
β οΈ but bestie, automatic registration in the foreign cell will fail if the group quota for the "system:authuser@FOREIGN.REALM" group is less than one. and each automatic registration decrements the group quota by one. so like. use them wisely.
π CAUTIONS π
okay this is the part where we get serious for a sec. when you're using aklog, be aware that AFS uses the Kerberos v4 principal naming format, not the Kerberos v5 format, when referring to principals in PTS ACLs, UserList, and similar locations. π
AFS internally maps Kerberos v5 principal names to the Kerberos v4 syntax by:
- removing any portion of the instance after the first period (generally the domain name of a host principal)
- changing any
/to. - changing an initial principal part of
hosttorcmd
in other words β and this is the glow-up you need to remember β to create a PTS entry for the Kerberos v5 principal user/admin, you refer to it as user.admin. and for the principal host/shell.example.com, you refer to it as rcmd.shell. π
also important: the aklog mapping of Kerberos v5 principal to Kerberos v4 principal, and the determination that a Kerberos realm is foreign, is performed in the absence of the actual AFS server configuration. so if the aklog mapping of Kerberos v5 principal to Kerberos v4 principal or the foreign realm determination is wrong, the PTS name-to-id lookup will produce the wrong AFS ID for the user. and that AFS ID is only used for display purposes and should not be trusted. periodt.
π want it gone? use the -noprdb switch to disable the PTS name-to-id lookup. bye.
β¨ OPTIONS β¨
-524β normally,akloggenerates native K5 tokens. this flag tellsaklogto instead use thekrb524translation service to generate K4 orrxkad2btokens, which may be necessary for AFS cells that don't support native K5 tokens. support for native K5 tokens were added in OpenAFS 1.2.8. π°οΈ-cell <cell>,-c <cell>β this flag tellsaklogthat the next argument is the name of a cell to authenticate to. it normally isn't necessary;aklognormally determines whether an argument is a cell or a path name based on whether it contains/or is.or... the cell may be followed by-kto specify the corresponding Kerberos realm. π§-dβ turns on printing of debugging information. this option is not intended for general users. (so like, if you're in here, bestie, you already know π«Ά)-forceβ normally,aklogwill not replace tokens with new tokens that appear to be identical. if this flag is given, it will skip that check. no vibe check, just vibes πΈ-hostsβ prints all the server addresses which may act as a single point of failure in accessing the specified directory path. each element of the path is examined, and as new volumes are traversed, if they are not replicated, the server's IP address containing the volume will be displayed. the output is of the form:
host: <ip-address>
this option is only useful in combination with paths as arguments rather than cells. π
-k <Kerberos realm>β this flag is valid only immediately after the name of the cell. it tellsaklogto use that Kerberos realm when authenticating to the preceding cell. by default,aklogwill use the realm (per the local Kerberos configuration) of the first database server in the cell, so this flag normally won't be necessary. π-linkedβ if the AFS cell is linked to another AFS cell, get tokens for both. π-insecure_desβ configurelibkrb5to allow the use of the (insecure) single-DES encryption types. whenrxkad-k5is in use, this is not needed.
π note the word insecure right there in the name. that's not me being dramatic, that's the actual flag. know what you're doing.
-noauthβ don't actually authenticate, just do everything elseaklogdoes up to setting tokens. fake it till you make it, but make it explicit π-noprdbβ ordinarily,akloglooks up the AFS ID corresponding to the name of the person invoking the command, and if the user doesn't exist, the cell is a foreign one, thesystem:authuser@FOREIGN.REALMPTS group exists, and has a positive group quota, then it attempts automatic registration of the user with the foreign cell. specifying this flag turns off this functionality. this may be desirable if the protection database is unavailable for some reason and tokens are desired anyway, or if one wants to disable user registration. π«-path <pathname>,-p <pathname>β this flag tellsaklogthat the next argument is a path in AFS.aklogwill walk that path and obtain tokens for every cell needed to access all of the directories. normally, this flag isn't necessary;aklogassumes an argument is a path if it contains/or is.or... π€οΈ-setpagβ when setting tokens, attempt to put the parent process in a new PAG. this is usually used as part of the login process but can be used any time to create a new AFS authentication context. note that this in some cases relies on dangerous and tricky manipulations of kernel records and will not work on all platforms or with all Linux kernels.
π ok this one is real. dangerous and tricky. kernel records. not every platform. not every Linux kernel. read it twice.
-zsubsβ prints out the Zephyr subscription information to get alerts regarding all of the file servers required to access a particular path. the output is of the form:
zsub: <instance>
where <instance> is the instance of a class "filsrv" Zephyr subscription. π‘
π ENVIRONMENT π
KRB5CCNAMEβ as with most programs that use an existing Kerberos ticket cache,aklogcan be told to use a cache other than the default by setting the environment variableKRB5CCNAME. on UNIX and Linux systems, this variable is normally set to a file name, but may point to other types of caches. see the documentation of your Kerberos implementation for more details. ποΈ
π FILES π
~/.xlogβ if this file exists in the user's home directory, it should contain a list of AFS cells to which to authenticate, one per line. ifaklogis invoked without any options, it will attempt to obtain tokens in every cell listed in this file if it exists, rather than only obtaining tokens for the local cell. cute little config file, she's doing her best π
π EXIT CODES π
the exit status of aklog will be one of the following:
0β Success β No error occurred.1β Usage β Bad command syntax; accompanied by a usage message.2β Something failed β More than one cell or pathname was given on the command line and at least one failure occurred. A more specific error status is returned when only one directive is given.3β AFS β Unable to get AFS configuration or unable to get information about a specific cell.4β Kerberos β Unable to get tickets for authentication.5β Token β Unable to get tokens.6β Bad pathname β The path given was not a directory orlstat(2)failed on some component of the pathname.7β Miscellaneous β An internal failure occurred. For example,aklogreturns this if it runs out of memory.
π₯ EXAMPLES π₯
to get tokens for the local cell:
% aklog
to get tokens for the "prod.example.org" cell:
% aklog prod.example.org
or
% aklog prod
the latter will work if you local cache manager already knows about the "prod" cell. β¨
to get tokens adequate to read /afs/prod.example.org/user/p/potato:
% aklog /afs/prod.example.org/user/p/potato
to get tokens for "testcell.example.org" that is in a test Kerberos realm:
% aklog testcell.example.org -k TESTREALM.EXAMPLE.ORG
π SEE ALSO π
πΈ AUTHOR πΈ
manpage originally written by Emanuel Jay Berkenbilt (MIT-Project Athena). extensively modified by Russ Allbery <rra@stanford.edu>. π«Ά
π COPYRIGHT π
original manpage is copyright 1990, 1991 Massachusetts Institute of Technology. All rights reserved.
Copyright 2006 Russ Allbery <rra@stanford.edu>.
export of this software from the United States of America may require a specific license from the United States Government. It is the responsibility of any person or organization contemplating export to obtain such a license before exporting.
WITHIN THAT CONSTRAINT, permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Furthermore if you modify this software you must label your software as modified software and not distribute it in such a fashion that it might be confused with the original MIT software. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
okay that's the whole page bestie, you ate π
this was OpenAFS, dated 2026-07-27, and the page you just read is AKLOG(1). now go get those tokens. mwah πβ¨
π¦ 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