Changing User Passwords with ADSI & ASP

Changing User Passwords with ADSI & ASP

Post by pscln » Thu, 08 Mar 2001 09:01:20

I am trying to allow users to change their passwords via a web interface.  I
am using the ChangePassword method and need some more functionality out of
it.  Namely, how to error trap when the Old password from the form does not
match the actual old password.  So far, I can change the password like this:

Set oUser = GetObject("WinNT://Win2000Domain/" & Request.Form("Username")
oUser.ChangePassword "my_old_password", Request.Form("NewPassword")

What I want is this:

Set oUser = GetObject("WinNT://MYDomain/" & Request.Form("Username")
oUser.ChangePassword Request.Form("OldPassword"),

with the ability to say: "Your old password is incorrect. Please try again"

I'm running IIS 5 on Win2000.

Thanks for any help,



1. Change User Password via ADSI & ASP

I am running NT 4.0 SP6 all Hot Fixes and the ADSI 2.5 Extensions.  From
a secure web page, I am attempting to allow my logged on users to change
their passwords, but the code keeps coming back with error '80005000'.
Looking the the help file it states that the Path is not found..  It is
the correct path, Pegasus is the Computer. (Note: the > is to prevent
word wrapping):

Can anyone give a hint to why this is failing, or is there additional
steps necessary to complete this task?



Steve Topilnycky            
Top Cat Computing

2. TMS320F241 free dev tool wanted

3. Error changing password using ASP & ADSI

4. Executor 1.99n and Wordperfect?

5. Enabling users to change their password via web page (ASP/ADSI)

6. ISO9660 file support

7. ASP/ADSI Page to Change passwords

8. M2K2 Question

9. ASP/ADSI change password in AD

10. Setting password on New Account with ADSI & ASP

11. Verify user password with ASP/ADSI

12. How can I change a user's ActiveDirectoryWin2000 properties via ASP using ADSI?

13. Private Website - ASP Page to change user passwords