<?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: How to configure hive so beeline does not ask for password? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236522#M85119</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/97916/arindam.html" nodeid="97916"&gt;@Arindam Choudhury&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;You can use the below link which talks about creating a file called beeline-hs2-connection.xml and providing the credentials information there.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Usinghive-site.xmltoautomaticallyconnecttoHiveServer2"&gt;https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Usinghive-site.xmltoautomaticallyconnecttoHiveServer2&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Nov 2018 06:21:21 GMT</pubDate>
    <dc:creator>quadoss</dc:creator>
    <dc:date>2018-11-22T06:21:21Z</dc:date>
    <item>
      <title>How to configure hive so beeline does not ask for password?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236520#M85117</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Now when I try to connect to hive, it asks me for username and password:&lt;/P&gt;&lt;PRE&gt;$ beeline 
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/3.0.1.0-187/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.0.1.0-187/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See &lt;A href="http://www.slf4j.org/codes.html#multiple_bindings" target="_blank"&gt;http://www.slf4j.org/codes.html#multiple_bindings&lt;/A&gt; for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://follower-2.europe-west3-b.c.XXXXXX.internal:2181,follower-1.europe-west3-b.c.XXXXXX.internal:2181,follower-3.europe-west3-b.c.XXXXXX.internal:2181/default;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Enter username for jdbc:hive2://follower-2.europe-west3-b.c.XXXXXX.internal:2181,follower-1.europe-west3-b.c.XXXXXX.internal:2181,follower-3.europe-west3-b.c.XXXXXX.internal:2181/default: username
Enter password for jdbc:hive2://follower-2.europe-west3-b.c.XXXXXX.internal:2181,follower-1.europe-west3-b.c.XXXXXX.internal:2181,follower-3.europe-west3-b.c.XXXXXX.internal:2181/default: ****************
18/11/21 16:30:23 [main]: INFO jdbc.HiveConnection: Connected to leader-1.europe-west3-b.c.XXXXXX.internal:10000
Connected to: Apache Hive (version 3.1.0.3.0.1.0-187)
Driver: Hive JDBC (version 3.1.0.3.0.1.0-187)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Beeline version 3.1.0.3.0.1.0-187 by Apache Hive
0: jdbc:hive2://follower-2.europe-west3-b.c.i&amp;gt;&lt;/PRE&gt;&lt;P&gt;How can I configure it so it does not ask for username/password?&lt;/P&gt;&lt;P&gt;I have several users connecting to it. Can I have different username/password for each user if disabling it is not possible?&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Arindam&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 01:34:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236520#M85117</guid>
      <dc:creator>arindam1</dc:creator>
      <dc:date>2018-11-22T01:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure hive so beeline does not ask for password?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236521#M85118</link>
      <description>&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/227743/how-to-configure-hive-so-beeline-does-not-ask-for.html#"&gt;@Arindam Choudhury&lt;/A&gt; I think the only way to do it is to set the Hiveserver2 to 'No authentication' mode.&lt;/P&gt;&lt;P&gt;If you really want anyone to connect anonymously that is what you could do.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 06:16:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236521#M85118</guid>
      <dc:creator>jknulst</dc:creator>
      <dc:date>2018-11-22T06:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure hive so beeline does not ask for password?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236522#M85119</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/97916/arindam.html" nodeid="97916"&gt;@Arindam Choudhury&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;You can use the below link which talks about creating a file called beeline-hs2-connection.xml and providing the credentials information there.&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Usinghive-site.xmltoautomaticallyconnecttoHiveServer2"&gt;https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Usinghive-site.xmltoautomaticallyconnecttoHiveServer2&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 06:21:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236522#M85119</guid>
      <dc:creator>quadoss</dc:creator>
      <dc:date>2018-11-22T06:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure hive so beeline does not ask for password?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236523#M85120</link>
      <description>&lt;P&gt;@&lt;A href="https://community.hortonworks.com/users/97916/arindam.html"&gt;Arindam Choudhury&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can use the -n &amp;amp; -p options to specify the username and password. For instance:&lt;/P&gt;&lt;PRE&gt;beeline -u jdbc:hive2://follower-2.europe-west3-b.c.XXXXXX.internal:10000/default -n username -p password&lt;/PRE&gt;&lt;P&gt;Also instead of passing password it in plaintext as option '-p', we read a password from a permission-protected password file instead, For instance:&lt;/P&gt;&lt;PRE&gt;beeline -u jdbc:hive2://follower-2.europe-west3-b.c.XXXXXX.internal:10000/default -n username -w password_file&lt;/PRE&gt;&lt;P&gt;In short answer for your questions, when the beeline-hs2-connection.xml is present and when no other arguments are provided, Beeline automatically connects to the URL generated using configuration files. When connection arguments (-u, -n or -p) are provided, Beeline uses them and does not use beeline-hs2-connection.xml to automatically connect. &lt;BR /&gt;&lt;BR /&gt;For more details you can refer below links.&lt;/P&gt;&lt;P&gt;&lt;A href="https://issues.apache.org/jira/browse/HIVE-14063"&gt;https://issues.apache.org/jira/browse/HIVE-14063&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients"&gt;https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Please accept the answer you found most useful&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 10:38:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236523#M85120</guid>
      <dc:creator>jagadeesan</dc:creator>
      <dc:date>2018-11-22T10:38:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure hive so beeline does not ask for password?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236524#M85121</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/716/mbalakrishnan.html" nodeid="716"&gt;@Mahesh Balakrishnan&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;How can I add beeline-hs2-connection.xml? I can not find it in ambari server page.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 18:21:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236524#M85121</guid>
      <dc:creator>arindam1</dc:creator>
      <dc:date>2018-11-22T18:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to configure hive so beeline does not ask for password?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236525#M85122</link>
      <description>&lt;P&gt;I created /etc/hive/conf/beeline-hs2-connection.xml and it worked.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 22 Nov 2018 19:07:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-to-configure-hive-so-beeline-does-not-ask-for-password/m-p/236525#M85122</guid>
      <dc:creator>arindam1</dc:creator>
      <dc:date>2018-11-22T19:07:40Z</dc:date>
    </item>
  </channel>
</rss>

