KERBEROS(7)
π KERBEROS(7) β the MIT Kerberos manual, bestie edition β¨
okay so you opened kerberos(7), the overview page from the MIT Kerberos manual set, and honestly? it's giving "the lore you actually need." sit down, grab a boba π§, and let's get you fluent.
πΈ NAME πΈ
kerberos β the whole vibe of using Kerberos, explained π«Ά
β¨ DESCRIPTION β¨
bestie. the Kerberos system authenticates individual users in a network environment. that's the whole job. π and once you've authenticated yourself to Kerberos, you can use Kerberos-enabled programs without having to present passwords or certificates to those programs. no cap, that's the flex. π₯
okay but real talk β if you run kinit and get this back:
kinit: Client not found in Kerberos database while getting initial credentials
β¦then bestie, you haven't been registered as a Kerberos user. π it's not you, it's the database. go see your system administrator. periodt.
π the anatomy of a Kerberos name π
a Kerberos name usually contains three parts, and the way it's structured is honestly iconic:
- The primary β usually a user's or service's name.
- The instance β for a user this is usually null. some users may have privileged instances though, like
rootoradmin. π for a service, the instance is the fully qualified name of the machine on which it runs. i.e. there can be ansshservice running on the machine ABC (ssh/ABC@REALM), which is different from thesshservice running on the machine XYZ (ssh/XYZ@REALM). - The realm β corresponds to the Kerberos service providing authentication for the principal. realms are conventionally all-uppercase, and often match the end of hostnames in the realm (for instance,
host01.example.commight be in realmEXAMPLE.COM). π
π¦ how you actually write one π¦
when writing a Kerberos name, the principal name is separated from the instance (if not null) by a slash, and the realm (if not the local realm) follows, preceded by an @ sign. here are examples of valid Kerberos names, and yes they ate:
david
jennifer/admin
joeuser@BLEEP.COM
cbrown/root@FUBAR.ORG
π« tickets: the main character energy π«
when you authenticate yourself with Kerberos you get an initial Kerberos ticket. (a Kerberos ticket is an encrypted protocol message that provides authentication. that's the definition, don't @ me.) Kerberos uses this ticket for network utilities such as ssh. the ticket transactions are done transparently, so you don't have to worry about their management. it's just doing its thing in the background, slaying quietly. β¨
β οΈ but β note, however, that tickets expire. this is the part where you pay attention. π«£
administrators may configure more privileged tickets β like those with service or instance of root or admin β to expire in a few minutes, while tickets that carry more ordinary privileges may be good for several hours or a day. if your login session extends beyond the time limit, you will have to re-authenticate yourself to Kerberos to get new tickets using the kinit command. annoying? lowkey yes. necessary? also yes. π
some tickets are renewable beyond their initial lifetime. this means that kinit -R can extend their lifetime without requiring you to re-authenticate. obsessed. π«Ά
if you wish to delete your local tickets, use the kdestroy command. bye felicia π
π forwarding tickets π
Kerberos tickets can be forwarded. in order to forward tickets, you must request forwardable tickets when you kinit. once you have forwardable tickets, most Kerberos programs have a command line option to forward them to the remote host. this can be useful for, e.g., running kinit on your local machine and then sshing into another to do work. very "i brought my credentials to the function." π
π¨ however: this should not be done on untrusted machines since they will then have your tickets. literally do not hand your tickets to a sketchy host. that's it, that's the warning. π
π§ ENVIRONMENT VARIABLES π§
several environment variables affect the operation of Kerberos-enabled programs. these include:
KRB5CCNAMEβ default name for the credentials cache file, in the formTYPE:residual. the type of the default cache may determine the availability of a cache collection.FILEis not a collection type;KEYRING,DIR, andKCMare. π if not set, the value ofdefault_ccache_namefrom configuration files (seeKRB5_CONFIG) will be used. if that is also not set, the default type isFILE, and the residual is the path/tmp/krb5cc_*uid*, where uid is the decimal user ID of the user.KRB5_KTNAMEβ specifies the location of the default keytab file, in the formTYPE:residual. if no type is present, theFILEtype is assumed and residual is the pathname of the keytab file. if unset,FILE:/etc/krb5.keytabwill be used.KRB5_CONFIGβ specifies the location of the Kerberos configuration file. the default is/usr/etc/krb5.conf. multiple filenames can be specified, separated by a colon; all files which are present will be read. multi-file slay. πKRB5_KDC_PROFILEβ specifies the location of the KDC configuration file, which contains additional configuration directives for the Key Distribution Center daemon and associated programs. the default is/var/lib/krb5kdc/kdc.conf.KRB5RCACHENAMEβ (New in release 1.18) β¨ specifies the location of the default replay cache, in the formtype:residual.- the
file2type with a pathname residual specifies a replay cache file in the version-2 format in the specified location. - the
nonetype (residual is ignored) disables the replay cache. - the
dfltype (residual is ignored) indicates the default, which uses afile2replay cache in a temporary directory. the default isdfl:.
- the
KRB5RCACHETYPEβ specifies the type of the default replay cache, ifKRB5RCACHENAMEis unspecified. no residual can be specified, sononeanddflare the only useful types.KRB5RCACHEDIRβ specifies the directory used by thedflreplay cache type. the default is the value of theTMPDIRenvironment variable, or/var/tmpifTMPDIRis not set.KRB5_TRACEβ specifies a filename to write trace log output to. trace logs can help illuminate decisions made internally by the Kerberos libraries. for example,env KRB5_TRACE=/dev/stderr kinitwould send tracing information forkinitto/dev/stderr. the default is not to write trace log output anywhere. (ngl, turning this on is the move when you're debugging and losing your mind π)KRB5_CLIENT_KTNAMEβ default client keytab file name. if unset,FILE:/var/lib/krb5/user/%{euid}/client.keytabwill be used).KPROP_PORTβkpropport to use. defaults to754.GSS_MECH_CONFIGβ specifies a filename containing GSSAPI mechanism module configuration. the default is to read/usr/etc/gss/mechand files with a.confsuffix within the directory/usr/etc/gss/mech.d.
π important: most environment variables are disabled for certain programs, such as login system programs and setuid programs, which are designed to be secure when run within an untrusted process environment. so no, you can't just vibe your way past those. π«£
π SEE ALSO π
go read these next, they're the whole friend group:
kdestroy, kinit, klist, kswitch, kpasswd, ksu, krb5.conf, kdc.conf, kadmin, kadmind, kdb5_util, krb5kdc
π BUGS π
the original page lists this section andβ¦ leaves it empty. no bugs to report, bestie. it's giving "nothing to see here" and honestly? we love a clean slate. β¨
π AUTHORS π
icons, all of them:
- Steve Miller, MIT Project Athena/Digital Equipment Corporation
- Clifford Neuman, MIT Project Athena
- Greg Hudson, MIT Kerberos Consortium
- Robbie Harwood, Red Hat, Inc.
π HISTORY π
the MIT Kerberos 5 implementation was developed at MIT, with contributions from many outside parties. it is currently maintained by the MIT Kerberos Consortium. that's a long-running main character arc fr fr. π«Ά
π RESTRICTIONS π
copyright 1985, 1986, 1989-1996, 2002, 2011, 2018 Masachusetts Institute of Technology
β AUTHOR β
MIT
π COPYRIGHT π
1985-2026, MIT
and that's the page!! π¦ you read the whole thing, i'm so proud. this was KERBEROS(7) from the MIT Kerberos manual, version 1.22.2 β mwah, go kinit something ππ
π¦ where this page comes from
- alpine 3.24: krb5-doc 1.22.2-r1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms