KINIT(1)

โœจ KINIT(1) โ€” the MIT Kerberos one ๐Ÿ’–

okay bestie, gather round, because this is the page that gets you your very first ticket in Kerberos-land and honestly? it's giving main character energy. this is kinit, from the MIT Kerberos crew. let's go ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

kinit โ€” obtain and cache Kerberos ticket-granting ticket. yes, that's the whole vibe. you ask, you receive, you cache. ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

kinit [-V] [-l lifetime] [-s start_time] [-r renewable_life] [-p | -P]
[-f | -F] [-a] [-A] [-C] [-E] [-v] [-R] [-k [-i | -t keytab_file]] [-c
cache_name] [-n] [-S service_name] [-I input_ccache] [-T armor_ccache]
[-X attribute[=value]] [--request-pac | --no-request-pac] [principal]

like. look at all those little flags. so many little levers to pull. we love her for it ๐Ÿซถ


๐ŸŒˆ DESCRIPTION ๐ŸŒˆ

kinit obtains and caches an initial ticket-granting ticket for principal. no cap, that's literally the job.

if principal is absent, kinit chooses an appropriate principal name based on existing credential cache contents or the local username of the user invoking kinit. some options modify the choice of principal name โ€” so like, the flags can change who you end up being. identity is a construct, etc etc ๐Ÿ’€


๐Ÿ‘‘ OPTIONS ๐Ÿ‘‘

one bullet per flag, no skipping, we're being thorough because that's the whole point of a manpage babes.

  • -V โ€” display verbose output. she's chatty, she's telling you everything ๐Ÿ’ฌ
  • -l lifetime โ€” (Time duration string.) Requests a ticket with the lifetime lifetime.

For example, kinit -l 5:30 or kinit -l 5h30m.

If the -l option is not specified, the default ticket lifetime (configured by each site) is used. Specifying a ticket lifetime longer than the maximum ticket lifetime (configured by each site) will not override the configured maximum ticket lifetime. so like, you can ask for a million years, the site said no, and the site wins. periodt โœ‹

  • -s start_time โ€” (Time duration string.) Requests a postdated ticket. Postdated tickets are issued with the invalid flag set, and need to be resubmitted to the KDC for validation before use.

start_time specifies the duration of the delay before the ticket can become valid. it's a ticket that's not valid yet. she's in her waiting era ๐Ÿ™ˆ

  • -r renewable_life โ€” (Time duration string.) Requests renewable tickets, with a total lifetime of renewable_life. renew her, she's earned it ๐Ÿ”ฅ
  • -f โ€” requests forwardable tickets.
  • -F โ€” requests non-forwardable tickets.
  • -p โ€” requests proxiable tickets.
  • -P โ€” requests non-proxiable tickets.
  • -a โ€” requests tickets restricted to the host's local address[es].
  • -A โ€” requests tickets not restricted by address.
  • -C โ€” requests canonicalization of the principal name, and allows the KDC to reply with a different client principal from the one requested. plot twist incoming ๐Ÿ’ซ
  • -E โ€” treats the principal name as an enterprise name.
  • -v โ€” requests that the ticket-granting ticket in the cache (with the invalid flag set) be passed to the KDC for validation. If the ticket is within its requested time range, the cache is replaced with the validated ticket. glow up arc โœจ
  • -R โ€” requests renewal of the ticket-granting ticket. Note that an expired ticket cannot be renewed, even if the ticket is still within its renewable life.

Note that renewable tickets that have expired as reported by klist may sometimes be renewed using this option, because the KDC applies a grace period to account for client-KDC clock skew. See krb5.conf clockskew setting. so sometimes the expired one still works?? clock skew said "let her in" ๐Ÿ˜ญ

  • -k [-i | -t keytab_file] โ€” requests a ticket, obtained from a key in the local host's keytab. The location of the keytab may be specified with the -t keytab_file option, or with the -i option to specify the use of the default client keytab; otherwise the default keytab will be used. By default, a host ticket for the local host is requested, but any principal may be specified. On a KDC, the special keytab location KDB: can be used to indicate that kinit should open the KDC database and look up the key directly. This permits an administrator to obtain tickets as any principal that supports authentication based on the key. admin privileges are absolutely giving god mode ๐Ÿ‘‘
  • -n โ€” Requests anonymous processing. Two types of anonymous principals are supported.

For fully anonymous Kerberos, configure pkinit on the KDC and configure pkinit_anchors in the client's krb5.conf. Then use the -n option with a principal of the form @REALM (an empty principal name followed by the at-sign and a realm name). If permitted by the KDC, an anonymous ticket will be returned.

A second form of anonymous tickets is supported; these realm-exposed tickets hide the identity of the client but not the client's realm. For this mode, use kinit -n with a normal principal name. If supported by the KDC, the principal (but not realm) will be replaced by the anonymous principal.

As of release 1.8, the MIT Kerberos KDC only supports fully anonymous operation. so the second mode is like... a vibe from the past. still documented tho ๐Ÿซก

  • -I input_ccache โ€” Specifies the name of a credentials cache that already contains a ticket. When obtaining that ticket, if information about how that ticket was obtained was also stored to the cache, that information will be used to affect how new credentials are obtained, including preselecting the same methods of authenticating to the KDC. she's taking notes from your last ticket, lowkey observant ๐Ÿ“
  • -T armor_ccache โ€” Specifies the name of a credentials cache that already contains a ticket. If supported by the KDC, this cache will be used to armor the request, preventing offline dictionary attacks and allowing the use of additional preauthentication mechanisms. Armoring also makes sure that the response from the KDC is not modified in transit. armor?? literally armor. she's protected ๐Ÿ›ก๏ธ
  • -c cache_name โ€” use cache_name as the Kerberos 5 credentials (ticket) cache location. If this option is not used, the default cache location is used.

The default cache location may vary between systems. If the KRB5CCNAME environment variable is set, its value is used to locate the default cache. If a principal name is specified and the type of the default cache supports a collection (such as the DIR type), an existing cache containing credentials for the principal is selected or a new one is created and becomes the new primary cache. Otherwise, any existing contents of the default cache are destroyed by kinit. โš ๏ธ DESTROYED. gone. bestie check your cache before you run this fr fr

  • -S service_name โ€” specify an alternate service name to use when getting initial tickets.
  • -X attribute[=value] โ€” specify a pre-authentication attribute and value to be interpreted by pre-authentication modules. The acceptable attribute and value values vary from module to module. This option may be specified multiple times to specify multiple attributes. If no value is specified, it is assumed to be "yes".

The following attributes are recognized by the PKINIT pre-authentication mechanism:

  • X509_user_identity=value โ€” specify where to find user's X509 identity information
  • X509_anchors=value โ€” specify where to find trusted X509 anchor information
  • disable_freshness[=yes] โ€” disable sending freshness tokens (for testing purposes only)
not me flagging that disable_freshness is for testing purposes only. do not be out here disabling freshness in prod, i am begging ๐Ÿ™
  • --request-pac | --no-request-pac โ€” mutually exclusive. If --request-pac is set, ask the KDC to include a PAC in authdata; if --no-request-pac is set, ask the KDC not to include a PAC; if neither are set, the KDC will follow its default, which is typically is to include a PAC if doing so is supported. pick a lane, you literally cannot have both ๐Ÿ’€

๐ŸŒŸ ENVIRONMENT ๐ŸŒŸ

See kerberos for a description of Kerberos environment variables. (yes she's sending you to another page. the lore is deep, iykyk ๐Ÿงš)


๐Ÿ“ FILES ๐Ÿ“

  • FILE:/tmp/krb5cc_%{uid} โ€” default location of Kerberos 5 credentials cache. your little ticket home ๐Ÿ 
  • FILE:/etc/krb5.keytab โ€” default location for the local host's keytab. ๐Ÿ”‘

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

klist, kdestroy, kerberos โ€” the whole friend group. klist shows you the tickets, kdestroy says bye to them, kerberos is the lore keeper ๐ŸŒˆ


๐ŸŽ€ AUTHOR ๐ŸŽ€

MIT ๐Ÿ’–


1985-2026, MIT


okay that's the whole page, you're fully caught up, go get that ticket bestie ๐Ÿ’… this was kinit(1) from MIT Kerberos, version 1.22.2, dated KINIT(1) โ€” thanks for reading, mwah ๐Ÿซถโœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from