KIMPERSONATE(8)

πŸ“¦
version 7.8.0 Β· 2 versions
  • 7.8.0 Β· alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 14.5 Β· freebsd 14.5
, in alpine 3.22, alpine 3.23, alpine 3.24, debian bookworm, debian trixie, epel 10, epel 9, fedora 43, fedora 44, nixpkgs unstable, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ KIMPERSONATE(8) πŸŽ€

okay bestie, welcome to kimpersonate, part of the System Manager's Manual β€” yes the whole vibe is "pretend to be someone else, but like, legitimately, with a key" πŸ’…


✨ NAME ✨

kimpersonate β€” impersonate a user when there exist a keyfile or KeyFile 🫢


🌸 SYNOPSIS 🌸

kimpersonate [-s string | --ccache=string] [-s string | --server=string]
             [-c string | --client=string] [-k string | --keytab=string]
             [-5 | --krb5] [-A | --add] [-R | --referral]
             [-e integer | --expire-time=integer]
             [-a string | --client-address=string]
             [-t string | --enc-type=string] [--session-enc-type=string]
             [-f string | --ticket-flags=string] [--verbose] [--version]
             [--help]

πŸ’– DESCRIPTION πŸ’–

So. The kimpersonate program creates a "fake" ticket using the service-key of the service, and stores it in the given (or default) ccache. It's giving testing tool energy β€” that's literally what it's for, it's useful for testing ✨ The service key can be read from a Kerberos 5 keytab or an AFS KeyFile. Two whole sources, no cap.

Supported options, let's go:

  • --ccache=string β€” the ccache into which to store the ticket πŸŽ€
  • -s string, --server=string β€” name of server principal
  • -c string, --client=string β€” name of client principal
  • -k string, --keytab=string β€” name of keytab file
  • -5, --krb5 β€” create a Kerberos 5 ticket ✨
  • -A, --add β€” don't re-initialize the ccache, instead add the ticket to an existing ccache. (like, append bestie, don't wipe it πŸ™ˆ)
  • -R, --referral β€” simulate a referrals-based KDC client by storing two entries, one with the empty realm for the service principal name πŸ‘‘
  • -e integer, --expire-time=integer β€” lifetime of ticket in seconds
  • -a string, --client-address=string β€” address of client
  • -t string, --enc-type=string β€” encryption type (defaults to "aes256-cts-hmac-sha1-96")
  • --session-enc-type=string β€” session encryption type (defaults to enc-type or "des-cbc-crc" for afs service tickets)
  • -f string, --ticket-flags=string β€” ticket flags for krb5 ticket
  • --verbose β€” Verbose output (it will talk. a lot. love that for us πŸ’¬)
  • --version β€” Print version
  • --help β€”

πŸ¦‹ FILES πŸ¦‹

Uses /etc/krb5.keytab, and /usr/afs/etc/KeyFile when available and the -k option is used with an appropriate prefix.


🌈 EXAMPLES 🌈

kimpersonate can be used in samba root preexec option or for debugging. And like, check this:

kimpersonate -s host/hummel.e.kth.se@E.KTH.SE -c lha@E.KTH.SE -5

will create a Kerberos 5 ticket for lha@E.KTH.SE for the host hummel.e.kth.se if there exists a keytab entry for it in /etc/krb5.keytab. πŸŽ‰

In combination with the ktutil command, this is useful for testing. For example,

ktutil -k tkt add -p host/foo.test@TEST -V2 -e aes256-cts-hmac-sha1-96
-r

kimpersonate --cache=tcc -s host/foo.test@TEST -c jdoe@TEST -k tkt
--referral
⚠️ okay literally copy those commands exactly, bestie β€” --cache=tcc is what's written down, don't go "fixing" it on me πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

kinit(1), klist(1)


πŸ‘‘ AUTHORS πŸ‘‘

Love Hornquist Astrand <lha@kth.se>


and that's the whole page, periodt πŸ’œ this icon of a manual page came from <strong>Debian</strong>, dated <strong>September 18, 2006</strong> β€” ancient, yes, but she ate and left no crumbs. mwah 🫢✨

πŸ“¦ where this page comes from