Last post Aug 08, 2008 04:10 AM by enne87
Jul 27, 2008 10:25 AM|enne87|LINK
I've to develop a portal in ASP.net where a user can change his password. The password will be changed when the user types his old and two times his new password in textboxes. Furthermore, the password and username are stored on a ldap-server. The problem
is that the password is encrypted in the directory information tree, so I do not know how to compare the password the user has typed in the textbox with the password from the tree.
I hope anyone can help me.
Aug 07, 2008 10:54 AM|ssg31415926|LINK
There's a right way and a fudge.
If you're on .NET 3.5, you can use an System.DirectoryServices.AccountManagement.UserPrincipal which has a ChangePassword method. Nice. If not, then you can use DirectoryEntry.Invoke to call the ADSI ChangePassword function. I think you can also do it
The fudge is to attempt to authenticate using the supplied userID/password - if you succeed, you know they gave you the right password so you can let them change it.
Aug 08, 2008 04:10 AM|enne87|LINK
Ok, thanks much for your help :)