wtorek, 24 września 2013

ZABBIX - listing permissions

Today one of our security officer asked me to retrieve a list of users and permissions from our zabbix systems.

The problem occured while I was trying to associate users' groups to hosts' groups. There is in fact one subsite "permissions" under "Administration" -> "Users" after clicking on particular group link. But you cannot copy any information from there. Additionally if you have many groups that would be tidious task.

Instead of that I decided to retrieve the permissions from the database: here is the working sql command:

SELECT r.permission as "Permissions", g.name as "User Group", z.name as "Host Group" FROM zabbix.rights as r
join zabbix.usrgrp as g
on r.groupid = g.usrgrpid
join zabbix.groups as z
on z.groupid = r.id

 
 
2 in the "permission" column means "read" access, 3 means "read/write" permissions.

Brak komentarzy:

Prześlij komentarz