From: Chris R. <chr...@me...> - 2000-08-03 09:00:28
|
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 |