• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

“Preauthentication Failed While Getting Initial Credentials” – Kerberos Error

by admin

The Problem

Not able to log into Kerberos using the keytab file. When trying to use the keytab file to log in, the following error is seen:

Command:

kinit -k -V -t [name].keytab HTTP/[PrincipalName]

Error:

kinit: preauthentication failed while getting initial credentials

The Solution

The error, “Preauthentication failed while getting initial credentials” happens when the password is incorrect.

Update the keytab file on the problematic Kerberos client with the key provided from the Kerberos server. Follow the below steps:

1. Use ktpass on the Windows command line to create a key file using the command:

ktpass -princ [PrincipalName] -mapuser [UserAccount] -pass [password] -out [filename].ktf

2. Copy the [filename].ktf key file to the Kerberos client.

3. Move /etc/krb5.keytab to a backup file, for example:

# mv /etc/krb5.keytab /etc/krb5.keytab.old

4. Use ktutil to create a new keytab file from the key file. For example:

# /[path]/krb5/bin/ktutil

5. Issue “klist -e -k” to list the contents of the default keytab file with encryption types.

# klist -e -k

6. Try the kinit command again and it should succeed this time.

# kinit -k [PrincipalName]

Filed Under: CentOS/RHEL

Some more articles you might also be interested in …

  1. How to Mask or Unmask a Service in CentOS/RHEL 7 and 8
  2. How to Debug systemd boot process in CentOS/RHEL 7 and 8
  3. “BAD PASSWD : is too simple” – error during password change in CentOS/RHEL 7 and 8
  4. How To Configure NIS (Network Information System) Master and Slave Servers in CentOS/RHEL
  5. “map in use” error while removing multipath device in CentOS/RHEL
  6. sestatus Command Examples in Linux
  7. Detect and Scan New Luns in CentOS/RHEL
  8. CentOS/RHEL7 – Tuned Profiles Oracle
  9. lvsd Command Examples in Linux
  10. How to move /tmp on a separate disk as a separate mount point (Online)

You May Also Like

Primary Sidebar

Recent Posts

  • protonvpn-cli Command Examples in Linux
  • protonvpn-cli connect Command Examples
  • procs Command Examples in Linux
  • prlimit: command not found

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright