kinit: Pre-authentication failed: Invalid argument while getting initial credentials

Solution Verified - Updated -

Issue

  • ktutil generated Keytab not able to authenticate using kinit command
# ktutil
ktutil:  addent -password -p testuser@EXAMPLE.COM -k 2 -e aes256-cts-hmac-sha1-96 -s "EXAMPLE.COMtestuser", params ""
ktutil:  wkt /tmp/testuser.keytab
ktutil:  quit
# klist -kte /tmp/testuser.keytab
Keytab name: FILE:/tmp/testuser.keytab
KVNO Timestamp           Principal
---- ------------------- ----------------------------------------------
   2 09/12/2024 11:22:06 testuser@EXAMPLE.COM (aes256-cts-hmac-sha1-96)
   2 09/12/2024 11:27:41 testuser@EXAMPLE.COM (aes256-cts-hmac-sha1-96)
   2 09/12/2024 11:38:39 testuser@EXAMPLE.COM (aes128-cts-hmac-sha1-96)
   2 09/12/2024 11:54:49 testuser@EXAMPLE.COM (aes256-cts-hmac-sha1-96)
# kinit -k -t /tmp/testuser.keytab testuser@EXAMPLE.COM -V
Using new cache: 0:37119
Using principal: testuser@EXAMPLE.COM
Using keytab: testuser.keytab
kinit: Pre-authentication failed: Invalid argument while getting initial credentials
  • However, when executing normal Kinit works well
# kinit testuser@EXAMPLE.COM -V
Using new cache: 0:86172
Using principal: testuser@EXAMPLE.COM
Password for testuser@EXAMPLE.COM:
Authenticated to Kerberos v5

Environment

Red Hat Enterprise Linux 8.10

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content