I have a program that our customers have been using for years without
this problem occurring. I use LogonUser to verify the id and password.
I use LOGON32_LOGON_NETWORK to avoid any long delays. In this
particular case, LogonUser returns 0 and GetLastError is immediately
called to get the failure code. Unfortunately, it returns 0 so I have
no idea what LogonUser is unhappy about.
if (!LogonUser(work_entry.clntData.posid.szUser,
szDomain,
GetUserPassword(work_entry.clntData.posid.szUser),
LOGON32_LOGON_NETWORK, // wm20061108 - speed up the logon process
LOGON32_PROVIDER_DEFAULT,
&hUser)) {
int ret = GetLastError();
GetErrorMessage(errmsg);
nSts[0] = DEF_RTC_SECURITY;
nSts[1] = DEF_RC_NOSUCHUSER;
OASIDailyLog() << ZTimeStamp() << "ERROR: LogonUser failed for user "
<< work_entry.clntData.posid.szUser << " (" << errmsg << ")" <<
endl;
if (hUser)
CloseHandle(hUser);
return FALSE;
}
I have seen in the documentation where SE_TCB_NAME is supposed to be
set for the user id when using LOGON32_LOGON_NETWORK on Windows 2000
but this has never been a problem before and, in this instance, the
user is running 2003 Server. I would greatly appreciate it if anyone
could shed some light on this for me.
|
|
0
|
|
|
|
Reply
|
wallym (1)
|
12/18/2009 8:43:28 PM |
|