Re: SetPassword and ChangePassword Invoke
- From: "Joe Kaplan" <joseph.e.kaplan@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 14 Mar 2007 23:36:28 -0700
You can't get out of that state programmatically with ADSI using
ChangePassword. The problem is that you can't bind when your password is
set to "must change at next logon", so you can't get to the state where you
can actually do the change.
Win Logon has some special way that it handles this, but basically as far I
as know, you can't get the same behavior with ADSI. I'm not sure there is
any API you can call at all to do this.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"John Larsen" <larsenj@xxxxxxx> wrote in message
news:Xns98F3D1BA88B11larsenjmsncom@xxxxxxxxxxxxxxxx
Trying to set or change a password while the "User must change password at
next login." yields an error foo the same name.
This is a pure MS AD 2003 environement.
I am using C# as follows
DirectoryEntry DE = new DirectoryEntry
("WinNT://domainservername/username,user",username,password,Authenticate.Se
cure);
DE.Invoke("ChangePassword", new object[] {currentpassword, newpassword});
DE.Close();
I am getting a COMException on the Invoke.
Is there a differentway of doing this?
.
- References:
- SetPassword and ChangePassword Invoke
- From: John Larsen
- SetPassword and ChangePassword Invoke
- Prev by Date: Re: LDAP query...
- Next by Date: AD Disaster recovery Book/document publishing
- Previous by thread: SetPassword and ChangePassword Invoke
- Next by thread: command to check what dc authenticated client
- Index(es):
Relevant Pages
|