Author: scott1101 | Posted on: 1/5/2009 9:39:37 PM | Views : 328

Hi all,

I am able to query AD users with the below code, but am having trouble finding an update example.

I need is to update a specified user's password and set to "change on next login" to true.  Any pointers/VB examples are greatly appreciated.

 

 

    Const pubDomain As String = "LDAP://mydomain"

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        Label1.Text = IsAuthenticated(pubDomain, txtUsername.Text, txtPassword.Text) & " " & Now()

   End Sub

    Protected Function IsAuthenticated(ByVal Domain As String, ByVal username As String, ByVal pwd As String) As Boolean
        Dim entry As New DirectoryEntry(Domain, username, pwd)
   &nb ...

Go to the complete details ...