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

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
 
K

Kevin Spencer

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
 
T

Tommy

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

Tommy,
 
C

Ching Liang

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top