On 16/7/04 6:13 pm, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Chris,
> Thanks for your help. Currently, I am binding with this line:
>
> $ldap->bind("cn=WVAdmin,cn=examplename,st=wv,c=us");
You need to add the arguments:
password => 'something'
to the bind, as otherwise you will be binding with a name and no password.
Typically that will succeed, but it'll be considered the same as anonymous.
However you're using MAD, which doesn't really implement LDAP in a very
standard way, so it might be doing things differently.
> and the return code is 0 which I understand indicates success. However,
> the search result is limited to the single object
> 'cn=examplename,st=wv,c=us' despite the presence of several objects with
> dn's like cn=<name>,cn=examplename,st=wv,c=us.
>
> I've suspected that maybe I simply don't understand the search mechanism.
> I had assumed that the base of cn=examplename,st=wv,c=us would direct the
> search through elements with dn's ending with the string '
> cn=examplename,st=wv,c=us' like
> cn=<name>,cn=examplename,st=wv,c=us. Is this a correct assumption?
It isn't quite the right way to think about it, as there are ways for the
search to process other entries too (eg by following aliases).
Think of it like directories on a disk, except that DNs are written
little-endian whereas file paths are written big-endian. A subtree search
essentially searches subdirectories. (Unless there's a link inside somewhere
that points to another subdirectory somewhere.)
Cheers,
Chris