Method of resetting Zabbix password (in one step)
Problem description
Because we do not 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 users is encrypted and stored through md5, so we can reset the new password directly in the database by converting the corresponding md5.
Solution method
1. Connect to the database
[zhuxiaoshuai@zabbix-server ~] # mysql-uroot-pzhuxiaoshuaiqiu # #-u is the user name, followed by a 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 update table data, the user of userid=1 (that is, admin user)
MariaDB [zabbix] > update users set passwd='cce78f045146e7dbb2c7d0df900dcfb3' where userid = '1query OK, 1 row affected (0.01 sec) Rows matched: 1 Changed: 1 Warnings: 0
5. Refresh the reload permissions table
MariaDB [zabbix] > FLUSH PRIVILEGES;Query OK, 0 rows affected (0.03 sec)
Summary
The above is the editor to introduce to you the method of resetting the Zabbix password (one step in place), I hope it will be helpful to you!