Loganalyzer LDAP

ivmp asked:

Iv installed Loganalyzer and now im trying to configure to authenticate with LDAP. And i have the following in loganalyzer config.php file:

$CFG['UserDBEnabled'] = true;
$CFG['UserDBServer'] = "localhost";
$CFG['UserDBPort'] = 3306;
$CFG['UserDBName'] = "Syslog";
$CFG['UserDBPref'] = "logcon_";
$CFG['UserDBUser'] = "rsyslog";
$CFG['UserDBPass'] = "rootpass";
$CFG['UserDBLoginRequired'] = true;
$CFG['UserDBAuthMode'] = USERDB_AUTH_INTERNAL;  // USERDB_AUTH_INTERNAL means     LogAnalyzer Internal Auth

$CFG[‘LDAPUserLoginRequired’] = true;
$CFG['LDAPServer'] = "10.10.1.16";                                  // LDAP server     hostname or IP
$CFG['LDAPPort'] = 389;                                                         // LDAP     port, 389 or 636 for SSL
$CFG['LDAPBaseDN'] = 'OU=Adminis,OU=CO Useres,DC=example,DC=local';     // Base DN for     LDAP Search, this is a typical ActiveDirectory sample
$CFG['LDAPSearchFilter'] = '(objectClass=user)';        // Basic Search filter
$CFG['LDAPUidAttribute'] = "sAMAccountName";            // The LDAP attribute used in     the search to find the user, example: uid, cn or sAMAccountName (Active Directory)

$CFG['LDAPBindDN'] = 'CN=ivan.admin,OU=Adminis,OU=CO Useres,DC=example,DC=local'; //     "Searchuser" = the privilegied user used to query LDAP Directory
$CFG['LDAPBindPassword'] = 'myadminpass';                              // Password of     the privilegied user

I cant find what is wrong … i try every combination and everything that i know … any idea ? Sorry 😀 didnt see that i dont send that part 😀 sorry …

the problem is that there is no log or anything that indicate that the LDAPServer (windows server 2008) and CentOS (loganalyzer) communicate. Not that they cant ping each other but there is not clue that is send some kind of request for authenticate.

This the new error that I found today making some changes:

[Tue Mar 25 11:37:08 2014] [error] [client 10.10.20.1] PHP Notice:  Use of undefined     constant xe2x80x98LDAPUserLoginRequiredxe2x80x99 - assumed     'xe2x80x98LDAPUserLoginRequiredxe2x80x99' in /var/www/html/loganalyzer/config.php on     line 62
[Tue Mar 25 11:37:08 2014] [error] [client 10.10.20.1] PHP Notice:  Use of undefined constant xe2x80x98LDAPUserLoginRequiredxe2x80x99 - assumed 'xe2x80x98LDAPUserLoginRequiredxe2x80x99' in /var/www/html/loganalyzer/config.php on line 62
[Tue Mar 25 11:37:15 2014] [error] [client 10.10.20.1] PHP Notice:  Use of undefined constant xe2x80x98LDAPUserLoginRequiredxe2x80x99 - assumed 'xe2x80x98LDAPUserLoginRequiredxe2x80x99' in /var/www/html/loganalyzer/config.php on line 62, referer: http://loganalyzer/loganalyzer/login.php?referer=%2Floganalyzer%2Findex.php

And after changing and installing the “php-ldap”, now i dont have any errors but still cant authenticate … still working on it .. any idea ?

My answer:


Your log entries contain the following curious bit:

xe2x80x98LDAPUserLoginRequiredxe2x80x99

This generally indicates that you edited your configuration file with an editor that replaces plain single quotes ' and double quotes " with “smart quotes”.

Indeed, in your configuration file the smart quotes are visible and distinct from the other quotes:

$CFG[‘LDAPUserLoginRequired’] = true;

You should avoid such editors, or turn the smart quotes feature off, if the editor has such an option. Then edit the configuration file to remove the smart quotes and replace them with regular quotes.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.