Skip to Content

How do I change the password management option for all remote servers ?

Changing password management to automatic in ezeelogin for remote servers


Overview: This article explains how to change the password management option to "automatic" in Ezeelogin for all remote servers. It includes taking a backup of the Ezeelogin database, finding the database prefix, and running specific queries to update the password management setting. It also covers steps to change the password management option for specific server groups. Users need to replace placeholder values with actual database and server group names in their environment.


Refer Password management in Ezeelogin to get more ideas about different password management options in Ezeelogin. 

Take a backup of the Ezeelogin database by the following command.

root@jumpserver:~#   mysqldump db_name > db.sql

 Find the  database prefix from /usr/local/etc/ezlogin/ez.conf in Ezeelogin gateway server

root@jumpserver:~#  cat /usr/local/etc/ezlogin/ez.conf

system_folder /var/www/ezlogin/

force_https yes

uri_path /

db_host localhost

db_port /var/run/mysqld/mysqld.sock

db_name ezlogin_por

db_user ezlogin_cxy

db_pass ymhbtPaY)VzD2g]84

db_prefix casmbn_

cookie_encryption_key D8$Frp5fF_FF

cookie_name rlbup

cookie_path /

www_folder /var/www/html/ezlogin/  

admin_user ezadmin

mysql_encrypt no

  Step 1. Run the following query to change the password management option to "automatic"

Replace the " prefix_" with the value given in the /usr/local/ezlogin/ez.conf of your Ezeelogin jumpserver.

root@jumpserver:~#   php /usr/local/ezlogin/ez_queryrunner.php "update prefix_servers set keep_password='N'"

Step 2. For changing password management to "automatic" for a specific server group follow the below steps:-

Step 2.a. Login to MySQL server and use Ezeelogin database.
 

Replace ezlogin_xyz with your Ezeelogin database name.

root@jumpserver:~# mysql -u root -p

Enter password:

MariaDB [(none)]> use ezlogin_xyz;

Step 2.b. Find servergroup_id from MySQL server and specify it on the query.
 

MariaDB [(none)]> select * from prefix_servergroups\G

*************************** 1. row ***************************
id: 1
name: linux_server
description:
created: 2021-06-22 20:37:46
mtime: 2021-06-23 02:07:46
*************************** 2. row ***************************
id: 2
name: development_server
description:
created: 2021-06-24 01:00:30
mtime: 2021-06-24 06:30:30
2 rows in set (0.000 sec)

Step 2.c. Replace servergroup_id that corresponds to the server group for which you want to change password management to "automatic".

root@jumpserver :~# php /usr/local/ezlogin/ez_queryrunner.php "update prefix_servers set keep_password='N' where servergroup_id=1"


Related Articles