Hello, our company would like to get LDAP authentication working with zabbix 2.0.8 but so far have been unable to do so. The main problem we have is that the form does not seem to allow specification of a group that members should belong to. Given that limitation I was hoping that the search attribute field could be used to restrict the allowed users instead. However I have found that zabbix alters the passed in attribute so that it becomes ((<your specified attribute>))=<your username> instead of just (<your specified attribute>). How can I get zabbix to just authenticate using the unaltered attribute?
Further confusing the matter is that despite the form lacking any sort of group specification, the file that processes the ldap authentication (include/classes/class.cldap.php) contains this code:
So it looks like the code is actually there for group support but it just never made it into the ldap configuration form? Is there any way I could modify the ldap configuration form to utilize this support?
Thanks!
Further confusing the matter is that despite the form lacking any sort of group specification, the file that processes the ldap authentication (include/classes/class.cldap.php) contains this code:
Code:
// get groups for given user if grouptree is given
if (isset($this->cnf['grouptree']) && isset($this->cnf['groupfilter'])) {
$base = $this->makeFilter($this->cnf['grouptree'], $user_result);
$filter = $this->makeFilter($this->cnf['groupfilter'], $user_result);
$sr = ldap_search($this->ds, $base, $filter, array($this->cnf['groupkey']));
if (!$sr) {
error('LDAP: Reading group memberships failed.');
return false;
}
$result = ldap_get_entries($this->ds, $sr);
foreach ($result as $grp) {
if (!empty($grp[$this->cnf['groupkey']][0])) {
$info['grps'][] = $grp[$this->cnf['groupkey']][0];
}
}
}
// always add the default group to the list of groups
if (isset($conf['defaultgroup']) && !str_in_array($conf['defaultgroup'], $info['grps'])) {
$info['grps'][] = $conf['defaultgroup'];
}
Thanks!
Comment