[imp] ldap.php3 and w2k

pepito pepito@pitchnputt.dhs.org
Mon, 5 Mar 2001 00:50:16 +0100


Thank's Brent, it worked out really well.
Now everything works with the win2k ldap issue.

Marc.
----- Original Message -----
From: "Brent J. Nordquist" <bjn@horde.org>
To: <imp@lists.horde.org>
Sent: Wednesday, February 28, 2001 6:07 AM
Subject: Re: [imp] ldap.php3 and w2k


> On Tue, 27 Feb 2001, pepito <pepito@pitchnputt.dhs.org> wrote:
>
> > Hello, I was finally able to query a w2k active directory using
ldapsearch,
> > but I still can't figure out how to put this on the ldap.php3, specially
the
> > autentication part.
> > Here is a sample ldapsearch query that works:
> > ldapsearch -h win2kserver -D
"cn=Administrator,cn=Users,dc=domain,dc=com" -b
> > "dc=domain,dc=com" "mail=*" -W
>
> I have no experience with W2K... ActiveDirectory doesn't really require
> that you bind as administrator, does it?  Seems... extreme.  :-)
>
> > I have no idea on where to put the authentication part (-D) on the
> > ldap.php3 configuration file.
>
> Well, peeking at the code (imp/ldap.search.php3 on line 240) it appears
> that there's no support currently for supplying a bind dn and password.
> If the W2K server is the only LDAP server you care about, you could hard
> code it like this:
>
> ...
> $ds = ldap_connect($str_serv);
>
> >> $binddn = "cn=Administrator,cn=Users,dc=domain,dc=com";
> >> $bindpw = "password";
> >> if ($ds) $r = ldap_bind($ds, $binddn, $bindpw);
> else {
>    echo $lang->no_ldap_connection;
>    exit;
> }
> ...
>
> --
> Brent J. Nordquist <bjn@horde.org>
> Yahoo!: Brent_Nordquist / AIM: BrentJNordquist / ICQ: 76158942
>
>
> --
> IMP mailing list: http://horde.org/imp/
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>