<?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: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213289#M4570764</link>
    <description>&lt;P&gt;Hi Aditya, &lt;/P&gt;&lt;P&gt;This is interesting one !&lt;/P&gt;&lt;P&gt;hdbsql, hdbcli and hdbuserstore - these all come from same hana client.&lt;/P&gt;&lt;P&gt;However, from &lt;A href="https://answers.sap.com/questions/518509/using-credentials-from-hdbuserstore-results-in-err.html" target="_blank"&gt;here &lt;/A&gt;and your issue, I see these cases : &lt;/P&gt;&lt;P&gt;Case 1- hdbsql &lt;STRONG&gt;accepts&lt;/STRONG&gt; the special character (such as $ ) when executed &lt;STRONG&gt;directly. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Case 2- hdbsql &lt;STRONG&gt;fails&lt;/STRONG&gt; to connect when the same character( $)  comes encrypted in a KEY using hdbuserstore . This means, hdbuserstore considers the character "special" and does not encrypt.&lt;/P&gt;&lt;P&gt;Case 3 - hdbcli &lt;STRONG&gt;fails&lt;/STRONG&gt; to connect with $ and considers it special character. &lt;/P&gt;&lt;P&gt;As mentioned in &lt;A href="https://launchpad.support.sap.com/#/notes/2490797"&gt;2490797 &lt;/A&gt;, the special characters need to be escaped even in case of hdbsql (case 1), but both in Nil's and your case , hdbsql worked fine with $ (if not used in KEY).  Does this mean, $ is not an special character ? surprising one. &lt;/P&gt;&lt;P&gt;Could you try one more case ?  That is case 4 , using hdbcli with KEY  (create a key in hdbuserstore with ID password and use that to connect in hdbcli &lt;/P&gt;&lt;P&gt;connection = dbapi.connect('host', 39613, 'KEY')&lt;/P&gt;&lt;P&gt;While creating the key use \$ to escape in hdbuserstore. &lt;/P&gt;</description>
    <pubDate>Wed, 27 May 2020 07:32:52 GMT</pubDate>
    <dc:creator>sumitjais</dc:creator>
    <dc:date>2020-05-27T07:32:52Z</dc:date>
    <item>
      <title>hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaq-p/12213286</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I am consistently getting the error hdbcli.dbapi.Error: (10, 'authentication failed') when I have $ in my password "Aditya$123". I am using standard hdbcli dbapi with the connection syntax as below:&lt;/P&gt;
  &lt;P&gt;self.dbConn = dbapi.connect(user=db_user, password="db_password", port=port, address=address)&lt;/P&gt;
  &lt;P&gt; self.cursor = self.dbConn.cursor()&lt;/P&gt;
  &lt;P&gt;I tried to escape the $ character but that did not help :&lt;/P&gt;
  &lt;P&gt;db_password = db_password.replace('$','\$') &lt;/P&gt;
  &lt;P&gt;I checked this note &lt;A href="https://answers.sap.com/questions/518509/using-credentials-from-hdbuserstore-results-in-err.html" target="test_blank"&gt;https://answers.sap.com/questions/518509/using-credentials-from-hdbuserstore-results-in-err.html&lt;/A&gt; but not sure what am I missing here. Any help is greatly appreciated. Please not that I am able to connect from the terminal using hdbsql:&lt;/P&gt;
  &lt;P&gt;/usr/sap/CLO/HDB96&amp;gt; hdbsql -i 96 -p Aditya$123 -u SYSTEM&lt;/P&gt;
  &lt;P&gt;Welcome to the SAP HANA Database interactive terminal.&lt;/P&gt;
  &lt;P&gt;Type: \h for help with commands &lt;/P&gt;
  &lt;P&gt; \q to quit &lt;/P&gt;
  &lt;P&gt;hdbsql CLO=&amp;gt; \s&lt;/P&gt;
  &lt;P&gt;host : localhost:39613&lt;/P&gt;
  &lt;P&gt;sid : CLO&lt;/P&gt;
  &lt;P&gt;dbname : CLO&lt;/P&gt;
  &lt;P&gt;user : SYSTEM&lt;/P&gt;
  &lt;P&gt;kernel version: 1.00.122.23.1548298510&lt;/P&gt;
  &lt;P&gt;SQLDBC version: libSQLDBCHDB 1.00.120.118.1548119815&lt;/P&gt;
  &lt;P&gt;autocommit : ON&lt;/P&gt;
  &lt;P&gt;locale : en_US.UTF-8&lt;/P&gt;
  &lt;P&gt;input encoding: UTF8&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 13:32:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaq-p/12213286</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-26T13:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213287#M4570762</link>
      <description>&lt;P&gt;Are you able to change your password?  $ might be a special character in your system somewhere.  Also have you talked to your DBA regarding this issue?  What did they have to say?&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 14:56:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213287#M4570762</guid>
      <dc:creator>agentry_src</dc:creator>
      <dc:date>2020-05-26T14:56:49Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213288#M4570763</link>
      <description>&lt;P&gt;Hi Mike,&lt;/P&gt;&lt;P&gt;I am using this setup for some internal testing and hence, I am the only one who has access to this system. To answer your question, yes, I am able to change the password. I am trying to query the database using hdbcli and am stuck because of this password issue. I can change the password to something else without '$' but then I need to understand the root cause of this issue because a similar password may be used in field. &lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 04:36:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213288#M4570763</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-27T04:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213289#M4570764</link>
      <description>&lt;P&gt;Hi Aditya, &lt;/P&gt;&lt;P&gt;This is interesting one !&lt;/P&gt;&lt;P&gt;hdbsql, hdbcli and hdbuserstore - these all come from same hana client.&lt;/P&gt;&lt;P&gt;However, from &lt;A href="https://answers.sap.com/questions/518509/using-credentials-from-hdbuserstore-results-in-err.html" target="_blank"&gt;here &lt;/A&gt;and your issue, I see these cases : &lt;/P&gt;&lt;P&gt;Case 1- hdbsql &lt;STRONG&gt;accepts&lt;/STRONG&gt; the special character (such as $ ) when executed &lt;STRONG&gt;directly. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Case 2- hdbsql &lt;STRONG&gt;fails&lt;/STRONG&gt; to connect when the same character( $)  comes encrypted in a KEY using hdbuserstore . This means, hdbuserstore considers the character "special" and does not encrypt.&lt;/P&gt;&lt;P&gt;Case 3 - hdbcli &lt;STRONG&gt;fails&lt;/STRONG&gt; to connect with $ and considers it special character. &lt;/P&gt;&lt;P&gt;As mentioned in &lt;A href="https://launchpad.support.sap.com/#/notes/2490797"&gt;2490797 &lt;/A&gt;, the special characters need to be escaped even in case of hdbsql (case 1), but both in Nil's and your case , hdbsql worked fine with $ (if not used in KEY).  Does this mean, $ is not an special character ? surprising one. &lt;/P&gt;&lt;P&gt;Could you try one more case ?  That is case 4 , using hdbcli with KEY  (create a key in hdbuserstore with ID password and use that to connect in hdbcli &lt;/P&gt;&lt;P&gt;connection = dbapi.connect('host', 39613, 'KEY')&lt;/P&gt;&lt;P&gt;While creating the key use \$ to escape in hdbuserstore. &lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 07:32:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213289#M4570764</guid>
      <dc:creator>sumitjais</dc:creator>
      <dc:date>2020-05-27T07:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213290#M4570765</link>
      <description>&lt;P&gt;Hi Sumit, Thanks for your suggestions, I was really running out of options. We are using hdbcli python library and I am sure that $ is a special character in Python. I am working on an application that needs a definitive solution to the password issue. Moreover hdbcli takes password as an argument and we cannot pass KEY. Can it be a hdbcli bug?&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 09:17:06 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213290#M4570765</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-27T09:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213291#M4570766</link>
      <description>&lt;P&gt;Hi Aditya, &lt;/P&gt;&lt;P&gt;Of course , $ is an special character in linux and python  &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;/P&gt;&lt;P&gt;I too am unsure about hdbsql . If it were special character for hdbsql ,then  &lt;EM&gt;hdbsql -i 96 -p Aditya$123 -u SYSTEM &lt;/EM&gt;shouldn't have worked. &lt;/P&gt;&lt;P&gt;I see hdbcli takes userstore KEY as well ( check below links). &lt;/P&gt;&lt;P&gt;&lt;A href="https://blogs.sap.com/2019/02/04/secure-user-store-for-the-sap-hana-service-by-the-sap-hana-academy/"&gt;https://blogs.sap.com/2019/02/04/secure-user-store-for-the-sap-hana-service-by-the-sap-hana-academy/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.02/en-US/ee592e89dcce4480a99571a4ae7a702f.html"&gt;https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.02/en-US/ee592e89dcce4480a99571a4ae7a702f.html&lt;/A&gt; &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;connect(key=&amp;lt;hdbuserstore-key&amp;gt;)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 May 2020 09:18:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213291#M4570766</guid>
      <dc:creator>sumitjais</dc:creator>
      <dc:date>2020-05-27T09:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213292#M4570767</link>
      <description>&lt;P&gt;Thanks for the quick response, Sumit! Apologies for my ignorance, I will explore the links that you have shared for hdbuserstore key. I have also upgraded hdbcli to the latest version in the hope of finding the solution to the password issue. I am also foxed by hdbsql, sometimes it takes the password argument in single quotes to connect but it never prompted me to escape the $ character. Are you aware of any other special characters that need to be escaped and are documented by SAP?&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 09:36:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213292#M4570767</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-27T09:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213293#M4570768</link>
      <description>&lt;P&gt;Hi Aditya, I faced this issue with '#' in the password. (Though I did not try that in hdbcli then).&lt;/P&gt;&lt;P&gt;For the different behavior of # in &lt;EM&gt;hdbsql with user/password&lt;/EM&gt; and &lt;EM&gt;hdbsql with hdbuserstorekey&lt;/EM&gt;, i had convinced myself that hdbuserstore has something to do with linux ( hence # not accepted in key) and hdbsql is absolutely related to sql and not linux ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;  I don't see any documented list of special characters defined for hdbcli and hdbsql. &lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 09:46:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213293#M4570768</guid>
      <dc:creator>sumitjais</dc:creator>
      <dc:date>2020-05-27T09:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213294#M4570769</link>
      <description>&lt;P&gt;Hi Sumit, I deinstalled the database and created it with password "Aditya$123". Now hdbcli works like a charm! Earlier this was not my primary password, I had changed the password using the statement "ALTER USER SYSTEM PASSWORD "Aditya$123";" After that hdbcli stopped connecting. Do you see any issues with the way I am altering the password? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 10:33:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213294#M4570769</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-27T10:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213295#M4570770</link>
      <description>&lt;P&gt;Great.&lt;/P&gt;&lt;P&gt;No Aditya, Yours is the correct way of changing password. &lt;/P&gt;&lt;P&gt;So, hdbcli as well as hdbsql accept $ directly while hdbuserstore needs an escape (\$) for it !&lt;/P&gt;&lt;P&gt;SAP should revisit its note 2490797 where it says escape is required in case of special character even for hdbsql . $ is special character.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 11:16:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213295#M4570770</guid>
      <dc:creator>sumitjais</dc:creator>
      <dc:date>2020-05-27T11:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: hdbcli.dbapi.Error: (10, 'authentication failed') when password contains special character</title>
      <link>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213296#M4570771</link>
      <description>&lt;P&gt;Hi, I found the workaround for this issue. I think it may be a bug due to the way special characters are handled in hdbsql and hdbcli. I updated the password using hdbcli instead of hdbsql and the hdbcli as well as hdbsql connections work fine post that. However, if I change the password with a special character using hdbsql, hdbcli fails to connect to the database.&lt;/P&gt;&lt;P&gt;Thanks for all the assistance!&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Aditya&lt;/P&gt;</description>
      <pubDate>Thu, 28 May 2020 04:36:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hdbcli-dbapi-error-10-authentication-failed-when-password-contains-special/qaa-p/12213296#M4570771</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-05-28T04:36:05Z</dc:date>
    </item>
  </channel>
</rss>

