Cacti password reset from Mysql not working

Anything that you think should be in Cacti.

Moderators: Moderators, Developers

Post Reply
Author
Message
arzoum
Posts: 11
Joined: Mon May 23, 2016 6:22 am

Cacti password reset from Mysql not working

#1 Post by arzoum » Tue Nov 06, 2018 12:39 pm

Dear all,
please help me to reset admin password on Cacti

shell> mysql -u root -p
mysql> use cacti;
mysql> update user_auth set password=md5('admin') where username='admin';
Query OK, 1 row affected (0,00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

But I cannot connect via GUI with admin/admin.

Where is the issue please?
Thanks
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------

netniV
Cacti Guru User
Posts: 2667
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti password reset from Mysql not working

#2 Post by netniV » Tue Nov 06, 2018 12:43 pm

I would make sure that you are connecting Cacti to the correct DB. Also, if this is not on the login page with the cacti logo on it, then it may be Apache's user auth kicking in, or if it is, ensure that you do not have an LDAP domain that is being used.

arzoum
Posts: 11
Joined: Mon May 23, 2016 6:22 am

Re: Cacti password reset from Mysql not working

#3 Post by arzoum » Wed Nov 07, 2018 6:42 am

Dear Netvis
I think it is the correct DB used.
please see login page in attached. I don't know if it is Apache's user auth kicking or no.
LDAP domain is not used.

Thanks for your help.
Attachments
Capture1.JPG
Capture1.JPG (23.68 KiB) Viewed 933 times
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------

arzoum
Posts: 11
Joined: Mon May 23, 2016 6:22 am

Re: Cacti password reset from Mysql not working

#4 Post by arzoum » Thu Nov 08, 2018 12:23 pm

Hi,
please someone help me here?
Thanks
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------

netniV
Cacti Guru User
Posts: 2667
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti password reset from Mysql not working

#5 Post by netniV » Fri Nov 09, 2018 4:51 am

If you look at the user_auth table, make sure you have the right username. Also, check in the settings table to see what the value is for auth_method

arzoum
Posts: 11
Joined: Mon May 23, 2016 6:22 am

Re: Cacti password reset from Mysql not working

#6 Post by arzoum » Mon Nov 26, 2018 10:50 am

Dear Netvit
sorry for late,
auth_method doesn't exist in settings table. Should I add it please?
Thank
Attachments
Capture_mysql.JPG
Capture_mysql.JPG (13.03 KiB) Viewed 867 times
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------

arzoum
Posts: 11
Joined: Mon May 23, 2016 6:22 am

Re: Cacti password reset from Mysql not working

#7 Post by arzoum » Mon Nov 26, 2018 10:58 am

All columns from settings table in attachment
Attachments
Capture_mysql_2.JPG
Capture_mysql_2.JPG (88.61 KiB) Viewed 867 times
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------

netniV
Cacti Guru User
Posts: 2667
Joined: Sun Aug 27, 2017 12:05 am

Re: Cacti password reset from Mysql not working

#8 Post by netniV » Mon Nov 26, 2018 12:02 pm

Since Auth_Method is missing, the default is 1 which is the built in authentication of cacti. Can you do the following for me:

Code: Select all

select id, username, enabled, must_change_password, locked, failed_attempts, lastfail from user_auth;
+----+----------+---------+----------------------+--------+-----------------+----------+
| id | username | enabled | must_change_password | locked | failed_attempts | lastfail |
+----+----------+---------+----------------------+--------+-----------------+----------+
|  1 | admin    | on      |                      |        |               0 |        0 |
|  3 | guest    |         | on                   |        |               0 |        0 |
+----+----------+---------+----------------------+--------+-----------------+----------+
It should look something like above.

arzoum
Posts: 11
Joined: Mon May 23, 2016 6:22 am

Re: Cacti password reset from Mysql not working

#9 Post by arzoum » Mon Nov 26, 2018 1:04 pm

mysql> select id, username, enabled, must_change_password from user_auth;
+----+--------------+---------+----------------------+
| id | username | enabled | must_change_password |
+----+--------------+---------+----------------------+
| 1 | admin | on | |
| 3 | guest | on | on |
| 4 | monitor | on | |

others columns don't exist.
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------


Post Reply