PyHANDLE = LogonUser(Username, Domain , Password , LogonType , LogonProvider )

Attempts to log a user on to the local computer, that is, to the computer from which LogonUser was called. You cannot use LogonUser to log on to a remote computer.


Username : PyUnicode

The name of the user account to log on to. This may also be a marshalled credential (see win32cred::CredMarshalCredential).

Domain : PyUnicode

The name of the domain, or None for the current domain

Password : PyUnicode

User's password. Use a blank string if Username contains a marshalled credential.

LogonType : int

One of LOGON32_LOGON_* values

LogonProvider : int

One of LOGON32_PROVIDER_* values


Accepts keyword args

On Windows 2000 and earlier, the calling process must have SE_TCB_NAME privilege.