The method of resetting Zabbix password (one step)

  • 2021-07-24 11:56:33
  • OfStack

Problem description

Because you don't log in to Zabbix by typing the account password for a long time, it is easy to forget the password of admin, while the password of zabbix user is encrypted and stored through md5, so we can directly reset the new password in the database by converting the corresponding md5.

Solution

1. Connect to the database


[zhuxiaoshuai@zabbix-server ~]# mysql -uroot -pzhuxiaoshuai!@# # -u Is the user name, -p Followed by the password 


2. Query the users table after entering the mysql database


MariaDB [mysql]> use zabbix;
MariaDB [zabbix]> show tables;
MariaDB [zabbix]> select * from users;
MariaDB [zabbix]> select userid,alias,passwd from users;

3. Generate a new admin password of MD5 through Linux


[zhuxiaoshuai@zabbix-server ~]# echo -n zhuxiaoshuai | openssl md5
(stdin)= cce78f045146e7dbb2c7d0df900dcfb3

4. Update the update table data, the user of userid=1 (that is, admin user)


MariaDB [zabbix]> update users set passwd='cce78f045146e7dbb2c7d0df900dcfb3' where userid = '1';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

5. Refresh and reload the permission table


MariaDB [zabbix]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.03 sec)

Summarize

The above is this site to introduce the reset Zabbix password method (1 step in place), I hope to help you!


Related articles: