win32security.LogonUserEx

(PyHANDLE, PySID, str, dict) = LogonUserEx(Username, Domain , Password , LogonType , LogonProvider )

Log a user onto the local machine,

Parameters

Username : PyUnicode

User account, may be specified as a UPN (user@domain.com). This may also be a marshalled credential (see win32cred::CredMarshalCredential).

Domain : PyUnicode

User's domain. Can be None if Username is a full UPN.

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

Comments

Requires Windows XP or later

Accepts keyword args

Return Value

Returns access token, logon sid, profile buffer, and process quotas. Format of the profile buffer is not known, so returned object is subject to change.