LogonUser() fails on same domain


E

eagleeye

Hi
I am using VS2005 SP1 and using LogonUser() API

ASP.NET 2.0 , IIS 6 . Win2003 server SP2


If LogonUser(Username, _
Domain, _
Password, _
LOGON32_LOGON_NETWORK, _
LOGON32_PROVIDER_DEFAULT, token) = True then
return success

I have two test Win2003 Server on the same domain . Server A has the
Activedirectory
domain controller running and also a Web Server.

Server B is just a a web server but it has joined the same domain.


My purpose of doing this is to
1) Check that the user must change password at first login
2) Check that the expired password is VALID


On Server A, LogonUser can authenticate a user against the domain
controller.

On Server B , even though it is on the same domain , logonuser always
fails with
"unknown user name or bad password"


What must be done to get this to work?

The usual ValidateLogin() examples fail when the user's password is
set to 'Must change password at first login" Regardless if
the password is Valid.

Yes, I am able to make directorysearcher.findone() calls from Server
B.

I dont mind using some other function as long as I can VALIDATE
that the Expired password was correct. So I am forced to
use logonuser() ..

I hope there is an answer to this
Allan
 
Ad

Advertisements


Top