Zabbix忘記admin登錄密碼重置密碼


Zabbix忘記admin登錄密碼重置密碼

1. 問題描述:

image_1emvounds1s3faga3jir4ddkf9.png-48.8kB

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. 重新登陸即可

image_1emvpdvfpitsb3d1udbn1016jfm.png-441.6kB

本文轉載於:https://www.cnblogs.com/sungeek/p/10594036.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM