How to Code in VS.net to Change AD User's Password

  • Thread starter Thread starter Ching Liang
  • Start date Start date
C

Ching Liang

In my web application, I need to authenticate users to the AD and allow users to change the password. From my readings, I find out that I have to use DirectoryEntry class to authenticate the users with password. I do that OK. But I still cannot find a way to allow users to change the password. Can anyone help? Thank you.

Ching
 
Hi Ching,

The following tutorial includes a method for changing and saving a user
password through Active Directory. Note that the examples work with the
"WinNT" provider. If working with a domain Active Directory, you will need
to work with the "LDAP" provider.

http://www.15seconds.com/issue/020730.htm

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

In my web application, I need to authenticate users to the AD and allow
users to change the password. From my readings, I find out that I have to
use DirectoryEntry class to authenticate the users with password. I do that
OK. But I still cannot find a way to allow users to change the password.
Can anyone help? Thank you.

Ching
 
How about setting the new password to the DirectoryEntry object, and
then call the CommitChanges method.

Tommy,
 
I tried that and it did not work. I was hoping it would be that simple but it turned out not so. I am digesting Kevin's response. It seems that there are more security involved, such as impersonation.

Ching
 
Back
Top