Create user mapping
Step
In user mapping, database user is mapped to NAE user. User mapping is required to perform the data migration. To create a user mapping, run the following command:
./pdbctl addusermap -a <databaseuseralias> -d <databaseuser> -p <naepassword> -u <naeuser>
Flag Description
The following table describes the flags associated with this command:
Flag | Data Type | Description |
---|---|---|
-a | string | Alias name corresponding to the database user that will be mapped to the Key Manager NAE user. |
-d | string | Database user that will be mapped to the Key Manager NAE user. |
-h | Flag to view help for the addusermap command. | |
-p | string | NAE user’s password. |
-u | string | NAE user name that is to be mapped with the database user. |
-- verbose | Print verbose logs. |
Example
The following sample command maps the database user ingrian to NAE user dbusr:
./pdbctl addusermap -a demo -d ingrian -p asdf1234 -u dbusr
Mapping another user qatest to NAE user dbusr:
./pdbctl addusermap -a demo -d qatest -p asdf1234 -u dbusr
On successful execution of this command, the system does not print anything and error code 0 is returned on using echo $?
.
You can use the listusermap
command to view the users mapped to the NAE user. On failure, error message is printed and a non-zero error code is returned. To check the error code, use the command echo $?
.
Note
The addusermap
command is also used for modifying a user mapping.