<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: spnego.keytab gets corrupted in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209428#M79222</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/81275/infaelance.html" nodeid="81275"&gt;@infa elance&lt;/A&gt;&lt;P&gt;The issue is as described by &lt;A rel="user" href="https://community.cloudera.com/users/39314/mrodriguez.html" nodeid="39314"&gt;@mrodriguez&lt;/A&gt;; however, the real solution is to use the -norandkey option to the ktadd function. This way the key for the principal you want add to the keytab file will not be updated. &lt;/P&gt;&lt;PRE&gt;kadmin.local -q "ktadd -norandkey -k /etc/security/keytabs/user_name.keytab HTTP/hdp26.xyz.com@xyz.COM"&lt;/PRE&gt;&lt;P&gt;I assume this is a better option since you may want to have the keytab entry for some user's principal in that file as well. &lt;/P&gt;&lt;P&gt;Note: the -norandkey option is only available when using kadmin.local. It is not an option for the general kadmin utility. &lt;/P&gt;&lt;P&gt;Another option is to use the ktuil utility to read in multiple keytab files and write out a new one.  See &lt;A href="https://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ktutil.html" target="_blank"&gt;https://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ktutil.html&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jun 2018 04:21:18 GMT</pubDate>
    <dc:creator>rlevas</dc:creator>
    <dc:date>2018-06-07T04:21:18Z</dc:date>
    <item>
      <title>spnego.keytab gets corrupted</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209425#M79219</link>
      <description>&lt;P&gt;We have a requirement to add two principals to a keytab file and one of them is the HTTP principal.&lt;/P&gt;&lt;P&gt;When i regenerate the keytabs through ambari and run the following command i get a valid ticket &lt;/P&gt;&lt;P&gt;kinit -kt /etc/security/keytabs/spnego.service.keytab  HTTP/hdp26.xyz.com@xyz.COM&lt;/P&gt;&lt;P&gt;Now i need to add the HTTP principal to a user keytab so i run the following commands &lt;/P&gt;&lt;P&gt;kadmin.local -q "ktadd -k /etc/security/keytabs/user_name.keytab HTTP/hdp26.xyz.com@xyz.COM"&lt;/P&gt;&lt;P&gt;After i add the principal run the kinit using spnego.service.keytab (below command) i get an error saying "kinit: Password incorrect while getting initial credentials". Could anyone help me why the spnego keytab gets corrupted if i add a principal to a different keytab?&lt;/P&gt;&lt;P&gt;"kinit -kt /etc/security/keytabs/spnego.service.keytab HTTP/hdp26.xyz.com@xyz.COM"&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:18:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209425#M79219</guid>
      <dc:creator>Abhi</dc:creator>
      <dc:date>2022-09-16T13:18:25Z</dc:date>
    </item>
    <item>
      <title>Re: spnego.keytab gets corrupted</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209426#M79220</link>
      <description>&lt;P&gt;This is because kvno has changed for that principal in kerberos database after you create a new keytab for the same principal. You can confirm the same by doing:&lt;/P&gt;&lt;P&gt;kadmin.local: get_principal &lt;A href="mailto:HTTP/hdp26.xyz.com@xyz.COM"&gt;&amp;lt;&lt;/A&gt;principal_name&amp;gt; the kvno is different than the one in spnego.service.keytab (by doing klist -kte &amp;lt;keytab&amp;gt;)&lt;/P&gt;&lt;P&gt;The thing that I suggest in this scenario is to "cp spnego.service.keytab user.name.keytab" Then you can provide permissions to that keytab accordingly.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 03:34:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209426#M79220</guid>
      <dc:creator>ManuelCalvo</dc:creator>
      <dc:date>2018-06-06T03:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: spnego.keytab gets corrupted</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209427#M79221</link>
      <description>&lt;P&gt;Thanks for the solution.Its working good so far. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 03:22:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209427#M79221</guid>
      <dc:creator>Abhi</dc:creator>
      <dc:date>2018-06-07T03:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: spnego.keytab gets corrupted</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209428#M79222</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/81275/infaelance.html" nodeid="81275"&gt;@infa elance&lt;/A&gt;&lt;P&gt;The issue is as described by &lt;A rel="user" href="https://community.cloudera.com/users/39314/mrodriguez.html" nodeid="39314"&gt;@mrodriguez&lt;/A&gt;; however, the real solution is to use the -norandkey option to the ktadd function. This way the key for the principal you want add to the keytab file will not be updated. &lt;/P&gt;&lt;PRE&gt;kadmin.local -q "ktadd -norandkey -k /etc/security/keytabs/user_name.keytab HTTP/hdp26.xyz.com@xyz.COM"&lt;/PRE&gt;&lt;P&gt;I assume this is a better option since you may want to have the keytab entry for some user's principal in that file as well. &lt;/P&gt;&lt;P&gt;Note: the -norandkey option is only available when using kadmin.local. It is not an option for the general kadmin utility. &lt;/P&gt;&lt;P&gt;Another option is to use the ktuil utility to read in multiple keytab files and write out a new one.  See &lt;A href="https://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ktutil.html" target="_blank"&gt;https://web.mit.edu/kerberos/krb5-1.12/doc/admin/admin_commands/ktutil.html&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 04:21:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209428#M79222</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2018-06-07T04:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: spnego.keytab gets corrupted</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209429#M79223</link>
      <description>&lt;P&gt;Thanks Robert!! I will try the -norandkey next time.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 22:06:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/spnego-keytab-gets-corrupted/m-p/209429#M79223</guid>
      <dc:creator>Abhi</dc:creator>
      <dc:date>2018-06-07T22:06:04Z</dc:date>
    </item>
  </channel>
</rss>

