DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: How to check the password of any user of active directory group.

  1. #1
    Join Date
    Feb 2005

    How to check the password of any user of active directory group.

    In my vb application, the user will login as same as his windows username/password created in the active directory. I also create a separate group and add the users to use the application. Once logged in my application, I want to check the user name and password created for the user in active directory and also whether he is the member of my group.

    I had put reference of Active Directory in my vb application and checked the user and group but unable to check the password is correct or not. Can anyone tell how to check the password of a user in active directory is correct or not.

    Thanks and regards,

    Ramesh Siva

  2. #2
    Join Date
    Dec 2003
    See if the following works for you:

    Function ValidateUserCredentialsNT() As Boolean
    Dim objDSO As IADsOpenDSObject
    Dim objDomain As IADs
    Dim objSystemInfo As ADSystemInfo
    Dim strDNSDomain As String
    Set objSystemInfo = CreateObject("ADSystemInfo")
    strDNSDomain = objSystemInfo.DomainShortName
    Set objDSO = GetObject("WinNT:")
    On Error Resume Next
    Set objDomain = objDSO.OpenDSObject("WinNT://" & strDNSDomain, "userID", "password", ADS_SECURE_AUTHENTICATION)
    If Err.Number Then
        MsgBox Err.Description
        Exit Function
    End If
    ValidateUserCredentialsNT = True
    Set objDSO = Nothing
    Set objDomain = Nothing
    Set objSystemInfo = Nothing
    End Function
    Microsoft MVP (Visual Basic)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center