Re: How to bind to AD?
Chris Ridd <[email protected]> Sat, 13 Jun 2015 10:47:08 +0100
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Message-ID | <[email protected]> |
> On 11 Jun 2015, at 22:45, David Lee Lambert <[email protected]> wrote: >=20 > I know this question has been asked before, but maybe the=20 > answers were in response to differnt details... >=20 > I'm trying to write a script that compares data in an Oracle > database with Active Directory. So, it seems like I should be > able to use DBD::Oracle and Net::LDAP, but I can't seem to get > bind() to work. >=20 > I've reduced my non-working code to the following... >=20 > #! perl -w >=20 > use Net::LDAP; > my $ad =3D Net::LDAP->new('ad.**org**.com', debug =3D> 2) > or die "Couldn't connect to AD: $@, $!"; > $ad->bind('**tried lots of stuff**', password =3D> '**password**') > or die "Couldn't bind: $@, $!=E2=80=9D; I think what you=E2=80=99re checking here is a failure to either = construct the bind operation or send the bind to the server. But this *isn=E2=80=99t* the right way to check for bind failures. Binds = are just another LDAP operation which returns a result, so you should = check the result message like you do for search further down. This won=E2=80=99t solve your underlying problem with AD, but you might = get more of an idea what=E2=80=99s failing if you look at the bind = result. Chris=