in reply to perl, adsi, ADAM, and AD

I agree with jhourcle and shmem. As to what causes an error 49(bad credentials)? I think that the problem lies in the registry. From Microsoft's ADAM FAQs:

"When the computer running ADAM is joined to a workgroup, you must set the registry key HKEY_LOCAL_MACHINE\SYSTEM\Current\ControlSet\Control\Lsa\forceguest to 0. The default is 1."

In other words, if your computer is joined to a workgroup and the registry isn't reset to reflect that then you'll get the errors that you are getting. If you're not part of a workgroup, then it's probably a bad DN or password. See:

ADAM FAQs

For LDAP Error Codes see:

LDAP Binding Error Codes

Update: Here's a complete list of LDAP Binding Error Codes:

From Microsoft

And a clearer chart:

LDAP Error Codes

Replies are listed 'Best First'.
Re^2: perl, adsi, ADAM, and AD
by jrdepriest (Initiate) on Jul 25, 2006 at 15:43 UTC
    The error code is indeed 49.

    The system is a member of an Active Directory domain and not in a workgroup.

    The system I am working with is a Windows XP Professional SP1 system with Active State Perl 5.6 build 638.

    I will certainly dig through the charts listed.