Manage users: Add, Delete, Suspend, Unsuspend, etc.
To list all users, use the following command:
opencli user-list
Example output:
opencli user-list
+----+----------+-----------------+-----------------+---------------------+
| id | username | email | plan_name | registered_date |
+----+----------+-----------------+-----------------+---------------------+
| 52 | stefan | stefan | cloud_4_nginx_3 | 2023-11-16 19:11:20 |
| 53 | petar | petarc@petar.rs | cloud_8_nginx | 2023-11-17 12:25:44 |
| 54 | rasa | rasa@rasa.rs | cloud_12_nginx | 2023-11-17 15:09:28 |
+----+----------+-----------------+-----------------+---------------------+
You can also format the data as JSON:
opencli user-list --json
To create a new user run the following command:
opencli user-add <USERNAME> <PASSWORD> <EMAIL> <PLAN_ID>
:::tip
Provide random
as password to generate a strong random password.
:::
To delete a user and all his data run the following command:
opencli user-delete <USERNAME>
add -y
flag to disable prompt.
:::warning This action is irreversible and will permanently delete all user data. :::
To suspend (temporary disable access) to user, run the follwowing command:
opencli user-suspend <USERNAME>
To unsuspend (enable access) to user, run the follwowing command:
opencli user-unsuspend <USERNAME>
To change a username run:
opencli user-rename <USERNAME> <NEW_USERNAME>
To change a email run:
opencli user-email <USERNAME> <NEW_EMAIL>
To reset the password for a OpenPanel user, you can use the user-password
command:
opencli user-password <USERNAME> <NEW_PASSWORD> --ssh
Use the --ssh
flag to also change the password for the SSH user in the container.
This command allows you to login as the root user inside any users container.
opencli user-login <USERNAME>
To disable Two-Factor Authentication for a user, run the following command:
opencli user-2fa <USERNAME> [disable]
To assign free IP address to a user run the following command:
opencli user-ip <USERNAME> <IP_ADDRESS>
To assign IP address that is currently used by another user to this user, run the following command:
opencli user-ip <USERNAME> <IP_ADDRESS> --y
To remove dedicated IP address from a user run:
opencli user-ip <USERNAME> delete
View up to last 20 successfull logins for the user.
opencli user-loginlog <USERNAME> [--json]
Check REDIS service status for user and enable/disable REDIS® service.
opencli user-redis [check|enable|disable] <USERNAME>
Example:
opencli user-redis check stefan
Memcached is not installed for user stefan.
Check Memcached service status for user and enable/disable Memcached service.
opencli user-memcached [check|enable|disable] <USERNAME>
Example:
opencli user-memcached enable stefan
Memcached enabled successfully for user stefan.