<?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: Obtaining Kerberos ticket for hdfs user throws an error in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131584#M43515</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11856/sarahmaadawy.html" nodeid="11856"&gt;@Sarah Maadawy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I agree with &lt;A rel="user" href="https://community.cloudera.com/users/504/kkulkarni.html" nodeid="504"&gt;@Kuldeep Kulkarni&lt;/A&gt; regarding the principal name used for the HDFS Kerberos identity. However on top of that, you should &lt;STRONG&gt;su&lt;/STRONG&gt; to the &lt;STRONG&gt;hdfs&lt;/STRONG&gt; user to do this.  The existence of the HDFS keytab file is not meant to be used by any other user.  &lt;/P&gt;&lt;P&gt;Why is the owner of /etc/security/keytabs/hdfs.headless.keytab root?  Does Ambari manage the Kerberos identities of your cluster or were the keytab files created and distributed manually?  In any case the ACL on that file should be like&lt;/P&gt;&lt;PRE&gt;-r--r----- 1 hdfs hadoop 303 Oct 12 15:16 /etc/security/keytabs/hdfs.headless.keytab&lt;/PRE&gt;&lt;P&gt;Or ideally&lt;/P&gt;&lt;PRE&gt;-r-------- 1 hdfs hadoop 303 Oct 12 15:16 /etc/security/keytabs/hdfs.headless.keytab&lt;/PRE&gt;&lt;P&gt;However I think some Hadoop services may need access to this keytab file for now. &lt;/P&gt;</description>
    <pubDate>Fri, 14 Oct 2016 17:32:03 GMT</pubDate>
    <dc:creator>rlevas</dc:creator>
    <dc:date>2016-10-14T17:32:03Z</dc:date>
    <item>
      <title>Obtaining Kerberos ticket for hdfs user throws an error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131582#M43513</link>
      <description>&lt;P&gt;
	I need to create hdfs-auto-snapshot using the hdfs user. My environment is kerberos-authenticated, so, to do that I called the following command to obtain a kerberos ticket for the hdfs user:&lt;/P&gt;
&lt;PRE&gt;kinit -V -kt /etc/security/keytabs/hdfs.headless.keytab hdfs
&lt;/PRE&gt;&lt;P&gt;
	That command threw the following error:&lt;/P&gt;
&lt;PRE&gt;Using default cache: /run/user/krb5cc/krb5cc_MyUserID
Using principal: hdfs@MyRealm
Using keytab: /etc/security/keytabs/hdfs.headless.keytab
kinit: Password has expired while getting initial credentials
&lt;/PRE&gt;&lt;P&gt;
	When I try to use sudo in the command to be&lt;/P&gt;
&lt;PRE&gt;sudo kinit -V -kt /etc/security/keytabs/hdfs.headless.keytab hdfs
&lt;/PRE&gt;&lt;P&gt;
	I get the following error&lt;/P&gt;
&lt;PRE&gt;Using default cache: /run/user/krb5cc/krb5cc_0
Using principal: hdfs@MyRealm
Using keytab: /etc/security/keytabs/hdfs.headless.keytab
kinit: Keytab contains no suitable keys for hdfs@MyRealm while getting initial credentials
&lt;/PRE&gt;&lt;P&gt;
	The reason I though I may need to use sudo is because the keytab file has permission "-r--r-----" and root is the owner.&lt;/P&gt;&lt;P&gt;
	Any idea how can I obtain a tgt for hdfs user so that I can use it later?&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 09:54:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131582#M43513</guid>
      <dc:creator>sarah_maadawy</dc:creator>
      <dc:date>2016-10-14T09:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining Kerberos ticket for hdfs user throws an error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131583#M43514</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/11856/sarahmaadawy.html" nodeid="11856"&gt;@Sarah Maadawy&lt;/A&gt;&lt;P&gt;I think you are passing incorrect principal name while doing kinit.&lt;/P&gt;&lt;P&gt;Can you please do:&lt;/P&gt;&lt;PRE&gt;klist -ket /etc/security/keytabs/hdfs.headless.keytab&lt;/PRE&gt;&lt;P&gt;Sample output:&lt;/P&gt;&lt;PRE&gt;[root@ambarangerdap1 ~]# klist -ket /etc/security/keytabs/hdfs.headless.keytab
Keytab name: FILE:/etc/security/keytabs/hdfs.headless.keytab
KVNO Timestamp         Principal
---- ----------------- --------------------------------------------------------
   1 09/25/16 07:17:02 hdfs-ambari-sme@SUPPORT.COM (arcfour-hmac)
   1 09/25/16 07:17:02 hdfs-ambari-sme@SUPPORT.COM (des-cbc-md5)
   1 09/25/16 07:17:02 hdfs-ambari-sme@SUPPORT.COM (des3-cbc-sha1)
   1 09/25/16 07:17:02 hdfs-ambari-sme@SUPPORT.COM (aes128-cts-hmac-sha1-96)
   1 09/25/16 07:17:02 hdfs-ambari-sme@SUPPORT.COM (aes256-cts-hmac-sha1-96)&lt;/PRE&gt;&lt;P&gt;Now from above output I can see that my hdfs principal is hdfs-ambari-sme@SUPPORT.COM&lt;/P&gt;&lt;P&gt;I would use below command&lt;/P&gt;&lt;PRE&gt;kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs-ambari-sme&lt;/PRE&gt;&lt;P&gt;Please try this and let me know if this helps! HCC is always there to help you.&lt;/P&gt;&lt;P&gt;Happy Hadooping! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 17:16:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131583#M43514</guid>
      <dc:creator>KuldeepK</dc:creator>
      <dc:date>2016-10-14T17:16:05Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining Kerberos ticket for hdfs user throws an error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131584#M43515</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/11856/sarahmaadawy.html" nodeid="11856"&gt;@Sarah Maadawy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I agree with &lt;A rel="user" href="https://community.cloudera.com/users/504/kkulkarni.html" nodeid="504"&gt;@Kuldeep Kulkarni&lt;/A&gt; regarding the principal name used for the HDFS Kerberos identity. However on top of that, you should &lt;STRONG&gt;su&lt;/STRONG&gt; to the &lt;STRONG&gt;hdfs&lt;/STRONG&gt; user to do this.  The existence of the HDFS keytab file is not meant to be used by any other user.  &lt;/P&gt;&lt;P&gt;Why is the owner of /etc/security/keytabs/hdfs.headless.keytab root?  Does Ambari manage the Kerberos identities of your cluster or were the keytab files created and distributed manually?  In any case the ACL on that file should be like&lt;/P&gt;&lt;PRE&gt;-r--r----- 1 hdfs hadoop 303 Oct 12 15:16 /etc/security/keytabs/hdfs.headless.keytab&lt;/PRE&gt;&lt;P&gt;Or ideally&lt;/P&gt;&lt;PRE&gt;-r-------- 1 hdfs hadoop 303 Oct 12 15:16 /etc/security/keytabs/hdfs.headless.keytab&lt;/PRE&gt;&lt;P&gt;However I think some Hadoop services may need access to this keytab file for now. &lt;/P&gt;</description>
      <pubDate>Fri, 14 Oct 2016 17:32:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131584#M43515</guid>
      <dc:creator>rlevas</dc:creator>
      <dc:date>2016-10-14T17:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining Kerberos ticket for hdfs user throws an error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131585#M43516</link>
      <description>&lt;P&gt;You were right! I assumed by default that the user is hdfs while it had a different name in the keytab file. Thanks kuldeep!&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 06:21:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131585#M43516</guid>
      <dc:creator>sarah_maadawy</dc:creator>
      <dc:date>2016-10-17T06:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Obtaining Kerberos ticket for hdfs user throws an error</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131586#M43517</link>
      <description>&lt;P&gt;I think this file is generated by ambari. Probably that is why the owner is root.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2016 06:23:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Obtaining-Kerberos-ticket-for-hdfs-user-throws-an-error/m-p/131586#M43517</guid>
      <dc:creator>sarah_maadawy</dc:creator>
      <dc:date>2016-10-17T06:23:01Z</dc:date>
    </item>
  </channel>
</rss>

