CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    4

    API for changing passwords of domain users

    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

  2. #2
    Join Date
    May 2003
    Posts
    1
    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

  3. #3
    Join Date
    May 2003
    Posts
    1
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured