Module used to add/remove/update user information in OpenSIPS tables.
This module exports the following commands:
add
- adds a new username in the database; accepts an optional user (with or without a domain) as parameter, followed by a password. If any of them are missing, you will be prompted forpassword
- changes the password of an username; accepts similar parameters asadd
delete
- removes an username from the database; accepts the user as parameter
The parameters from this tool can be either provisioned in the configuration
file, either prompted for during runtime, similar to the database
module.
If a parameter is specified in the configuration file, you will not be
prompted for it!
These are the parameters that can be specified in the config file:
domain
- the domain of the username; this is only read/prompted for when the user to be added/deleted does not already have a domain partscripts/
directory in the OpenSIPS source tree, or/usr/share/opensips/
plain_text_passwords
- indicates whether passwords should be stored in plain-text, or just theha1
andha1b
values. Defaults tofalse
Add the [email protected]
user with the S3cureP4s$
password.
opensips-cli -x user add [email protected] S3cureP4s$
If the domain, or password is not specified, it will be prompted:
(opensips-cli): user add razvan
Please provide the domain of the user: domain.com
Please enter new password:
Please repeat the password:
A similar behavior is for the delete
and passwords
commands, where you
will be prompted for the missing/necessary information.
To remove an username, use the delete
command:
opensips-cli -x user delete [email protected]
- sqlalchemy and sqlalchemy_utils - used to abstract the database manipulation, regardless of the backend used
This module can only manipulate database backends that are supported by the SQLAlchemy project, such as SQLite, Postgresql, MySQL, Oracle, MS-SQL.