zabbix 忘记密码,找回密码

zabbix 默认用户名Admin,默认密码zabbix

1.如果数据库也忘记了账户密码(时间长了什么不忘记呀)

a. 源代码安装的zabbix web服务
假设Zabbix部署目录为/www/zabbix/
那么数据库文件为
/www/zabbix/conf/zabbix.conf.php

more /www/zabbix/conf/zabbix.conf.php

b.如果是yum一键安装的zabbxi web服务

whereis zabbix
zabbix: /usr/lib/zabbix /etc/zabbix /usr/share/zabbix

在/etc/zabbix/里有个web

[root@x01 web] cd /etc/zabbix/web
[root@x01 web]# ls
maintenance.inc.php  zabbix.conf.php

2. 登录数据库查看默认账户情况

mysql -uzabbix -p -e "select * from zabbix.users\G"
Enter password: 
*************************** 1. row ***************************
        userid: 1
         alias: Admin
          name: Zabbix
       surname: Administrator
        passwd: ab054fc97e10508776a20f054a7f34f1
           url: 
     autologin: 1
    autologout: 0
          lang: zh_CN
       refresh: 30s
          type: 3
         theme: default
attempt_failed: 0
    attempt_ip: 123.120.2.111
 attempt_clock: 1583589895
 rows_per_page: 50
*************************** 2. row ***************************
        userid: 2
         alias: guest
          name: 
       surname: 
        passwd: 341d8cd98f00b20429800998ecf84279
           url: 
     autologin: 0
    autologout: 15m
          lang: en_GB
       refresh: 30s
          type: 1
         theme: default
attempt_failed: 0
    attempt_ip: 
 attempt_clock: 0
 rows_per_page: 50

2. 登录数据库强行修改超级账户密码

mysql -uzabbix -p
mysql> use zabbix;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
 
Database changed
mysql> update users set passwd='5fce1b3e34b520afeffb37ce08c7cd66' where userid='1';

zabbix 默认用户名Admin,默认密码zabbix
解释:5fce1b3e34b520afeffb37ce08c7cd66 = zabbix

3. 登录以后马上修改密码


This entry was posted in Linux and tagged , . Bookmark the permalink.
月小升QQ 2651044202, 技术交流QQ群 178491360
首发地址:月小升博客https://java-er.com/blog/zabbix-recover-password/
无特殊说明,文章均为月小升原创,欢迎转载,转载请注明本文地址,谢谢
您的评论是我写作的动力.
2020.03.24 评论已经全局关闭,有事加QQ聊天