Hi,
maybe I'm just blind, but what is the simplest way to give a user the permission to view all devices under a specific tree?
I created a new tree, and added a couple of devices to it. Then I created a new user and gave him only permissions to 'View Graphs' at the Realm Permissions. After that I changed all default Graph Permissions to 'deny', only the 'Tree Permission' for the specific tree to allow.
This didn't work, the user has no access to any device under this tree. If I set all permissions for hosts under that tree to allow (Graph Permissions (By Host)), everything is fine. But I have to do this for every host, and if a new device is added to the tree, I have to remember to adjust the permissions for the user.
Is there a better/faster way to do this?
Ralf
How to give a user access to all devices under a new tree
Moderators: Developers, Moderators
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Re: How to give a user access to all devices under a new tre
Hipirx wrote:Is there a better/faster way to do this?
I usually create users using these default policies :
- Graph Permissions (By Graph) = ALLOW
- Graph Permissions (By Host) = ALLOW
- Graph Permissions (By Graph Template) = ALLOW
- Tree Permissions = DENY
And then I add trees one by one.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Re: How to give a user access to all devices under a new tre
That was the first thing I tried. But then the user can see all other hosts/graphs by viewing the graphs by 'List View' or 'Preview View" in the above right corner! I discovered this by accident and was a bit suprised...fmangeant wrote:Hipirx wrote:Is there a better/faster way to do this?
I usually create users using these default policies :
- Graph Permissions (By Graph) = ALLOW
- Graph Permissions (By Host) = ALLOW
- Graph Permissions (By Graph Template) = ALLOW
- Tree Permissions = DENY
And then I add trees one by one.
Even if I give him only the right to 'User Has Rights to Tree View' in user managemant, he still can change the URL to point to another graph or host!
For example, it is still possible to acces this graph
http://myhost/cacti/graph.php?local_gra ... rra_id=all
even though the user has no access to the tree!
Ralf
- fmangeant
- Cacti Guru User
- Posts: 2345
- Joined: Fri Sep 19, 2003 8:36 am
- Location: Sophia-Antipolis, France
- Contact:
Re: How to give a user access to all devices under a new tre
You're right - I forgot to mention that I allow only the "Preview View" for my customers.pirx wrote:That was the first thing I tried. But then the user can see all other hosts/graphs by viewing the graphs by 'List View' or 'Preview View" in the above right corner! I discovered this by accident and was a bit suprised...
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Re: How to give a user access to all devices under a new tre
I've tried to reproduce that. If I give a user the right on one tree and 'Preview View' as Graph option, he is able to see all graphs.fmangeant wrote:You're right - I forgot to mention that I allow only the "Preview View" for my customers.pirx wrote:That was the first thing I tried. But then the user can see all other hosts/graphs by viewing the graphs by 'List View' or 'Preview View" in the above right corner! I discovered this by accident and was a bit suprised...
In 'Graph Permissions' I set all default policies to deny, only permissions for one tree to allow and in 'Realm Permissions' I only activated 'User Has Rights to Preview View '.
If the User then logs in, he is in 'Preview View' and can see all graphs! Maybe I'm doing something wrong, but I can't see, how this should restrict a user to just on tree and the corresponding devices/graphs.
Ralf
-
- Posts: 8
- Joined: Fri Jul 22, 2005 6:23 am
Re: How to give a user access to all devices under a new tre
I just look at the code of version 0.8.6c and that the normal behaviour. Tree permissions only affect "tree mode" view.pirx wrote:That was the first thing I tried. But then the user can see all other hosts/graphs by viewing the graphs by 'List View' or 'Preview View" in the above right corner! I discovered this by accident and was a bit suprised...
You have to use a deny default policy for hosts and add manually the hosts the user has access to.
FYI I've the same problem with more that 100 hosts per tree node...and i found no solution except to add the 100 hosts manually in the policy...
Re: How to give a user access to all devices under a new tre
You are right, that's a bit annoying. It would be so easy, if a user that has access to a tree has access to all devices and graphs too. It's very boring to add the permissions for many devices...krackerbelin wrote: I just look at the code of version 0.8.6c and that the normal behaviour. Tree permissions only affect "tree mode" view.
You have to use a deny default policy for hosts and add manually the hosts the user has access to.
FYI I've the same problem with more that 100 hosts per tree node...and i found no solution except to add the 100 hosts manually in the policy...
Ralf
Who is online
Users browsing this forum: No registered users and 4 guests