KGETCRED(1)
π KGETCRED β the kgetcred(1) manual, but make it make sense π
okay bestie, welcome to kgetcred, a general commands manual moment. this is the little tool that goes and gets you a ticket for one very specific service. not a vibe, not a maybe, a whole actual ticket. let's get into it π
β¨ NAME β¨
kgetcred β get a ticket for a particular service π«
β¨ SYNOPSIS β¨
kgetcred [--canonicalize] [--canonical] [-c -cache | --cache=cache] [-e
enctype | --enctype=enctype] [--debug] [-H | --hostbased]
[--name-type=name-type] [--no-transit-check] [--no-store]
[--cached-only] [-n | --anonymous] [--version] [--help]
principal
kgetcred [options] --hostbased principal
kgetcred [options] --hostbased service hostname [extra-components]
three whole ways to call her, pick your fighter π
β¨ DESCRIPTION β¨
so kgetcred obtains a ticket for the given service principal. normally? tickets for services just happen automatically when something needs one, like magic, no thoughts. but sometimes β for some odd reason β you specifically want one particular ticket, or one of a special type. and that's the moment kgetcred walks in π
if --hostbased is given, then the service principal name you handed over will be canonicalized (more on that below, stay with me).
the third form builds a host-based principal out of the given service name and hostname. and listen: if the service name in that third usage is the empty string, the service name "host" gets used instead. okay? iconic.
for host-based names, the local host's hostname is used if the given hostname is the empty string, or if the principal only has a single component.
any additional components get included too β yes, even for host-based service principal names β but heads up, there are no defaults and no local canonicalization rules for additional components. they're on their own fr fr.
local name canonicalization rules are applied unless --canonical is given. and currently? those local name canonicalization rules are only supported for the hostname component of host-based principal names. that's it. that's the whole support list π«Ά
the principal's realm name may get canonicalized by following Kerberos referrals from the client principal's home realm β this happens if the --canonicalize option is given, or if the local name canonicalization rules are configured to use referrals.
supported options, in order, no skipping, we don't do that here:
--canonicalizeβ requests that the KDC canonicalize the principal. currently this only canonicalizes the realm by chasing referrals from the user's start realm, but in the future it may also let the KDC canonicalize the complete principal name. so, like, watch this space.--canonicalβ turns off local canonicalization of the principal name. bye girl π--name-type=name-typeβ thename-typeto use when parsing the principal name.--hostbasedβ is short for--name-type=srv_hst. that's the whole thing, it's an abbreviation, slay.- *
-c*cache,--cache=cache β the credential cache to use. - *
--delegation-credential-cache=cache* β the credential cache to use for delegation. - *
-e*enctype,--enctype=enctype β encryption type to use. --no-transit-checkβ requests that the KDC doesn't do transit checking.--no-storeβ do not store tickets in the ccache.--cached-onlyβ do not talk the TGS, search only the ccache. no chatting, just looking π--anonymousβ obtain an anonymous service ticket.--forwardableβ (no notes in the original, she's mysterious π)--debugβ enables debug output tostderr.--versionβ (also no description given, iykyk)--helpβ (same, no description, but you know what to do bestie)
okay now the canonicalization lore, because it's lowkey the whole point:
if the --canonical option is used, then no further canonicalization should be done locally by the client (for example, DNS). but if --canonicalize is used instead, then the client will ask the KDC to canonicalize the name. different vibes, different jobs β¨
if the --canonicalize option is used together with --hostbased a host-based name-type, and --canonical is not used, then the hostname will be canonicalized according to the name canonicalization rules in krb5.conf.
and here's a cute one: GSS-API initiator applications with host-based services will get the same behavior as using the --canonicalize --hostbased options here. so they're basically doing this exact move, just without telling you π¦
β¨ SEE ALSO β¨
kinit(1), klist(1), krb5.conf(5), krb5_openlog(3)
go read those too, they're all besties π«Ά
and that's the whole page, no crumbs left. this one came out of the HEIMDAL crew, dated March 12, 2004 β yes she's vintage, and yes she still ate π πβ¨
π¦ where this page comes from
- alpine 3.22: heimdal-doc 7.8.0-r4 Β· BSD-3-Clause
- alpine 3.23: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- alpine 3.24: heimdal-doc 7.8.0-r5 Β· BSD-3-Clause
- debian bookworm: heimdal-clients 7.8.git20221117.28daf24+dfsg-2 Β· BSD-3-Clause
- debian trixie: heimdal-clients 7.8.git20221117.28daf24+dfsg-9+deb13u1 Β· BSD-3-Clause
- epel 10: heimdal-workstation 7.8.0-26.el10_2 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- epel 9: heimdal-workstation 7.8.0-5.el9 Β· BSD and MIT
- fedora 43: heimdal-workstation 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-workstation 7.8.0-26.fc43 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- fedora 44: heimdal-workstation 7.8.0-28.fc44 Β· BSD-2-Clause AND BSD-3-Clause AND HPND-export-US AND HPND-export2-US AND LicenseRef-Fedora-Public-Domain
- ubuntu jammy: heimdal-clients 7.7.0+dfsg-3ubuntu1 Β· BSD-3-Clause
- ubuntu noble: heimdal-clients 7.8.git20221117.28daf24+dfsg-5ubuntu3 Β· BSD-3-Clause
- ubuntu questing: heimdal-clients 7.8.git20221117.28daf24+dfsg-9ubuntu1
- ubuntu resolute: heimdal-clients 7.8.git20221117.28daf24+dfsg-11ubuntu1 Β· BSD-3-Clause
- ubuntu stonking: heimdal-clients 7.8.git20240113.1b4565a+dfsg-2ubuntu1 Β· BSD-3-Clause
- Copyright (c) 1999, 2001 - 2002 Kungliga Tekniska HΓΆgskolan
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms