Pre-authentication failed: Password read interrupted while getting initial credentials

Alper t. Turker picture Alper t. Turker · Apr 18, 2018 · Viewed 10.4k times · Source

This is something I have faced and I found the solution. since there wasn't any question about it, I will post it as a question and I will write my solution as the answer.

Environment:

  • OS: Centos Linux, MacOS (Big Sur)
  • Cluster: Cloudera Hadoop Distribution,
  • Tool: Kerberos

Problem:

I created "user.keytab" file by "ktutil" to renew the krb ticket without password as it was recommended in here https://kb.iu.edu/d/aumh

ktutil:  addent -password -p [email protected] -k 1 -e rc4-hmac
Password for [email protected]: [enter your password]
ktutil:  addent -password -p [email protected] -k 1 -e aes256-cts
Password for [email protected]: [enter your password]
ktutil:  wkt user.keytab
ktutil:  quit

then testing end up with exception

(user@server [~])$ kinit [email protected] -k -t user.keytab
kinit: Preauthentication failed while getting initial credentials

Answer

Alper t. Turker picture Alper t. Turker · Apr 18, 2018

Cause:

key encryption type "aes256-cts" might not be configured in your krb setup

Solution

simply delete keytab file and recreate one without "aes256-cts" encryption by using above steps

ktutil:  addent -password -p [email protected] -k 1 -e rc4-hmac
Password for [email protected]: [enter your password]
ktutil:  wkt user.keytab
ktutil:  quit

or

delete "aes256-cts" encription from the keytab file by following the steps on the link I added above.

and finally execute:

(user@server [~])$ kinit [email protected] -k -t user.keytab

you wont see any error this time and your ticket will be created