Share » Forums » Install & configuration » LDAP authentication error

LDAP authentication error

LDAP authentication error

Thursday 26 October 2006 10:49:04 am - 4 replies

Author Message

Jonny Bergkvist

Friday 27 October 2006 2:55:16 am

Hello,

LDAPServer=localhost
Is that correct for you? This could be true if you run eZ at the same server as the LDAP-directory runs, or if you use stunnel or any other redirect-software that passes on traffic from your eZ-host at port 389 to some other host (the LDAP-server).

A hint is to go into kernel/classes/datatypes/ezuser/ezldapuser.php and print some variables, such as result of ldap_connect and ldap_bind. This may make it easier to track your problem.

- Jonny
http://www.hit.no/

Sagar Khushalani

Saturday 28 October 2006 9:08:50 am

ezpublish and active directory are on the same server, so localhost is correct, right?

for the ldap bind, i used administrator and the admin password of the domain controller. is that correct?

i'll post the rest of the ezldapuser.php files when i get back to the office on tuesday.

thanks

Sagar Khushalani

http://www.sagarkhushalani.com

Sagar Khushalani

Thursday 02 November 2006 11:29:27 am

how do i get it to print the variables?

Sagar Khushalani

http://www.sagarkhushalani.com

Jonny Bergkvist

Tuesday 07 November 2006 12:19:38 am

You may want to follow the ldap connection process and find where it stops/fails:
first is ldap_connect(),
then some ldap_set_option() to konfigure ldap client to match server type/configuration.
Then ldap_bind(). When ldap_bind is successfull you can get data/entries from ldap with
ldap_list() - scope "one", ldap_read() - scope "base", ldap_search - scope "sub"
ldap_get_entries() returns the searchresult as an array.

To print a variable you can do like this:
edit kernel/common/classes/datatypes/ezuser/ezldapuser.php

You may want to view the $info-variable,
find the line: $info = ldap_get_entries( $ds, $sr ) ;
then insert a line under with:
echo "<pre>"; print_r( $sr ); echo "</pre>"; exit;

Try to login and you will see what values this variable contains.
If it's empty, you should check out the earlier stages of ldap connection process, by printing variables in the same manner as the example.

- Jonny

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu