Re: Setting versus Changing Password



Ah, that sample was regular VB(script). In .NET, you are probably calling
the Invoke method like this:

entry.Invoke("SetPassword, new object[] {"newpass"});

instead do this:

entry.Invoke("ChangePassword", new object[] {"oldpass", "newpass"});

This is exactly what you do in AD, except that you need to do all of that
additional set up regarding password security requirements and such (unless
you are using SSL already in ADAM).

HTH,

Joe K.

"bcarson" <bcarson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:98921693-E52A-4B06-B1CF-F78D70C1B9C2@xxxxxxxxxxxxxxxx
> Joe,
>
> Thanks, but there doesn't seem to be a "ChangePassword" method on the
> DirectoryEntry class. Perhaps I should clarify that I am using C#? Can
> you
> point to any sample code that changes a password?
>
> Thanks,
> Bruce
>
> "Joe Kaplan (MVP - ADSI)" wrote:
>
>> Call ChangePassword instead and supply the old and new passwords. This
>> will
>> observe password policy.
>>
>> Note that generally only the currently authenticated user has rights to
>> change their own password.
>>
>> HTH,
>>
>> Joe K.
>>
>> "bcarson" <bcarson@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
>> news:3AB8D202-4B35-4DDD-BECC-C14526DED973@xxxxxxxxxxxxxxxx
>> >I have read and implemented a "SetPassword" routine as described in this
>> >MSDN
>> > topic:
>> >
>> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adam/adam/setting_user_passwords.asp
>> >
>> > However, it does not seem to care about password history - I can change
>> > the
>> > password to the same old password even though the policy doesn't allow
>> > this.
>> > I assume that the SetPassord is intended for use by administrators and
>> > there
>> > is some other way that should be used in code when a USER wants to
>> > change
>> > their password. Please clarify.
>> >
>> > Thanks!
>>
>>
>>


.



Relevant Pages

  • Re: How to change user account properties by ASP.NET?
    ... in which case you can just read the auth_password header. ... > Hi Joe, ... > logged User in ASP.NET for feed ChangePassword method? ... Administrators generally have rights to ResetPassword. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: How to change user account properties by ASP.NET?
    ... in which case you can just read the auth_password header. ... > Hi Joe, ... > logged User in ASP.NET for feed ChangePassword method? ... Administrators generally have rights to ResetPassword. ...
    (microsoft.public.de.german.entwickler.dotnet.asp)
  • Re: How to change user account properties by ASP.NET?
    ... in which case you can just read the auth_password header. ... > Hi Joe, ... > logged User in ASP.NET for feed ChangePassword method? ... Administrators generally have rights to ResetPassword. ...
    (microsoft.public.de.inetserver.iis.asp)