首页 » Zabbix » 正文

ZABBIX密码重置

  • 操作系统:CentOS 8
  • ZABBIX:5.0.x 登陆数据库,查看zabbix数据库内容
 mysql root@localhost:(none)> use zabbix;
You are now connected to database "zabbix" as user "root"
Time: 0.002s
mysql root@localhost:zabbix> show tables
+----------------------------+
| Tables_in_zabbix           |
+----------------------------+
| acknowledges               |
| actions                    |
| alerts                     |
| application_discovery      |
| application_prototype      |
| application_template       |
| applications               |
| auditlog                   |
| auditlog_details           |
| autoreg_host               |
| conditions                 |
| config                     |
| config_autoreg_tls         |
| corr_condition             |
| corr_condition_group       |
| corr_condition_tag         |
| corr_condition_tagpair     |
| corr_condition_tagvalue    |
| corr_operation             |
| correlation                |
| dashboard                  |
...............................................
| users                      |
| users_groups               |
| usrgrp                     |
| valuemaps                  |
| widget                     |
| widget_field               |
+----------------------------+
166 rows in set
Time: 1.210s
从数据库的表中可以看到用户信息应该存放在users表中,查看用户数据表
mysql root@localhost:zabbix> select * from users\G
***************************[ 1. row ]***************************
userid         | 1
alias          | Admin
name           |
surname        |
passwd         | $2y$10$QuKLMoWkHpI/Ro5dBhamxuuiMau0glxicTGqvjA0rElXnIJcyfBiW
url            |
autologin      | 1
autologout     | 0
lang           | zh_CN
refresh        | 30s
type           | 3
theme          | blue-theme
attempt_failed | 0
attempt_ip     | ***.***.***.***
attempt_clock  | 1596037299
rows_per_page  | 50
从上面内容可以看出,zabbix账号为Admin,密码是一串加密的字符串,zabbix采用的是md5加密密码,执行以下内容即可把用户密码重置为123456
 mysql root@localhost:zabbix> update  users set passwd=md5("123456") where userid='1';
Query OK, 1 row affected
Time: 0.018s
zabbix5.0.x登陆页面
zabbix成功登陆

发表评论