Skip to Content

Is it possible to manage Ezeelogin users via API?

Managing users in Ezeelogin via API


Overview: This article explains how to manage Ezeelogin users via the API for actions such as suspending, unsuspending, and forcing password changes, while noting that user creation and removal are not supported due to security risks.


 
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.

Login to Ezeelogin GUI -> Settings ->  API and set a new API secret.

The API script can be executed as:

php /usr/local/ezlogin/ezwapi.php [params...]

For Help 

php /usr/local/ezlogin/ezwapi.php -help

Usage:

ezwapi.php -help <action>
action : API action (suspend_user/unsuspend_user/force_user_password_change)

1. Suspend User

php /usr/local/ezlogin/ezwapi.php -help suspend_user

Usage:  

ezwapi.php suspend_user -api_url <API URL> -secret <API secret> -user <username>

Example:

php /usr/local/ezlogin/ezwapi.php suspend_user -api_url http://192.168.1.9/ezlogin -secret zxcvbnm -user john

2. Unsuspend User

php /usr/local/ezlogin/ezwapi.php -help unsuspend_user
Usage:

ezwapi.php unsuspend_user -api_url <API URL> -secret <API secret> -user <username>

Example:

php /usr/local/ezlogin/ezwapi.php unsuspend_user -api_url http://192.168.1.9/ezlogin -secret zxcvbnm -user john

3. Force password change

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:

php /usr/local/ezlogin/ezwapi.php force_user_password_change -api_url http://192.168.1.9/ezlogin -secret zxcvbnm -user john

Note: This feature is only available from Ezeelogin version 7.32.0


Related Articles

Add / update / delete servers through Ezeelogin API

Add server with private key stored in database with API