title: Pre-authentication failed: Password read interrupted while getting initial credentials
body: <p>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.</p>
  <p><strong>Environment</strong>:</p>
  <ul>
  <li>OS: Centos Linux, MacOS (Big Sur)</li>
  <li>Cluster: Cloudera Hadoop Distribution,</li>
  <li>Tool: Kerberos</li>
  </ul>
  <p><strong>Problem</strong>:</p>
  <p>I created &quot;user.keytab&quot; file by &quot;ktutil&quot; to renew the krb ticket without password as it was recommended in here <a href="https://kb.iu.edu/d/aumh" rel="nofollow noreferrer">https://kb.iu.edu/d/aumh</a></p>
  <pre><code>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
  </code></pre>
  <p>then testing end up with exception</p>
  <pre><code>(user@server [~])$ kinit user@DOMAIN.LOCAL -k -t user.keytab
  kinit: Preauthentication failed while getting initial credentials
  </code></pre>