[Date Prev][Date Next] [Chronological] [Thread] [Top]

ldap_bind in php


I know this also involves PHP but I post it here because I think maybe it's
a problem with my access statement in slapd.conf. What I would like to do
is to authenticate users via LDAP, the problem that I currently encounter
is if the user doesn't input a password ldap_bind returns true which means
that it somehow succeeded... This is my PHP code:

$ldap_bind_result = ldap_bind($ds, "cn=marc,ou=users,dc=test,dc=tld", "");

if ($ldap_bind_result) {
        echo "ldap_bind succeeded";
} else {
     echo "ldap_bind failed";

In this case i get succeeded, which I shouldn't, the same happens if I take
a fake name which doesn't even exist as "cn". My access statement looks
like this:

access to *
     by users write

Where I only want to let authenticated users do something.

Am I missing something ?

Thanks for the help