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 user@DOMAIN.LOCAL -k 1 -e rc4-hmac
Password for user@DOMAIN.LOCAL: [enter your password]
ktutil: addent -password -p user@DOMAIN.LOCAL -k 1 -e aes256-cts
Password for user@DOMAIN.LOCAL: [enter your password]
ktutil: wkt user.keytab
ktutil: quit
then testing end up with exception
(user@server [~])$ kinit user@DOMAIN.LOCAL -k -t user.keytab
kinit: Preauthentication failed while getting initial credentials