Home arrow Support arrow Forums
LimeSurvey Forums
Welcome, Guest
Please Login or Register.    Lost Password?
[done] LDAP-Query - Error: Can't bind to the (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: [done] LDAP-Query - Error: Can't bind to the
#15546
fullmann (User)
Senior Lime
Posts: 53
graphgraph
User Offline Click here to see the profile of this user
[done] LDAP-Query - Error: Can't bind to the 3 Months ago Karma: 0  
Hai,

excuse me for my english.
I´m from germany, and my english is not really good.

I´ve made a LDAP-Query (first time).
When i use this query i get following error:

Error: Can't bind to the LDAP directory

This is my Query:
$query_id=0;

// First define the serverId on which you want to run the query
$ldap_queries[$query_id]['ldapServerId'] = 0;

// Give a name that will appear on the user interface
$ldap_queries[$query_id]['name'] = 'Staff with an enabled account';

// Define the ldap base used for user searches
$ldap_queries[$query_id]['userbase'] = 'ou=DV,ou=_HLD,ou=Adolf Boehl Strasse,ou=Berghausen,ou=DE,ou=__EJOT-Standorte,dc=ejot-net,dc=com';

// Define the user filter to apply
// Must begin with '(' and end with ''
$ldap_queries[$query_id]['userfilter'] = '(&(objectCategory=person)(objectClass=user)(account-status=enabled))';

// Define how deep under the userbase you want to search
// 'sub' means: search on the entire subtree
// 'one' means: only search 1 level under the userbase
// 'base' means: only search the userbase DN entry
$ldap_queries[$query_id]['userscope'] = 'sub';

// Define the user's attribute that provides the firstname
// do not use capital letters in the attribute name
// for instance use 'givenname' and not 'givenName'
$ldap_queries[$query_id]['firstname_attr'] = 'givenname';

// Give the user's attribute that provides the lastname
// do not use capital letters in the attribute name
$ldap_queries[$query_id]['lastname_attr'] = 'sn';

// Give the user's attribute that provides the email address
// do not use capital letters in the attribute name
// If multivalued, only the first entry is read
$ldap_queries[$query_id]['email_attr'] = 'mail';


// Optionnally give the user's attributes that provides the
// token, language, attr1 and attr2 piece of information
// do not use capital letters in the attribute name
// if unused, leave empty or comment the lines
$ldap_queries[$query_id]['token_attr'] = ''; // Leave empty for Auto Token generation bu phpsv
$ldap_queries[$query_id]['language'] = '';
$ldap_queries[$query_id]['attr1'] = '';
$ldap_queries[$query_id]['attr2'] = '';


Can somebody tell me, what´s wrong with the query?

Ask, if you need more information.

Version 1.53+ (4108)

Thank you!
 
Logged Logged  
 
Last Edit: 2008/07/15 10:04 By fullmann.
  The administrator has disabled public write access.
#15809
fullmann (User)
Senior Lime
Posts: 53
graphgraph
User Offline Click here to see the profile of this user
Re:LDAP-Query - Error: Can't bind to the LDAP dire 2 Months, 4 Weeks ago Karma: 0  
I think, that there is no connection to the LDAP-Server.
But i have no idea.

The error ist the same, as in the first post.

Here´s the code to get a connection to the server:

$serverId=0;
// Define the server DNS name or IP Address
// If encryption is enabled, make sure the name given here
// corresponds to the certificate's identity
$ldap_server[$serverId]['server'] = "our-domain.com";

// Define the TCP port on which the LDAP server is listenning
// This should be 389 for standard LDAP servers
// or 686 for standard LDAPS connections
$ldap_server[$serverId]['port'] = "389";

// Define the ldap protocol to use
// 'ldapv2' and 'ldapv3' are supported
$ldap_server[$serverId]['protoversion'] = "ldapv2";

// Define the encryption method to use
// 'ldaps' is supported for 'ldapv2' servers
// 'start-tls' is supproted for 'ldapv3' servers
// 'none' is supproted for no encryption at all
// Don't forget to setup your CA's certificate in
// the openldap ldap.conf file
$ldap_server[$serverId]['encrypt'] = "ldaps";

// Define the referral option
// 'false' is recommended for ActiveDirectory servers
$ldap_server[$serverId]['referrals'] = false;

// Define the authentication used to bind to the directory
// We currently support simple authentication
// If anonymous bind must be performed, comment the following two lines
$ldap_server[$serverId]['binddn'] = "uid=user,dc=our-domain,dc=com";
$ldap_server[$serverId]['bindpw'] = "password";


Have somebody an idea what´s wrong in my connection-code?
 
Logged Logged  
 
Last Edit: 2008/07/14 11:30 By Mazi. Reason: Please use \"quote\" instead of \"code\" for long text.
  The administrator has disabled public write access.
#15955
Mazi (Moderator)
Moderator Lime
Posts: 2760
graph
User Offline Click here to see the profile of this user
Re:LDAP-Query - Error: Can't bind to the LDAP dire 2 Months, 3 Weeks ago Karma: 19  
Sorry, I'm no LDAP expert. I can only recommedn to search the forum because there have been lots of LDAP questions asked before.
 
Logged Logged  
 
Beste Grüße/Best regards,
Mazi
______________________
You can support Limesurvey, too!
  The administrator has disabled public write access.
#16040
fullmann (User)
Senior Lime
Posts: 53
graphgraph
User Offline Click here to see the profile of this user
Re:LDAP-Query - Error: Can't bind to the LDAP dire 2 Months, 3 Weeks ago Karma: 0  
I have made a php-script with the normal php-functions.

it is no problem to bind an to get data from the ldap-server.

I don´t unterstand, why i have to fill protocoll and encryption?
In die php-functions i don´t have to do this, and it works!

I try to find something by searching in the forum...
 
Logged Logged  
  The administrator has disabled public write access.
#16044
fullmann (User)
Senior Lime
Posts: 53
graphgraph
User Offline Click here to see the profile of this user
Re:LDAP-Query - Error: Can't bind to the LDAP dire 2 Months, 3 Weeks ago Karma: 0  
Now it works!

The php-function works without any encryption.

I set none-encryption in config-ldap and it works.

Thank you for your support!
 
Logged Logged  
 
Last Edit: 2008/07/15 10:03 By fullmann.
  The administrator has disabled public write access.
#16046
Mazi (Moderator)
Moderator Lime
Posts: 2760
graph
User Offline Click here to see the profile of this user
Re:LDAP-Query - Error: Can't bind to the LDAP dire 2 Months, 3 Weeks ago Karma: 19  
You're welcome! If our hints have been helpful and you enjoy LimeSurvey please consider a donation to the team. We do all this in our free time.
 
Logged Logged  
 
Beste Grüße/Best regards,
Mazi
______________________
You can support Limesurvey, too!
  The administrator has disabled public write access.
#16047
Mazi (Moderator)
Moderator Lime
Posts: 2760
graph
User Offline Click here to see the profile of this user
Re:LDAP-Query - Error: Can't bind to the LDAP dire 2 Months, 3 Weeks ago Karma: 19  
If you are missing any LDAP documentation in the manual please upgrade the manual yourself. It's a wiki and everyone can edit/add information.
 
Logged Logged  
 
Beste Grüße/Best regards,
Mazi
______________________
You can support Limesurvey, too!
  The administrator has disabled public write access.
Go to top