Suspend ssh gateway user from webgui
Overview: This article provides instructions for admin privileged users on how to suspend a gateway user's account directly from the web GUI.
Step 1: To suspend a gateway user from web GUI log in as an admin privileged user, navigate to Users -> Edit user -> change the status to suspended. Provide the authorization password (Password of the currently logged-in user) and click on Save.
Step 2: After changing the status to "suspended" the gateway user will no longer be able to login to GUI.
Emergency CLI Method:
To suspend user from CLI follow below steps:
Step 1: Login to gateway server as root user.
root@desktop:$ ssh root@{gateway_server_IP or gateway_server_hostname}
Step 2: Run the following command on the gateway server to suspend a user. Replace ezeelogin_username with the actual username of the user to be suspended:
root@gateway:~# php /usr/local/ezlogin/ez_queryrunner.php "update prefix_users set status=0, priv=0 where username='ezeelogin_username'"
Alternative method to unsuspend the user:
Step 1: Find the Ezeelogin database name and database prefix from Ezeelogin configuration file which is under /usr/local/etc/ezlogin/ez.conf on the gateway server.
root@gateway:~# cat /usr/local/etc/ezlogin/ez.conf | grep -i "db_name\|db_prefix"
Step 2: Login to MySQL as root user. Replace db_name with the correct Ezeelogin database name obtained from the previous command.
root@gateway:~# mysql -u root -p
mysql > use db_name;
Step 3: Run the below command to suspend the user. Replace "dbprefix" with the correct prefix and username with the actual username of the user to be suspended:
mysql> update dbprefix_users set status=0, priv=1 where username='username';
Related Articles:
Main admin user account suspended after entering incorrect security code
Is it possible to login to Ezeelogin with a disabled AD user?
Deleting users in ezeelogin without affecting their logs
Reasons for Account Suspension