| tenant-type | | slug | login-path-support-obclient |
OBClient supports using the login_path option to store and manage login credentials, eliminating the need to directly enter a password on the command line.
obclient_config_editor tool
When you install obclient, the obclient_config_editor tool is also installed. This tool is used to manage login_path configurations.
Basic usage
obclient_config_editor --help
Set login_path
Create a login_path named test:
obclient_config_editor set --login-path=test --user=test_user --host=127.0.0.1 --port=2881 --password
The following parameters are supported:
-h, --host=name: adds a host to the login file.-G, --login-path=name: adds a name to the login path in the login file (default is client).-p, --password: adds a password to the login file. The password is automatically encrypted by obclient_config_editor.-u, --user: adds a username to the login file.-S, --socket=name: adds the path of the socket file to the login file.-P, --port=name: adds the login port to the login file.
Note
If the password contains special characters (such as #), you must enter it in the interactive interface.
View login_path
View a specified login_path:
obclient_config_editor print --login-path=test
View all login_paths:
obclient_config_editor print --all
Delete login_path
obclient_config_editor remove --login-path=test
Log in using login_path
Log in using the configured login_path:
obclient --login-path=test
To log in to a different host or port, or to add additional parameters, simply append them to the command:
obclient --login-path=test --host=other_host --port=3307
