Logging in user in Windows 2008 server using LogonUser fails on LogonType LOGON32_LOGON_SERVICE

Posted by Ofiris on Server Fault See other posts from Server Fault or by Ofiris
Published on 2012-11-13T07:34:05Z Indexed on 2012/11/13 11:06 UTC
Read the original article Hit count: 778

I am using LogonUser function to logon an account to Windows 2008 R2 server on a domain with clusterring.

When using LOGON32_LOGON_INTERACTIVE as LogonType, I successfully login.

When using LOGON32_LOGON_SERVICE as LogonType, Login fails, EventViewer says:

An account failed to log on. Logon Type: 5

Account For Which Logon Failed:

Security ID:        NULL SID
Account Name:       thename
Account Domain:     thedomain
Logon ID: 0x1009371c Logon Type: 5

Failure Information:
Failure Reason:     The user has not been granted the requested logon type at this machine.
Status:         0xc000015b
Sub Status:     0x0

Was not sure if its for superuser or stackoverflow (calling LogonUser from C# code), but I guess its some Windows server issue*.

EventID = 4625

Edit: Found that - 0xc000015b The user has not been granted the requested logon type (aka logon right) at this machine

Edit: Should be serverfault question...

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about uac