Skip to Content

List the servers whose password management option is not set for automatic resetting.

How to get the list of servers whose password management option is not set for automatic resetting?


Overview: This article assists gateway users in listing the servers that do not have the automatic password reset option enabled.


Step 1: Run the below query on the gateway server to retrieve the list of servers whose password management option is not set for automatic resetting.

root@gateway:~# mysql -u root -p -e "USE $(grep -oP 'db_name\s+\K\S+' /usr/local/etc/ezlogin/ez.conf); SELECT name, keep_password FROM $(grep -oP 'db_prefix\s+\K\S+' /usr/local/etc/ezlogin/ez.conf)servers WHERE keep_password != 'N';"
Enter password:
+----------------------+---------------+
| name                 | keep_password |
+----------------------+---------------+
| web.eznoc.com        | O             |
| production.eznoc.com | Y             |
| dev.eznoc.com        | S             |
+----------------------+---------------+

In the above command, the value 'N' for keep_password indicates that Automatic password management.

From the above output O, Y and S represents different password management options

Step 2: Run the below query on the gateway server to retrieve the list of servers whose password management option is set for automatic resetting.

root@gateway:~# mysql -u root -p -e "USE $(grep -oP 'db_name\s+\K\S+' /usr/local/etc/ezlogin/ez.conf); SELECT name, keep_password FROM $(grep -oP 'db_prefix\s+\K\S+' /usr/local/etc/ezlogin/ez.conf)servers WHERE keep_password = 'N';"

Enter password:

+---------------+---------------+
| name          | keep_password |
+---------------+---------------+
| db.eznoc.com  | N             | 
+---------------+---------------+

O : One time password

Y : Keep given password

S : Keep server password

N : Automatic password


Related Articles:

Password management and the different options