<?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 How to test kerberos authentication? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-test-kerberos-authentication/m-p/178213#M70442</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've installed kerberos on my cluster and it works correctly.&lt;/P&gt;&lt;P&gt; My question is how to check the utility of Kerberos in my cluster and how to test the authentication which is the principal goal of kerberos?&lt;/P&gt;&lt;P&gt;I'll be grateful if you help me to understand this issue.&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2017 18:47:38 GMT</pubDate>
    <dc:creator>kabadou_rawia</dc:creator>
    <dc:date>2017-10-30T18:47:38Z</dc:date>
    <item>
      <title>How to test kerberos authentication?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-test-kerberos-authentication/m-p/178213#M70442</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've installed kerberos on my cluster and it works correctly.&lt;/P&gt;&lt;P&gt; My question is how to check the utility of Kerberos in my cluster and how to test the authentication which is the principal goal of kerberos?&lt;/P&gt;&lt;P&gt;I'll be grateful if you help me to understand this issue.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 18:47:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-test-kerberos-authentication/m-p/178213#M70442</guid>
      <dc:creator>kabadou_rawia</dc:creator>
      <dc:date>2017-10-30T18:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to test kerberos authentication?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-test-kerberos-authentication/m-p/178214#M70443</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/39293/kabadourawia.html" nodeid="39293"&gt;@raouia &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please try to perform any HDFS operation like listing a directory without having a kerberos ticket and it should fail with the following kind of message:&lt;/P&gt;&lt;PRE&gt;# su - hdfs
# kdestroy
# klist
klist: No credentials cache found (filename: /tmp/krb5cc_1011)&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Above we see that there are no valid kerberos tickets. So lets try to perform some HDFS operation like following:&lt;/P&gt;&lt;PRE&gt;17/10/30 11:57:28 WARN ipc.Client: Exception encountered while connecting to the server : javax.security.sasl.SaslException: GSS initiate failed [Caused by GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)]&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;Now try to get the kerberos ticket and then perform the same operation again:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;1. Get the Principal Name from the keytab:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# klist -kte /etc/security/keytabs/hdfs.headless.keytab 
Keytab name: FILE:/etc/security/keytabs/hdfs.headless.keytab
KVNO Timestamp  Principal
---- ------------------- ------------------------------------------------------
  11 09/22/2017 08:59:28 hdfs-kerberos_ambari@EXAMPLE.COM (aes128-cts-hmac-sha1-96) 
  11 09/22/2017 08:59:28 hdfs-kerberos_ambari@EXAMPLE.COM (aes256-cts-hmac-sha1-96) 
  11 09/22/2017 08:59:28 hdfs-kerberos_ambari@EXAMPLE.COM (arcfour-hmac) 
  11 09/22/2017 08:59:28 hdfs-kerberos_ambari@EXAMPLE.COM (des-cbc-md5) 
  11 09/22/2017 08:59:28 hdfs-kerberos_ambari@EXAMPLE.COM (des3-cbc-sha1) &lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;2. Now get a valid kerberos ticket as following using "kinit"&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# kinit -kt /etc/security/keytabs/hdfs.headless.keytab hdfs-kerberos_ambari@EXAMPLE.COM&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;3. Check if you got a valid ticket or not?&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# klist
Ticket cache: FILE:/tmp/krb5cc_1011
Default principal: hdfs-kerberos_ambari@EXAMPLE.COM
Valid starting  Expires  Service principal
10/30/2017 12:00:12  10/31/2017 12:00:12  krbtgt/EXAMPLE.COM@EXAMPLE.COM&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;4. Now you should be able to perform the HDFS operations:&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;# hdfs dfs -ls /tmp
Found 11 items
drwx------  - ambari-qa hdfs  0 2017-06-09 12:15 /tmp/ambari-qa
drwxr-xr-x  - hdfs  hdfs  0 2017-06-09 11:36 /tmp/entity-file-history
drwx-wx-wx  - ambari-qa hdfs  0 2017-06-27 05:13 /tmp/hive
-rwxr-xr-x  3 hdfs  hdfs  2075 2017-07-25 12:53 /tmp/id1aac366a_date532517&lt;/PRE&gt;&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 19:02:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-test-kerberos-authentication/m-p/178214#M70443</guid>
      <dc:creator>jsensharma</dc:creator>
      <dc:date>2017-10-30T19:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to test kerberos authentication?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-test-kerberos-authentication/m-p/178215#M70444</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/3418/jsensharma.html" nodeid="3418"&gt;@Jay Kumar SenSharma&lt;/A&gt;&lt;P&gt;    I've a question which is quite opposite to this. I removed kerberos completely from ambari but when I tried to restart the services throws error some. Checked logs and found that it's failing due to performing 'kinit". My question is since I removed kerberos it's not supposed to generate ticket automatically. There's some configuration which is triggering this. Can you help on this issue.&lt;/P&gt;&lt;P&gt;Below is error when I tried to restart services.&lt;/P&gt;&lt;PRE&gt; File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 102, in checked_call
    tries=tries, try_sleep=try_sleep, timeout_kill_strategy=timeout_kill_strategy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 150, in _call_wrapper
    result = _call(command, **kwargs_copy)
  File "/usr/lib/ambari-agent/lib/resource_management/core/shell.py", line 303, in _call
    raise ExecutionFailed(err_msg, code, out, err) 

resource_management.core.exceptions.ExecutionFailed: Execution of 'kinit -kt /etc/security/keytabs/smokeuser.headless.keytab ambari-qa-hwx_tvx@FHILLS.LOCAL;' returned 127. bash: kinit: command not found&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Jun 2018 20:59:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-test-kerberos-authentication/m-p/178215#M70444</guid>
      <dc:creator>shashankkumar_m</dc:creator>
      <dc:date>2018-06-21T20:59:26Z</dc:date>
    </item>
  </channel>
</rss>

