in reply to perl, adsi, ADAM, and AD
die $result->error if $result->code;
From my experience with LDAP, I'd say to look at the $result->code ... Sure $result->error gives more info, but because every vendor gives slightly different messages, it can be harder to find help online.
I think what you're seeing is a code 49, which might be a bad DN or a bad password. (or the account's locked because you've failed too many times)
|
|---|