Actually you've amost got the code Here's some pseudo:
New LDAP Object to make TCP/IP connection (1)
Authenticate (1)
New LDAP Object to make TCP/IP connection (2)
Authenticate (2)
It hangs at authenticate 2.
Yes the server supports simultaneous auths/binds etc. (Active Directory).
Thanks
Eric
----- Original Message -----
From: "Chris Ridd" <chr...@me...>
To: "Eric Nichols" <eni...@cp...>; "perl-ldap-dev"
<per...@li...>
Sent: Thursday, August 03, 2000 5:00 AM
Subject: Re: Simultaneous Authentications?
> Eric Nichols <eni...@cp...> wrote:
>
> > I'm trying to authenticate to 2 different servers at the same time.
> >
> > I can bind and authenticate to the first , but can only bind to the
> > second. The script hangs when it trys to perform the second
> > authentication. I am using a different variable for each bind ($source
&
> > $dest).
> > Help?
> > Thanks
> > Eric
> >
> >
>
> Hm, in LDAP binding *is* authenticating.
>
> The Net::LDAP::new method just creates a (TCP) connection to the LDAP
> server, it doesn't send any LDAP operations.
>
> The Net::LDAP::bind method does the authentication, using LDAP operations.
>
> Given the rest of your description then, you've effectively created 2 LDAP
> objects (via new), have bound using one object, but binding using the
> second object doesn't work.
>
> Something like this, in other words:
>
> my ($ldap1,$ldap2,$res1,$res2,$code1,$code2);
> $ldap1 = new Net::LDAP('server1') or die;
> $ldap2 = new Net::LDAp('server2') or die;
> $res1 = $ldap1->bind(dn => 'some dn', password => 'some pwd') or die;
> $code1 = $res1->code;
> die "Binding to server1 failed ($code1)\n" if $code1;
> $res2 = $ldap2->bind(dn => 'other dn', password => 'other pwd') or die;
> $code2 = $res2->code;
> die "Binding to server2 failed ($code2)\n" if $code2;
>
> Which line does it hang at?
>
> Do you know if your LDAP server can support multiple binds from the same
> address?
>
> Cheers,
>
> Chris
>
>
|