Re: SetPassword and ChangePassword Invoke



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?


.



Relevant Pages

  • Re: Web Single Sign On
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... current Windows credentials to the server, ... This common identity is the user's username used to logon to the ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to Resolve SID(SSDL) to UPN or DomainUserId or GUID via ADSI
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... I want to convert SSDL to other type formatvia ADSI. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Problem establishing SSL connection in code-behind
    ... It appears that you have the correct audits configured on the machine. ... The 540 event is the logon ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Validating Old Passwords Before Changing Them
    ... Joe Kaplan-MS MVP Directory Services Programming ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... I'd like to write a custom logon control, and I've run into a snag ... Doing an LDAP Bind() fails with the current creds. ...
    (microsoft.public.windows.server.active_directory)
  • Re: LDAP user authentication error with VBScript from ASP
    ... ADSI code has this error. ... Windows authentication instead of forms auth in the first place. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... I've been using the below code in my ASP page to authenticate users ...
    (microsoft.public.windows.server.active_directory)