Problem:
I am trying to accept a windows name and password, and verify that the combination is correct. I know that i cannot pull the password out, so i am trying to hand active directory both the username and password, to see if they are correct.
What i have so far:
I am using .Net 2.0 to query Active Directory. I have checking just the name correct, but i cannot find what the "filter name" is for password. I tried pass, password, pwd, but they didnt seem to work.
Actual Questions:
1.) what is the filter name of the password value.
2.) do i have to do anything to the password value, on my end, before i hand it to the Directory searcher?
Thank you,
-The answer to your problem may not be the answer to your question.
I am trying to accept a windows name and password, and verify that the combination is correct. I know that i cannot pull the password out, so i am trying to hand active directory both the username and password, to see if they are correct.
What i have so far:
I am using .Net 2.0 to query Active Directory. I have checking just the name correct, but i cannot find what the "filter name" is for password. I tried pass, password, pwd, but they didnt seem to work.
Code:
Dim search As New DirectorySearcher()
search.Filter = String.Format("(&(SAMAccountName={0})(givenName={1})(sn={2})(password={3}))", loginName, givenName, surName, password)
search.PropertiesToLoad.Add("cn")
search.PropertiesToLoad.Add("SAMAccountName")
search.PropertiesToLoad.Add("givenName")
search.PropertiesToLoad.Add("sn")
Dim result As SearchResult = search.FindOne()
If result Is Nothing Then
lblStatus.Text = "No Good"
Else
lblStatus.Text = "Yeah, it's there"
End If
Actual Questions:
1.) what is the filter name of the password value.
2.) do i have to do anything to the password value, on my end, before i hand it to the Directory searcher?
Thank you,
-The answer to your problem may not be the answer to your question.