Wednesday, 6 December 2023

All about HDBUSERSTORE LIST


ACTIVITY1:



hdbuserstore SET <HANASITTER1KEY> dc1-saphanad01:30044 HANASITTER1 Naveen@8977779532


<HANASITTER1KEY> - hana user store key name

dc1-saphanad01 - hostname

30044 - SQL port of tenent 

HANASITTER1 - User

Naveen@8977779532 - Password



example2:

Create a key:

hdbuserstore -i SET <key_name> <hostname>:<port>@<DB Name> <Username> <Password>

where,
key_name - Name you want to give to your key
hostname - Hostname on which DB is installed (can be localhost or ip or virtual host)
port - Port number to be used to connect to DB
Username - User for which you are creating the key
Password - Password of the above existing user
DB Name - Database name in MDC environment
Combination of hostname:port is known as environment and represented as env

Note: It's not mandatory to provide DB name while generating key but it's a good practice to prevent conflicts.

Example:
hdbuserstore -i SET X vhabcxyzdb:30213@SYSTEMDB SYSTEM hello@123





ACTIVITY2:


To delete HDBUSERSTORE KEY

hdbuserstore DELETE HANASITTER1KEY



ACTIVITY3:

List all keys

hdbuserstore list



ACTIVITY4:

Using key to login

hdbsql -U <key_name>
You can know about other possible operations using hdbuserstore -h command.



ACTIVITY5:

ListFromDir <DIR>

        List entries from a store in <DIR>.

        <DIR>       store directory from which entries to be read


ACTIVITY6:

  ChangeKey

        Generate new encryption key and encrypt passwords again.


ACTIVITY 7:

AddFromDir <DIR>

        Add entries from a store in <DIR> without overwriting existing keys.

        <DIR>       store directory from which entries to be read


-----------------------------------------------------------------------------------------------------------------------




ACTIVITY 8:



hdbuserstore -h

Usage: hdbuserstore [options] command [arguments]


Options:

  -u <USER>       perform operation for other operating system user

  -v              verbose mode, print operations done

  -i              interactive mode, ask for missing values

  -h              this help message

  -H <HOST>       assume host name <HOST>

Commands (the command name is case insensitive):

  Help

        Print help message.

  Set <KEY> <ENV>[@<DATABASE>] <USERNAME> <PASSWORD>

        Add or update a profile entry.

        <KEY>       entry key name

        <ENV>       database location (host:port)

        <USERNAME>  user name

        <PASSWORD>  password

        <DATABASE>  database name in MDC environment

  AddFromDir <DIR>

        Add entries from a store in <DIR> without overwriting existing keys.

        <DIR>       store directory from which entries to be read

  Delete <KEY>

        Delete entry with key <KEY>.

  List [<KEY> ...]

        List entries of store. The passwords are not shown.

  ListFromDir <DIR>

        List entries from a store in <DIR>.

        <DIR>       store directory from which entries to be read

  ChangeKey

        Generate new encryption key and encrypt passwords again.

---------------------------------------------------------------------------------------------------------------



No comments:

Post a Comment