关于Zabbix忘记admin登录密码重置密码的问题
程序员文章站
2022-09-10 09:25:50
zabbix忘记admin登录密码重置密码的问题,具体内容如下所示:1. 问题描述:2. 解决问题2.1 zabbix连接的是mysql数据库[root@zabbix ~]# mysqlwelcome...
zabbix忘记admin登录密码重置密码的问题,具体内容如下所示:
1. 问题描述:
2. 解决问题
2.1 zabbix连接的是mysql数据库
[root@zabbix ~]# mysql welcome to the mariadb monitor. commands end with ; or \g. your mariadb connection id is 52 server version: 5.5.65-mariadb mariadb server copyright (c) 2000, 2018, oracle, mariadb corporation ab and others. type 'help;' or '\h' for help. type '\c' to clear the current input statement. mariadb [(none)]>
2.2 进入mysql数据库以后查询users表
mariadb [zabbix]> use zabbix; mariadb [zabbix]> select userid,alias,passwd from users; +--------+-------+----------------------------------+ | userid | alias | passwd | +--------+-------+----------------------------------+ | 1 | admin | a8105204604a0b11e916f3879aae3b0b | | 2 | guest | d41d8cd98f00b204e9800998ecf8427e | +--------+-------+----------------------------------+ 2 rows in set (0.00 sec)
2.3 生成一个新密码md5,admin是密码
[root@zabbix ~]# echo -n admin | openssl md5 (stdin)= 21232f297a57a5a743894a0e4a801fc3
2.4 然后update表数据,userid=1的这个用户
mariadb [zabbix]> update users set passwd='21232f297a57a5a743894a0e4a801fc3' where userid = '1'; query ok, 1 row affected (0.00 sec) rows matched: 1 changed: 1 warnings: 0
2.5 刷新重新加载权限表
mariadb [zabbix]> flush privileges; query ok, 0 rows affected (0.00 sec)
3. 重新登陆即可
到此这篇关于zabbix忘记admin登录密码重置密码的文章就介绍到这了,更多相关zabbix admin密码内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!