Can't Add User Permissions

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

Moderators: Developers, Moderators

archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Can't Add User Permissions

Post by archigos »

I'm running a brand new install of 0.8.7g and cannot add users with permissions to graphs, devices, trees, or graph templates. The drop-downs do not populate with any options.
Any suggestions?
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

I should add that on the Add User page (and not the Edit User) page I see:

Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 525
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 583
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 643
Notice: Undefined variable: policy in /usr/local/var/www/cacti/user_admin.php on line 702
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Can't Add User Permissions

Post by gandalf »

I don't see those errors.
Did you install all available patches?
Are you running PIA?
R.
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

I just installed all patches and am having the same problem, though the errors seem to have gone away.
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

I'm not using any plugins.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Can't Add User Permissions

Post by gandalf »

Please switch logging verbosity to DEBUG, call the failing user management page and switch logging back. Please provide the related snippet out of your cacti.log file
R.
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

Here's the log:
11/12/2010 02:46:10 PM - WEBUI: Cacti Log Cleared from Web Management Interface
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT local_graph_id, title_cache FROM graph_templates_graph WHERE local_graph_id > 0 AND local_graph_id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=1 AND user_auth_perms.user_id=11) ORDER BY title_cache"
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT id, CONCAT('',description,' (',hostname,')') AS name FROM host WHERE host.id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=3 AND user_auth_perms.user_id=11) ORDER BY description,hostname"
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT id, name FROM graph_templates WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=4 AND user_auth_perms.user_id=11) ORDER BY name"
11/12/2010 02:46:47 PM - CMDPHP: Poller[0] ERROR: SQL Assoc Failed!, Error:'1064', SQL:"SELECT id, name FROM graph_tree WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=2 AND user_auth_perms.user_id=11 ) ORDER BY name"
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Can't Add User Permissions

Post by gandalf »

The error message points to a syntax error, but the statements look fine for me.
Please note the syql server version.
And please try one of those commands from mysql cli and return the exact error messages.
R.
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

mysql> SHOW VARIABLES LIKE "%version%";
+------------------+---------------------+
| Variable_name | Value |
+------------------+---------------------+
| protocol_version | 10 |
| version | 4.0.18-log |
| version_comment | Source distribution |
+------------------+---------------------+
3 rows in set (0.02 sec)
mysql> SELECT id, CONCAT('',description,' (',hostname,')') AS name FROM host WHERE host.id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=3 AND user_auth_perms.user_id=11) ORDER BY description,hostname;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
mysql> SELECT id, CONCAT('',description,' (',hostname,')') AS name FROM host WHERE host.id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=3 AND user_auth_perms.user_id=11) ORDER BY description,hostname;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
mysql> SELECT id, name FROM graph_templates WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=4 AND user_auth_perms.user_id=11) ORDER BY name;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
mysql> SELECT id, name FROM graph_tree WHERE id NOT IN (SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=2 AND user_auth_perms.user_id=11 ) ORDER BY name;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT item_id FROM user_auth_perms WHERE user_auth_perms.type=
Perhaps this is as simple as Cacti is not compatible with mySQL 4?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Can't Add User Permissions

Post by gandalf »

In general, we are compatible, see http://docs.cacti.net/manual:087:1_inst ... quirements. We only require mysql 4.1x and up. Better use 5.x as old versions are out of support. I suspect the variable "type" as the source of the error. It may help to use `user_auth_perms`.`type` instead. Please try using cli first.
R.
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

I'll try that and get back to you. Thanks.
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

I just finally got to try adding the `s and still have been met with no success.
archigos
Posts: 10
Joined: Mon Nov 08, 2010 2:16 pm

Re: Can't Add User Permissions

Post by archigos »

I actually even tried adding `s around all fields and tables:
mysql> SELECT `id`, CONCAT('',`description`,' (',`hostname`,')') AS `name` FROM `host` WHERE `host`.`id` NOT IN (SELECT `item_id` FROM `user_auth_perms` WHERE `user_auth_perms`.`type`=3 AND `user_auth_perms`.`user_id`=11) ORDER BY description,hostname;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT `item_id` FROM `user_auth_perms` WHERE `user_auth_perms`
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Can't Add User Permissions

Post by gandalf »

Ok, perhaps there's more to do on that old mysql version. I honestly don't know if e.g. subqueries were not supported
R.
avishai0528
Posts: 1
Joined: Sun Feb 20, 2011 3:53 am

Re: Can't Add User Permissions

Post by avishai0528 »

i installed cacti on a windows server....
after several users i created successfully
i now get the same error he get

Code: Select all

Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 525
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 595
Notice: Undefined index: id in C:\Inetpub\wwwroot\cacti\user_admin.php on line 596
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 595
Notice: Undefined index: id in C:\Inetpub\wwwroot\cacti\user_admin.php on line 596
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 643
Notice: Undefined variable: policy in C:\Inetpub\wwwroot\cacti\user_admin.php on line 702
do you know how can i fix it? :\
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest