忘记zabbix监控平台Admin用户密码:Incorrect user name or password or account is temporarily blocked.

如下图(实在想不起密码不要紧我们直接重新设置它):

1.登入zabbix数据库

[root@SJYS-Test1 ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
2.进入zabbix库,查询users用户表

MariaDB [(none)]> use zabbix;
MariaDB [zabbix]> select * from users;
+--------+----------+--------+---------------+--------------------------------------------------------------+-----+-----------+------------+---------+---------+---------+----------------+--------------+---------------+---------------+----------+--------+
| userid | username | name | surname | passwd | url | autologin | autologout | lang | refresh | theme | attempt_failed | attempt_ip | attempt_clock | rows_per_page | timezone | roleid |
+--------+----------+--------+---------------+--------------------------------------------------------------+-----+-----------+------------+---------+---------+---------+----------------+--------------+---------------+---------------+----------+--------+
| 1 | Admin | Zabbix | Administrator | $2y$10$92nDno4n0Zm7Ej7Jfsz8WukBfgSS/U0QkIuu8WkJPihXBb2A1UrEK | | 1 | 0 | default | 30s | default | 7 | 172.16.20.45 | 1670376817 | 50 | default | 3 |
| 2 | guest | | | $2y$10$89otZrRNmde97rIyzclecuk6LwKAsHN0BcvoOKGjbT.BwMBfm7G06 | | 0 | 15m | default | 30s | default | 0 | | 0 | 50 | default | 4 |
+--------+----------+--------+---------------+--------------------------------------------------------------+-----+-----------+------------+---------+---------+---------+----------------+--------------+---------------+---------------+----------+--------+
2 rows in set (0.000 sec)
3.生成一个md5类型的新密码

[root@SJYS-Test1 ~]# echo -n admin | openssl md5
(stdin)= a3a0bd42393fe9b382271ddba191a440
4.更新表数据Admin用户的密码,并重新加载表权限

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

MariaDB [zabbix]> flush privileges;
Query OK, 0 rows affected (0.001 sec)
5.登录

 



posted @ 2024-05-06 17:04  呼长喜  阅读(879)  评论(0编辑  收藏  举报