PRB: Starting a Service Returns "Logon Failure" Error
Article ID: 120556
Article Last Modified on 11/21/2006
APPLIES TO
- Microsoft Win32 Application Programming Interface, when used with:
- Microsoft Windows NT 3.51 Service Pack 5
- Microsoft Windows 2000 Standard Edition
- Microsoft Windows XP Professional
This article was previously published under Q120556
SYMPTOMS
Starting a service from either the Service Control Manager or from the
StartService API may return error 1069,
ERROR_SERVICE_LOGON_FAILED.
CAUSE
This error occurs if the service was started from an account that does not
have the "Log on a service" right.
RESOLUTION
An account can be granted the "Log on a service" right programmatically
or through the User Manager Application. Both of these methods are
described below.
User Manager Application Method
- In the User Manager application, choose User Rights from the Policies
menu.
- In the User Rights dialog box, select the "Show Advanced User Rights"
check box.
- Choose "Log on a service," in the "Right" scroll box.
- Choose the Add button to grant your account the "Log on a service"
right.
Programmatically Method
An account can also be granted the user right programmatically through the
Local Security Authority (LSA) API calls. For more information on this
topic, please see the following article in the Microsoft Knowledge Base:
132958
How to Manage User Privileges Programmatically in Windows NT
Keywords: kbapi kbservice kbkernbase kbsecurity kbprb KB120556