Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Unable to change AD password

I am trying to write a small application so users can change their passwords in our Active Directory domain remotely with Citrix. I found several code examples in various places for VB 6.0. Our test environment is using Windows 2003 Server implementation of AD. I am running the application on my workstation, Windows 2000 Server with local admin rights and permission to change passwords in AD.

The statement "objuser.ChangePassword strOldPassword, strNewPassword" causes the failure.

I can change the statement from objuser.ChangePassword to objuser.SetPassword and the users password gets changed.

When I run the program I get dialog with a run-time error of '-2147022651 (0x800708c5)';

"Automation error:
The password does not meet the password policy requirements, etc."

I found documentation of the ADSI and Win32 error codes. I found the error code in the lmerr.h file stating the password is too short. But its the same length as the old password.

I'm new to VB programming so not sure how to proceed. Any ideas where I can check for more information or any clues?

I did several searches here, MS KB and Google.

Thanks for any help you can provide,

kneese
[1263 byte] By [kneese] at [2007-11-11 7:14:30]