上次登入 cacti 發現,總是提示密碼錯誤,原來密碼被修改了,儘管後來登上了,然後就想著萬一時間久了,密碼忘了,如何找回呢?
網上有很多關於 cacti 重置密碼的介紹,但我覺得這一篇不錯,就摘錄下來了,僅供參考
用 root 使用者進入系統
[root@localhsot]# mysql -u root -p
mysql> show databases;
mysql> use cacti;
mysql> show tables;
mysql> select from user_auth;
mysql> update user_auth set password=md5(“cactipasswd”) where id=’1′;
現在 cacti 新密碼就是 cactipasswd

例項如下:
[root@localhost ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 28
Server version: 5.0.77 Source distribution
Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the buffer.
mysql> use cacti;
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 user_auth set password=md5(“cactipasswd”) where id=’1′;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
mysql> quit;
Bye
[root@localhost ~]#