Please or
Try NowBuy Now

Locations of visitors to this page

SourceForge.net

SourceForge.JP

wrapper.ntservice.account Property
wrapper.ntservice.account Property

Configuration Property Overview

wrapper.ntservice.account

Compatibility :3.0.0
Editions :Professional EditionStandard EditionCommunity Edition
Platforms :WindowsMac OSX (Not Supported)Linux (Not Supported)IBM AIX (Not Supported)FreeBSD (Not Supported)HP-UX (Not Supported)Solaris (Not Supported)IBM z/OS (Not Supported)IBM z/Linux (Not Supported)

WARNING

DO NOT modify the value of this property while an application using the configuration file has been installed as a Windows Service. Please uninstall the existing service BEFORE modifying this property. The service with the new value can then be safely reinstalled later.

This property is only used on Windows platforms.

Account:

The account to use when running the service. Use an account name in the form: {DomainName}\{UserName}. If the account belongs to the built-in domain, then you may specify the name in the form: .\{UserName}. The default, blank value, will use the LocalSystem account.

Example:
wrapper.ntservice.account=.\leif

Password:

Most accounts will require a password to be set. See the wrapper.ntservice.password property for the various options specifying a password.

Error on Service Install:

When attempting to install the service, you will encounter the following message if the account name is invalid, does not exist, or the password for the account is incorrect. A common mistake is setting the account name to leif rather than .\leif.

Example of Error messasge on Service Install:
CreateService failed - The account name is invalid or does not exist,
or the password is invalid for the account name specified. (0x421)

Error on Service Start:

Only accounts which have their "Logon as Service" right set can be used to run a service. Failure to set this right will result in the following error message when you attempt to actually start the service:

Example of Error messasge on Service Start:

System error 1069 has occurred.

The service did not start due to a logon failure.

Setting Access Right:

To set the "Logon as Service" right, Go to the "Administrative Tools" folder in your control panel. Open the "Local Security Policy" applet. Expand "Local Policy" and then click on "User Rights Assignment". On the right side, you will find a "logon as service policy". Right click or double click to access its properties dialog, and then add the user that you wish to allow to run the service.

Note that the "Local Security Policy" applet does not appear to be available on Home Editions of Windows 2000 and XP. It is thus not possible to run a service as a specific account under those versions of Windows.

NOTE

The wrapper.ntservice.interactive property must be set to FALSE if the service is configured to run using a specific account in this property.

NOTE

Changes on this property will not take effect until the Windows Service is reinstalled.

It is possible to set account to alternative system accounts using one of the following values:

Example:
wrapper.ntservice.account=NT AUTHORITY\NetworkService
wrapper.ntservice.account=NT AUTHORITY\LocalService

Please see the Microsoft MSDN page for more information on the "Network Service Account".

Reference: Account





User Comments

If you notice something that is incorrect, missing, or simply feel that some part of this page could be explained better, feel free to log in and add a comment. You will need to register before you can log on.

Email:
Password:
by Dobes Vandermeer (2010/08/06 02:03:34 JST from 70.79.138.224)
Gravatar

Note that if you get the:

System error 1069 has occurred.
The service did not start due to a logon failure.

And your system doesn't have the "Local Security Policy" applet (such as in home editions of windows) you can open the service in the services control panel, set it to logon using the local service account, hit apply, the set up the user logon manually. The services panel will automatically grant the logon as service privilege to the user. Worked in Vista, anyway.

Note that it is probably possible for the Tanuki wrapper to use Windows APIs to enable this privilege using WMI, although those COM APIs can be a major pain to learn and use.

by ravi (2008/12/03 09:49:33 JST from 128.115.27.11)
Gravatar

If the 1069 error re-occurs, you may need to logout. I, however, restarted the machine. Then "SC delete MyService"; re-install-the-service and then still saw the same message. My fix was to set "wrapper.ntservice.password.prompt=true" and repeat from "SC delete" onwards.

Java Service Wrapper Version: 3.5.4