Skip to Content

Using credentials from hdbuserstore results in error: * 10: authentication failed SQLSTATE: 28000

Hi,

am trying the use the credentials I have store in the hdbuserstore.

I did the following:

1. I created a user:

Create role BACKUP_ADMIN_ROLE;
/* System privilege required to create/restore backups */
grant BACKUP ADMIN to BACKUP_ADMIN_ROLE;
/* System privilege that allows reading all catalog metadata */
grant CATALOG READ to BACKUP_ADMIN_ROLE;
/*** Now create the user ***/
create user ADMIN_BACKUP password password$12  NO FORCE_FIRST_PASSWORD_CHANGE;
/* grant the role to this user */
grant BACKUP_ADMIN_ROLE to ADMIN_BACKUP;
/* and exempt the user from the password lifetime rules */
alter user ADMIN_BACKUP disable password lifetime;

2. I used hdbsql to to test:

hdbsql -i 00 -n 1xx.x.x.xx:30015 -d NDB -u ADMIN_BACKUP "select count(*) from DUMMY" ;

The result was:

COUNT(*)

1

3. I created the user in the password store:

/usr/sap/hdbclient/hdbuserstore SET BKADMIN 1xx.x.x.xx:30015  ADMIN_BACKUP password$12

I executed the same command, but using the -U (i.e. using hdbuserstore) option.

hdbsql -i 00 -d NDB -U BKADMIN "select count(*) from DUMMY" ;

The result was:

* 10: authentication failed SQLSTATE: 28000

If I add the ip:port with the -n option the result is the same.

Shouldn't the results be the same of the two calls ? What am I missing?

Any advice to resolve this issue would be greatly appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 22 at 01:46 PM

    $ is a special character in Linux, and will need a special treatment.
    Try this:
    hdbuserstore SET BKADMIN 1xx.x.x.xx:30015 ADMIN_BACKUP password\$12
    i.e. replace $ by \$

    Add comment
    10|10000 characters needed characters exceeded