infra-docs-fpo/modules/howtos/pages/create_keytab.adoc
Michal Konecny 1d458e6d8a Migrate howto repository to infra docs
It doesn't make much sense to have separate guides outside infra documentation.
So let's migrate https://pagure.io/fedora-infra/howtos to infra docs.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2023-09-18 17:06:59 +02:00

40 lines
819 B
Text

= How to create a keytab for an user
First obtain Kerberos ticket with kinit:
----
$ kinit myusername@FEDORAPROJECT.ORG
Password for myusername@FEDORAPROJECT.ORG:
----
Then obtain kvno value:
----
$ kvno myusername@FEDORAPROJECT.ORG
myusername@FEDORAPROJECT.ORG: kvno = 42
----
Ticket is no longer needed and can be destroyed:
----
$ kdestroy -p myusername@FEDORAPROJECT.ORG
----
Generate keytab and write it to disk:
----
$ ktutil
ktutil: addent -password -p myusername@FEDORAPROJECT.ORG -k 42 -f
Password for myusername@FEDORAPROJECT.ORG:
ktutil: wkt /tmp/kt/fedora
ktutil: q
----
Done. You can now use the keytab to obtain the ticket without typing password:
----
$ kinit -kt /tmp/kt/fedora myusername@FEDORAPROJECT.ORG
----
(source: https://pagure.io/fedora-infrastructure/issue/9544#comment-706949)