Is it possible to manage Ezeelogin users via API?
Is it possible to manage Ezeelogin users via API?
It is not possible to create or remove Ezeelogin users with the API feature since there are a lot of risk factors associated with it. We recommend LDAP or Active Directory as the best way for user management.
User suspension, unsuspension, and force password change can be performed with the API feature.
This feature is only available from Ezeelogin version 7.32.0
Login to Ezeelogin GUI -> Settings -> API and set a new API secret.
The API script can be executed as:
For Help
1. Suspend User
root@jumpserver:~# php /usr/local/ezlogin/ezwapi.php -help suspend_user
Usage:
ezwapi.php suspend_user -api_url <API URL> -secret <API secret> -user <username>
Example:
root@jumpserver:~# php /usr/local/ezlogin/ezwapi.php suspend_user -api_url http://192.168.1.9/ezlogin -secret zxcvbnm -user john
2. Unsuspend User
root@jumpserver:~# php /usr/local/ezlogin/ezwapi.php -help unsuspend_user
Usage:
ezwapi.php unsuspend_user -api_url <API URL> -secret <API secret> -user <username>
Example:
root@jumpserver:~# php /usr/local/ezlogin/ezwapi.php unsuspend_user -api_url http://192.168.1.9/ezlogin -secret zxcvbnm -user john
3. Force password change
root@jumpserver:~# php /usr/local/ezlogin/ezwapi.php -help force_user_password_change
Usage:
ezwapi.php force_user_password_change -api_url <API URL> -secret <API secret> -user <username>
Example:
root@jumpserver:~# php /usr/local/ezlogin/ezwapi.php force_user_password_change -api_url http://192.168.1.9/ezlogin -secret zxcvbnm -user john
Related Articles
Add / update / delete servers through Ezeelogin API
Add server with private key stored in database with API