...
Different actions have different parameters. Here is basic syntax of credential command:
Code Block |
---|
cmdmgr.exe credentials --type=<eagle|aes> --action=<list|add|delete|edit|convert|change_credtype> [optional parameters] |
Parameter «type» is required for selecting encoding type. Therefore, it cannot be empty.
Note: If action is changing content of file, it automatically converts from old format file (with another encryption format and 3-parameter credential format) to new file format (more flexible encryption format and 4-parameter credential format).
Below will be described each action in details.
1. action=list
This is action, which prints credentials from specified file. Here is command syntax with this action:
Code Block |
---|
cmdmgr.exe credentials --type=aes --action=list [--file=<path_to_file>|--section=<some_section>] |
Command has two optional parameters:
- file – path to credential file. If this parameter not specified, then default file location will be from «db_connection.ini» primary section;
- section – server custom settings section, by default primary.
Examples:
Code Block |
---|
cmdmgr.exe credentials --type=aes --action=list |
Figure 11. List example 1.
Code Block |
---|
cmdmgr.exe credentials --type=aes --action=list --file=../cfg/test |
Figure 12. List example 2.
Code Block |
---|
cmdmgr.exe credentials --type=aes --action=list --section=secondary |
Figure 13. List example 3.
2. action=add
This action allows adding new credential to specified file, or file from section.
Here is command syntax with this action:
Code Block |
---|
cmdmgr.exe credentials --type=<eagle|aes> --action=add --name=<DB_Name> --user=<UserName> --pass=<Password> [--credtype=<oracle|mssql|service>] [--file=<path_to_file>|--section=<some_section>] |
Action has such parameters:
- name – database name;
- user – user name or login for database connection;
- pass – user password for database connection. It will be encrypted using encryption type from parameter «type»;
- credtype – Credential database type. It can be mssql, oracle, service or unknown. By default, it is unknown. This is optional parameter;
- file – path to credential file. If this parameter not specified, then default file location will be from «db_connection.ini» primary section. This is optional parameter;
- section – server custom settings section, by default primary. This is optional parameter.
Examples:
Code Block |
---|
cmdmgr.exe credentials --type=aes --action=add --name=DB --user=root --pass=root |
Figure 14. Add example 1.
Code Block |
---|
...
cmdmgr.exe credentials --type=aes --action=add --name=DB --user=root --pass=root --credtype=Oracle |
Figure 15. Add example 2.
Code Block |
---|
...
cmdmgr.exe credentials --type=aes --action=add --name=DB --user=root --pass=root --credtype=Oracle --file=../cfg/test |
Figure 16. Add example 3.
Code Block |
---|
cmdmgr.exe credentials --type=aes --action=add --name=DB --user=root --pass=root --credtype=Oracle --section=secondary |
Figure 17. Add example 4.
Info | ||
---|---|---|
|
...
If credential file does not exist, action «add» will create new file based on file or section parameter, or will use default file location from database configuration file. |
3. action=delete
This is action which delete credential from specifed specified file or file from section. Here is command syntax with this action:
Code Block |
---|
cmdmgr.exe credentials --type=<eagle|aes> --action=delete --name=<DB_Name> --user=<UserName> [--credtype=<oracle|mssql|service>] [--file=<path_to_file>|--section=<some_section>] |
Action has such parameters:
...
Example:
cmdmgr.exe credentials -type=aes --action=change_credtype --name=DB -user=root --from=Oracle --to=MSSql
Figure 27. Change credtype example.