PRB: Starting a Service Returns "Logon Failure" Error

Last reviewed: December 16, 1996
Article ID: Q120556
The information in this article applies to:
  • Microsoft Win32 Application Programming Interface (API) included with:

        - Microsoft Windows NT, versions 3.51 and 4.00
    

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

  1. In the User Manager application, choose User Rights from the Policies menu.

  2. In the User Rights dialog box, select the "Show Advanced User Rights" check box.

  3. Choose "Log on a service," in the "Right" scroll box.

  4. 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:

   ARTICLE-ID: Q132958
   TITLE     : How to Manage User Privileges Programmatically in Windows NT


KBCategory: kbprg kbprb
KBSubcategory: BseService BseSecurity
Additional reference words: 4.00


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 16, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.