[DUG] IADsUser Change Password

David Moorhouse delphi at moorhouse.net.nz
Wed Jan 16 17:35:09 NZDT 2013


I've done something similar but ran into problems when I forced a 
password change at the next login. Some AD rules only allow one password 
change per day !

I'll look at some code tomorrow for you.

D

On 16/01/13 17:02, David O'Brien wrote:
>
> I am attempting to put together an easy way for users to change domain 
> password when they are out of the office, (or if they have a MAC).
>
> IADSUser.Setpassword(NewPassword) works, but doesn't do any checks.
>
> IADSUser.ChangePassword(OldPassword, NewPassword) checks that the old 
> password is correct but always fails the new password with "The 
> password does not meet the password policy requirements..." Doesn't 
> matter how complex I make the password.
>
> Note: I can change the password normally on the domain without a 
> problem, so I know the passwords I am trying to change to are complex 
> enough.
>
> Anyone played with this before?
>
> I am using:
>
> Var
>
> User: IADsUser:
>
> ADsOpenObject( 'WinNT://' + edtUser.Text, '[Administrator]', '[admin 
> password]', 1, IADsUser, User) ;
>
> User.ChangePassword(edtPass.Text, 'c0mpl!anse');
>
> Regards,
>
> Dave.
>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20130116/5517a326/attachment.html 


More information about the Delphi mailing list