Cacti password reset from Mysql not working
Moderators: Developers, Moderators
Cacti password reset from Mysql not working
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
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 -------------------
Re: Cacti password reset from Mysql not working
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.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Cacti password reset from Mysql not working
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.
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 (23.68 KiB) Viewed 23133 times
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------
Re: Cacti password reset from Mysql not working
Hi,
please someone help me here?
Thanks
please someone help me here?
Thanks
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------
Re: Cacti password reset from Mysql not working
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
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Cacti password reset from Mysql not working
Dear Netvit
sorry for late,
auth_method doesn't exist in settings table. Should I add it please?
Thank
sorry for late,
auth_method doesn't exist in settings table. Should I add it please?
Thank
- Attachments
-
- Capture_mysql.JPG (13.03 KiB) Viewed 23067 times
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------
Re: Cacti password reset from Mysql not working
All columns from settings table in attachment
- Attachments
-
- Capture_mysql_2.JPG (88.61 KiB) Viewed 23067 times
--------------- Ubuntu 17.04 / Cacti 1.1.25 -------------------
Re: Cacti password reset from Mysql not working
Since Auth_Method is missing, the default is 1 which is the built in authentication of cacti. Can you do the following for me:
It should look something like above.
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 |
+----+----------+---------+----------------------+--------+-----------------+----------+
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: Cacti password reset from Mysql not working
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.
+----+--------------+---------+----------------------+
| 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 -------------------
Re: Cacti password reset from Mysql not working
Is this a fresh install or an upgrade?
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
-
- Posts: 3
- Joined: Tue Apr 28, 2020 11:10 am
Re: Cacti password reset from Mysql not working
Hi,
Is this problem solved back then?
I have the same issue her. I hav a new cacti installation on a brand new Raspbian Buster OS (Debian 10), MariaDB and Apache2.
Cannot find a solution anywhere. I get the login prompt, and the database connection is working because I get the login screen with the Cacti logo.
I've tried the methods in SLQ:
mysql -uroot -p
use cacti;
update user_auth set must_change_password="" where id=1;
update user_auth set password=md5('admin') where username='admin';
flush privileges;
But this does not work. The username looks like:
MariaDB [cacti]> select id, username, enabled, must_change_password from user_auth;
+----+----------+---------+----------------------+
| id | username | enabled | must_change_password |
+----+----------+---------+----------------------+
| 1 | admin | on | |
| 3 | guest | | on |
+----+----------+---------+----------------------+
2 rows in set (0.001 sec)
Does somebody knows what's the problem?
Is this problem solved back then?
I have the same issue her. I hav a new cacti installation on a brand new Raspbian Buster OS (Debian 10), MariaDB and Apache2.
Cannot find a solution anywhere. I get the login prompt, and the database connection is working because I get the login screen with the Cacti logo.
I've tried the methods in SLQ:
mysql -uroot -p
use cacti;
update user_auth set must_change_password="" where id=1;
update user_auth set password=md5('admin') where username='admin';
flush privileges;
But this does not work. The username looks like:
MariaDB [cacti]> select id, username, enabled, must_change_password from user_auth;
+----+----------+---------+----------------------+
| id | username | enabled | must_change_password |
+----+----------+---------+----------------------+
| 1 | admin | on | |
| 3 | guest | | on |
+----+----------+---------+----------------------+
2 rows in set (0.001 sec)
Does somebody knows what's the problem?
-
- Posts: 3
- Joined: Tue Apr 28, 2020 11:10 am
Re: Cacti password reset from Mysql not working
To my opinion the auth_method is available:
MariaDB [cacti]> select * from settings;
+------------------+------------------------------------------------------------------------------------------------------------+
| name | value |
+------------------+------------------------------------------------------------------------------------------------------------+
| auth_method | 1 |
| date | 2020-04-28 19:40:01 |
| path_webroot | /opt/cacti |
| poller_lastrun_1 | 1588095601 |
| selected_theme | modern |
| stats_poller | Time:298.9331 Method:cmd.php Processes:1 Threads:0 Hosts:0 HostsPerProcess:0 DataSources:0 RRDsProcessed:0 |
| stats_recache_1 | Poller:1 RecacheTime:0.0 DevicesRecached:0 |
+------------------+------------------------------------------------------------------------------------------------------------+
7 rows in set (0.001 sec)
MariaDB [cacti]> select * from settings;
+------------------+------------------------------------------------------------------------------------------------------------+
| name | value |
+------------------+------------------------------------------------------------------------------------------------------------+
| auth_method | 1 |
| date | 2020-04-28 19:40:01 |
| path_webroot | /opt/cacti |
| poller_lastrun_1 | 1588095601 |
| selected_theme | modern |
| stats_poller | Time:298.9331 Method:cmd.php Processes:1 Threads:0 Hosts:0 HostsPerProcess:0 DataSources:0 RRDsProcessed:0 |
| stats_recache_1 | Poller:1 RecacheTime:0.0 DevicesRecached:0 |
+------------------+------------------------------------------------------------------------------------------------------------+
7 rows in set (0.001 sec)
-
- Posts: 3
- Joined: Tue Apr 28, 2020 11:10 am
Re: Cacti password reset from Mysql not working
This is (for me) the solution:
viewtopic.php?f=21&t=60850
Comment out cacti_cookie_domain in conf.php:
#$cacti_cookie_domain = 'cacti.net';
viewtopic.php?f=21&t=60850
Comment out cacti_cookie_domain in conf.php:
#$cacti_cookie_domain = 'cacti.net';
Re: Cacti password reset from Mysql not working
That is a different and very problematic issue with Cacti 1.2.11 only. Unfortunately, that variable was supposed to be commented out by default but was left uncommented and commited which ultimately released it to the world.HansGrundemann wrote: ↑Tue Apr 28, 2020 1:43 pm This is (for me) the solution:
viewtopic.php?f=21&t=60850
Comment out cacti_cookie_domain in conf.php:
#$cacti_cookie_domain = 'cacti.net';
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Who is online
Users browsing this forum: No registered users and 1 guest