WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

ADSI
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Verifying User Credentials Against AD

 Keywords: Verifying User Credentials Against AD ADSi Active Directory User Account Password 

Question:

Is there a good way to check a users credentials against AD other than mapping a drive or Runing a program as a user? From within Windows a you cannot map a drive as another user if you are already connected to it so the map drive method of checking doesn't work, the runwithlogon method works but I'd like more control over which server I'm checking against if possible.

I was hoping there was an ADSI plugin to verfiy a users credentials to grant make sure the user is who they say they are then allow them to use different functions in the application based on the group they are a member of (this part I have working with wntMemberGet).

Answer:

Take a look at the ADSI Extender and 2 of its functions... dsSetCredent() & dsSetCredentx(), and then call one additional function in the extender to cause it to actually make use of those credentials when talking to a DC, which will validate the credentials. Something simple like the call to dsIsContainer() in the sample code in the help topic for dsSetCredent() will work.

Also... if you are going to be working with AD, it's better to do the group membership tests with the ADSI extender rather than with the wntMemberGet() function in the NT Extender.


Article ID:   W17539
Filename:   Verifying User Credentials Against AD.txt
File Created: 2012:02:03:09:17:48
Last Updated: 2012:02:03:09:17:48