LogonUser strange behaviour

  • Thread starter Thread starter jesse
  • Start date Start date
J

jesse

Hi.
Suppose I have 2 accounts "domain\user1" and "machine\user2".
If I pass empty string "" as domain parameter to LogonUser, it succeeds for
both user1 and user2 accounts (domain and machine names are not included in
username parameter).
It is strange to me, because this behavior is not documented. SDK says I
must pass domain name or "." for local account or NULL for UPN names. There
is nothing about empty domain name.
May I use this feature to authenticate users when they haven't specified
domain name in their logon information? Or I need to obtain domain name that
local server belongs to, and pass it to LogonUser?
Maybe there are some domain policy setting that allow this?
I have this behavior on both Windows 2000 Advanced Server and Windows Server
2003.

Regards,
Jesse
 
Back
Top