Click to See Complete Forum and Search --> : API for changing passwords of domain users
BFritzsche
April 9th, 2003, 01:38 AM
Do you know any API for deleting/setting a domain users password?
What I have to do is: From within a client (W2k) I have to change the passwords for domain users without knowing the old password, means: Couvering a part of the server's user manager. But all things must happen without any user interaction.
Thanks,
Bodo
albertl@ananzi
May 13th, 2003, 09:57 AM
Dim ouser As IADsUser
On Error GoTo Cleanup
Set ouser = GetObject("WinNT://DomainName/Username,user")
' Add code to securely retrieve the old and new password.
ouser.SetPassword ("Password")
Cleanup:
If (Err.Number <> 0) Then
Debug.Print ("An error has occurred. " & Err.Number)
End If
Set usr = Nothing
sacarle
May 13th, 2003, 11:07 AM
I'm looking for EXACTLY the same thing.
I need a way for admins to reset (change) a user's password without the hassle of connecting to that domain and using the user manager.
Specifically, they want a button on an existing application that will cause that application to pass a DLL (that I write) a username and domain. My application will then set that user's password to some pre-defined password and set that the user must change their password at next logon.
Can't wait to get some answers here. I've got NetUserChangePassword but that requires knowing the old password. Problem is that sometimes the users forget so our help desk doesn't even ask for it anymore.
Scott
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.