Well, this is definately getting closer. I implemented the following:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
SSPValidateUser("bvegi", "rubic", ""

End Sub
'The following two calls are used for ValidLogin function
<DllImport("C:\\WINNT\\System32\\advapi32.dll"

> _
Public Shared Function LogonUser(ByVal lpszUsername As String, ByVal lpszDomain As String, ByVal lpszPassword As String, _
ByVal dwLogonType As Integer, ByVal dwLogonProvider As Integer, ByRef phToken As Integer) As Boolean
End Function
<DllImport("C:\\WINNT\\System32\\Kernel32.dll"

> _
Public Shared Function GetLastError() As Integer
End Function
Shared Function ValidLogin(ByVal lsUsername As String, ByVal lsPassword As String) As Boolean
'The Windows NT user token.
Dim token1 As Integer
'The parameters for LogonUser are the user name, computer name, password,
'Logon type (LOGON32_LOGON_NETWORK_CLEARTEXT), Logon provider (LOGON32_PROVIDER_DEFAULT),
'and user token.
Dim loggedOn As Boolean = LogonUser(lsUsername, "", lsPassword, 3, 0, token1)
'Call GetLastError to try to determine why logon failed if it did not succeed.
Dim ret As Integer = GetLastError()
MsgBox(CStr(ret))
If Not loggedOn Then
Return (False)
Else
Return (ret = 0)
End If
End Function
However, when attempting the LogonUser call, it returns an error of 1134 (no privlidges) which I am assuming means I cannot perform the function as I (the user) do not have admin rights on the server.
This, unfortunately, blocks the impersination idea as well since we have to gain the user token by making this call prior to creating the impersination.
My thoughts are to impersinate the administrator during the routine if I can get around the "get current user token" problem.
ANy thoughts?