Problem while changing password in ADSI

Problem while changing password in ADSI

Post by bask » Tue, 21 May 2002 22:15:24



Hi,
         Using IADsUser object to change the password in ADSI. The
code is in VC++. After changing the password the user is able to use
old as well us new password to log on, until the COM+ application is
restarted. How to prevent the user to use old password after changing
the password.

Thank you.

Regards,
Baskar

 
 
 

1. Password change using ADSI- weird problem

I am using ADSI to allow users to change  WinNT4 via a web browser. The
webpage used NTLM authentication

The problem is this...

If i log on as myself (administrator), the script executes and the users
password is updated.

If i log on as a user, i get an error message 80070005 (access is denied)
however...the password is updated anyway !!.

If the user does not have access to change the password, why does the
password change anyway ? if they do have permission, why do i get an error
being generated ?

Script is as below

oldpass = request.form("oldpass")
newpass = request.form("newpass")
username = request.form("username")

On Error resume next
Set UserObj = GetObject("WinNT://domain/computer/" & username & ",user")
UserObj.ChangePassword oldpass, newpass
UserObj.SetInfo
If err then
 If hex(err) = 80070056 then
          Response.write "Password not changed, Old password is incorrect"
 elseif hex(err) = 80070005 then
          Response.write "Password changed , Access is denied"
 else Response.write
          Response.write "Password Change Was Not Successful" & "Error:" &
hex(err)
 end if
Else
         response.write "Pasword successfully changed"
End If
Set UserObj = Nothing

I

2. Plotting a graph from a matrix

3. Changing a user password who has 'Change Password at next Logon' flagged

4. a 486dx4 the size of a business card (SVGA LCD)??!!??

5. Password change / Password file problem.

6. WTB Stock 68040 CPU card

7. ASP/ADSI Page to Change passwords

8. Bug tracking software (in perl)?

9. ADSI - WINNT change password

10. Erros trying to change WinNT password with vbscript and ADSI

11. changing password - ADSI-LDAP

12. Change User Password via ADSI & ASP

13. Changing a user's password with ADSI through a firewall