Hi, I installed today the drupal 4.7 with the module ldap-4.7.x-1.x-dev
and I am not able to authenticate the people via ldap.

The people who was already in the database works fine, but the rest of users (only on the ldap) are not authenticated!

I followed the code till the function search, there I did

function search($base_dn, $filter, $attributes = array()) {
$ret = array();
msg($base_dn); -> it is ok!
msg($filter); ->it is ok !
msg_r($attributes); it is empty !!, but i think it is ok because I only want it to authenticate

then it seems that doen't find the users, because I find on the log:

Dec 11 17:22:01 webmail slapd[15693]: conn=233598 op=0 BIND dn="" method=128
Dec 11 17:22:01 webmail slapd[15693]: conn=233598 op=0 RESULT tag=97 err=0 text=
Dec 11 17:22:01 webmail slapd[15693]: conn=233598 op=1 SRCH base="ou=group,dc=name1,dc=name2,dc=es" scope=2 deref=0 filter="(uid=username)"
Dec 11 17:22:01 webmail slapd[15693]: conn=233598 op=1 SEARCH RESULT tag=101 err=32 nentries=0 text=
Dec 11 17:22:01 webmail slapd[15693]: conn=233598 op=2 UNBIND

and the username is on "ou=group,dc=name1,dc=name2,dc=es" !!

So if anyone can help me I would be very thankfully
Albert Moreno

Comments

amoreno’s picture

Sorry for the previous log, I was looking at another server,
the log is the following, so I guess it is finding the user (nentries=1), but in the search function is not entering in the
if ($x && ldap_count_entries($this->connection, $x)) {
so, theorically is finding nothing !! isn't?

Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=2 SRCH base="uid=username,ou=group,dc=name1,dc=name2,dc=es" scope=0 deref=0 filter="(objectClass=*)"
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=2 SEARCH RESULT tag=101 err=0 nentries=1 text=
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=3 SRCH base="" scope=0 deref=0 filter="(objectClass=*)"
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=3 SRCH attr=namingContexts
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=3 SEARCH RESULT tag=101 err=0 nentries=1 text=
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=4 SRCH base="dc=name1,dc=name2,dc=es" scope=2 deref=0 filter="(&(objectClass=posixGroup)(gidNumber=2375))"
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=4 SRCH attr=dn description
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=4 SEARCH RESULT tag=101 err=0 nentries=0 text=
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 op=5 UNBIND
Dec 11 17:44:50 famenoe slapd[9803]: conn=3 fd=12 closed

amoreno’s picture

SOLVED !!

It was necessary to do an slapindex over the ldap !
So, it is necessary to stop the ldap, execute slapindex and restart the ldap !!

Albert

clemens.tolboom’s picture

Category: bug » support
Status: Active » Closed (fixed)