[ZBX-9647] CLldap.php ldap_get_entries() complains of "expects parameter 2 to be resource, boolean given" Created: 2015 Jun 18 Updated: 2017 May 30 |
|
Status: | Open |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.4.5 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Trivial |
Reporter: | Nicola Worthington | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 0 |
Labels: | authentication, ldap | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
root@dev-monitoring-test:/var/log/apache2 $ lsb_release -a |
Attachments: |
![]() |
Description |
When trying to configure LDAP authentication through the web administration frontend, I get the following error message: ldap_search(): Search: No such object [authentication.php:120 ? CLdapAuthValidator->validate() ? CLdap->checkPass() ? CLdap->getUserData() ? ldap_search() in /usr/share/zabbix/include/classes/ldap/CLdap.php:198] ldap_get_entries() expects parameter 2 to be resource, boolean given [authentication.php:120 ? CLdapAuthValidator->validate() ? CLdap->checkPass() ? CLdap->getUserData() ? ldap_get_entries() in /usr/share/zabbix/include/classes/ldap/CLdap.php:199] LDAP: User not found. Login name or password is incorrect! I am reasonably sure that the credentials I have entered are correct (they are in use on other systems). The first two lines of the error message suggest to me that there is something other than a configuration value wrong here. |
Comments |
Comment by Nicola Worthington [ 2015 Jun 18 ] |
(For clarity – I have censored part of the end of the LDAP host and DNs, if it wasn't clear). |
Comment by richlv [ 2015 Jun 20 ] |
first one is debug, and looks ok when username is not found - did you check both bind & test usernames with other tools ? the second line looks like a bug in zabbix (maybe only exposed when user is not found ?) - leaving this issue open |
Comment by Nicola Worthington [ 2015 Jun 22 ] |
I'm reasonably sure I have the details correct when I test: # Working: nworthington@desk-nworthington:~ $ ldapsearch -D cn=manager,dc=companyfoo,dc=com -w FFFFFFF -x -H ldap://ldap.companyfoo.com:389 -b ou=users,dc=companyfoo,dc=com -o ldif-wrap=no -s sub 'uid=nworthington' userPassword sambaLMPassword sambaNTPassword uid # extended LDIF # # LDAPv3 # base <ou=users,dc=companyfoo,dc=com> with scope subtree # filter: uid=nworthington # requesting: userPassword sambaLMPassword sambaNTPassword uid # # nworthington, users, companyfoo.com dn: uid=nworthington,ou=users,dc=companyfoo,dc=com uid: nworthington sambaLMPassword: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF sambaNTPassword: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF userPassword:: FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF= # search result search: 2 result: 0 Success # numResponses: 2 # numEntries: 1 # Incorrect password: nworthington@desk-nworthington:~ $ ldapsearch -D cn=manager,dc=companyfoo,dc=com -w WRONGPASS -x -H ldap://ldap.companyfoo.com:389 -b ou=users,dc=companyfoo,dc=com -o ldif-wrap=no -s sub 'uid=nworthington' userPassword sambaLMPassword sambaNTPassword uid ldap_bind: Invalid credentials (49) # Incorrect bind DN: nworthington@desk-nworthington:~ $ ldapsearch -D cn=FOOmanager,dc=companyfoo,dc=com -w FFFFFFF -x -H ldap://ldap.companyfoo.com:389 -b ou=users,dc=companyfoo,dc=com -o ldif-wrap=no -s sub 'uid=nworthington' userPassword sambaLMPassword sambaNTPassword uid ldap_bind: Invalid credentials (49) # Incorrect search attribute name: nworthington@desk-nworthington:~ $ ldapsearch -D cn=manager,dc=companyfoo,dc=com -w FFFFFFF -x -H ldap://ldap.companyfoo.com:389 -b ou=users,dc=companyfoo,dc=com -o ldif-wrap=no -s sub 'uidWRONGFOO=nworthington' userPassword sambaLMPassword sambaNTPassword uid # extended LDIF # # LDAPv3 # base <ou=users,dc=companyfoo,dc=com> with scope subtree # filter: uidXXX=nworthington # requesting: userPassword sambaLMPassword sambaNTPassword uid # # search result search: 2 result: 0 Success # numResponses: 1 |