Has anyone tried programming with the Active Directory Services Interface(ADSI)? I just want to be able to verify that my users exists on my network when they logon with their username and passwords? Any suggestions,links etc?
Thanks
Set oDomain = GetObject("WinNT://" & strDomain)
Set oUser = oDomain.Create ("user", strUser)
If (err.number <> 0) Then
'Users exists on domain because Create method has failed
ELSE
'Handle case for non-existent user here
End If
Set oDomain=Nothing
If the user exists in the domain, then the Create method fails. We check for this by examining the number property of the built in Err object. If the Err.number <> 0 then the user exists. Jamie Gillespie
j-gillespie@s-cheshire.ac.uk
Thanks. I have a few problems with this. Firstly, if someone types in a valid username without the correct password, it shouldn't let him in.
I'm not try to validate that the user exists on system but on a network. I'm running Windows 2000.
If you're wanting your application to actually authenticate the credentials that the user supplies, you can't use the WinNT provider if the user (of the current process) has already logged into the network. (Actually, I think there is a work-around, but the implementation is not very glamarous because it involves changing the user's password to a dummy, then setting it back). For more, see
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.