I have forgotten my cacti admin password

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

I have forgotten my cacti admin password

Post by cc »

hi

I have forgotten my cacti admin password.
howto reset it ?

regards
chris
Lalle
Posts: 7
Joined: Fri Jun 06, 2003 10:31 am

Maybe this will help you

Post by Lalle »

Hi,

you can connect to your cacti database using something like

Code: Select all

mysql cacti
maybe you need to use the

Code: Select all

-u
and

Code: Select all

-p
flag. When you are connected you can do the following to change your password:

Code: Select all

update user_auth set password=Password('yournewpassord')  where username='admin';
or use

Code: Select all

update user_auth set password='' where username='admin';
to erase it. After that you can assign a new password with "User Management" from the Utilities menu.

HTH,

Lars
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

I tried, but it doesn't work:

mysql> update user_auth set password=Password('password') where username='admin';
ERROR 1146: Table 'cacti.user_auth' doesn't exist

mysql> update user_auth set password='password' where username='admin'; ERROR 1146: Table 'cacti.user_auth' doesn't exist

kindly regards
chris
Lalle
Posts: 7
Joined: Fri Jun 06, 2003 10:31 am

Post by Lalle »

Hello again,

what is the output of

Code: Select all

mysqlshow cacti
, maybe you are using a different version of cacti. I'm using cacti-0.8. I never used earlier versions, because I just discovered cacti.

I just grabbed the sources of an older version (0.6.8a)and there the table is called

Code: Select all

auth_users
Maybe you could try this.

Greetings from Germany,

Lars
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

linux:~ # mysqlshow cacti -u root -p
Enter password:
Database: cacti
+-----------------------+
| Tables |
+-----------------------+
| auth_acl |
| auth_areas |
| auth_graph |
| auth_graph_hierarchy |
| auth_hosts |
| auth_log |
| auth_sections |
| auth_users |
| def_cdef |
| def_cf |
| def_colors |
| def_ds |
| def_graph_type |
| def_image_type |
| graph_hierarchy |
| graph_hierarchy_items |
| lnk_ds_rra |
| lnk_rra_cf |
| menu |
| menu_category |
| menu_items |
| rrd_ds |
| rrd_ds_cdef |
| rrd_ds_cdef_item |
| rrd_graph |
| rrd_graph_item |
| rrd_rra |
| settings |
| settings_graphs |
| settings_tree |
| snmp_hosts |
| snmp_hosts_interfaces |
| src |
| src_data |
| src_fields |
| version |
+-----------------------+
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

I changed, but it still doesn't work:

mysql> update auth_users set password='password' where username='admin';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

kindly regards
chris
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

the admin account still doesn't work and I can login as guest only.
Lalle
Posts: 7
Joined: Fri Jun 06, 2003 10:31 am

Last try

Post by Lalle »

Hey Chris,

have you also tried the following?

Code: Select all

update auth_users set password=Password('password')  where username='admin';
Your password is stored encrypted in the table auth_users and not in plain text.

If this isn't working either you can still try

Code: Select all

update auth_users set password='' where username='admin';
This will set the password to an empty string and you can leave the password field blank when logging into cacti.

If this isn't working for you I'm stumped and have no further idea.

Lars
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

I did:

mysql> update auth_users set password='' where username='admin';
Query OK, 1 row affected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0

but it still doesn't work.
Lalle
Posts: 7
Joined: Fri Jun 06, 2003 10:31 am

:-(

Post by Lalle »

Hi!

Maybe someone else can help you with your problem. I tested both approaches and for me they worked like a charm. I used it after the first install of cacti because I wasn't aware of the default password for admin and so I simply changed it from the mysql prompt.

Good luck,

Lars
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

The suggestions above will work for Cacti 0.6.x. You can use the following SQL to reset your admin password in 0.8:

Code: Select all

update user_auth set password=MD5('NEWPASSWORD') where username='admin';
Make sure to replace NEWPASSWORD with your desired admin password. Let me know if you are still having problems logging in after running this.

-Ian
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

I canged:

mysql> update auth_users set password=MD5('password') where username='admin'; Query OK, 1 row affected (0.05 sec)
Rows matched: 1 Changed: 1 Warnings: 0

but it still doesn't work.
Maybe it's not the password problem ?
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

my cacti version is cacti-0.6.8a
raX
Lead Developer
Posts: 2243
Joined: Sat Oct 13, 2001 7:00 pm
Location: Carlisle, PA
Contact:

Post by raX »

Here is how to reset your admin password to 'admin' in 0.6.8a:

Code: Select all

update auth_users set password='43e9a4ab75570f5b' where username='admin';
-Ian
cc
Cacti User
Posts: 71
Joined: Fri Sep 27, 2002 3:09 am
Location: CH

Post by cc »

hi

it doesn't work.
I tried already before.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest