[SOLVED] Permission Denied to Cacti GUI

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
vpatel
Posts: 9
Joined: Mon Nov 05, 2018 1:16 pm

[SOLVED] Permission Denied to Cacti GUI

Post by vpatel »

Hi Team,

My cacti version is currently 1.1.37 which is up to date. It was working fine but suddenly stopped working and gave me permission denied while I was bulk copying admin user. Can you please guide me?

It shows below:

Permission Denied
You are not permitted to access this section of Cacti.

If you feel that this is an error. Please contact your Cacti Administrator.

[Return | Login Again]
Version 1.1.37 | (c) 2004-2018 - The Cacti Group

Viral
Attachments
error_snapshot
error_snapshot
Capture.PNG (67.71 KiB) Viewed 2777 times
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Permission Denied to Cacti GUI

Post by netniV »

There is a bug where you can define the admin user as a template user, which then disables the admin user. Run the following for me to see if that's been hit (otherwise it's really a permissions issue where you've locked yourself out somehow).

Code: Select all

select id, username, realm, must_change_password, password_change, login_opts, enabled, locked from user_auth;
+----+----------+-------+----------------------+-----------------+------------+---------+--------+
| id | username | realm | must_change_password | password_change | login_opts | enabled | locked |
+----+----------+-------+----------------------+-----------------+------------+---------+--------+
|  1 | admin    |     0 |                      | on              |          2 | on      |        |
|  3 | guest    |     0 | on                   | on              |          1 |         |        |
+----+----------+-------+----------------------+-----------------+------------+---------+--------+
2 rows in set (0.00 sec)
On a fresh system, you should have a table like above.
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
vpatel
Posts: 9
Joined: Mon Nov 05, 2018 1:16 pm

Re: Permission Denied to Cacti GUI

Post by vpatel »

Thanks netniV for the response. here's the output. Seems like I am locked out pretty much. I copied admin user to Viral using cli to see response but it is locked out as well. Please guide.

Code: Select all


MariaDB [cacti]> select id, username, realm, must_change_password, password_change, login_opts, enabled, locked from user_auth;
+----+----------+-------+----------------------+-----------------+------------+---------+--------+
| id | username | realm | must_change_password | password_change | login_opts | enabled | locked |
+----+----------+-------+----------------------+-----------------+------------+---------+--------+
|  1 | admin    |     0 |                      | on              |          2 | on      |        |
|  4 | support  |     0 |                      | on              |          3 | on      |        |
|  5 | viral    |     0 |                      | on              |          2 | on      |        |
+----+----------+-------+----------------------+-----------------+------------+---------+--------+
3 rows in set (0.00 sec)

Regards,
Viral
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: Permission Denied to Cacti GUI

Post by netniV »

Code: Select all

select * from user_auth_realm where user_id = 1;
+----------+---------+
| realm_id | user_id |
+----------+---------+
|        1 |       1 |
|        2 |       1 |
|        3 |       1 |
|        4 |       1 |
|        5 |       1 |
|        7 |       1 |
|        8 |       1 |
|        9 |       1 |
|       10 |       1 |
|       11 |       1 |
|       12 |       1 |
|       13 |       1 |
|       14 |       1 |
|       15 |       1 |
|       16 |       1 |
|       17 |       1 |
|       18 |       1 |
|       19 |       1 |
|       20 |       1 |
|       21 |       1 |
|       22 |       1 |
|       23 |       1 |
|       24 |       1 |
|       25 |       1 |
|       26 |       1 |
If you run the above, your admin account should have at least the first 26 realms. I do wonder if you copied the users the wrong way around, thus it removed your privs rather than granting them to the other user.
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
vpatel
Posts: 9
Joined: Mon Nov 05, 2018 1:16 pm

Re: Permission Denied to Cacti GUI

Post by vpatel »

Seems like have no privs at all to user. How can i assign them?

Code: Select all


MariaDB [cacti]> select * from user_auth_realm where user_id = 1;
Empty set (0.00 sec)

Thanks,
Viral
vpatel
Posts: 9
Joined: Mon Nov 05, 2018 1:16 pm

Re: Permission Denied to Cacti GUI

Post by vpatel »

Seems like have no privs at all to user. How can i assign them?

Code: Select all


MariaDB [cacti]> select * from user_auth_realm where user_id = 1;
Empty set (0.00 sec)

Thanks,
Viral
vpatel
Posts: 9
Joined: Mon Nov 05, 2018 1:16 pm

Re: Permission Denied to Cacti GUI

Post by vpatel »

I figured out. For anyone facing same issue, below command resolved authority issue for admin user.

Code: Select all

MariaDB [cacti]> INSERT INTO user_auth_realm (`realm_id`, `user_id`) values ('1', '1');
and so on upto realm_id=26.

Note that the column names are enclosed in ` (character above tab) and not in quotes

Thanks a bunch netniV for resolution. Have a good day!

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

Re: Permission Denied to Cacti GUI

Post by netniV »

Sorry, had a busy weekend so didn't checkin here. But you figured out the required commands so that's cool.
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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests