To allow a low-privileged account to function as the the service account for ServiceControl, the following should be considered:
For MSMQ, the ACL default for a queue allows Administrators full access. Switching to a low-privileged account requires modification of rights to give full control to the custom account. Assuming the name of the ServiceControl service is
particular. the ServiceControl queues names would be:
particular.(ServiceControl version 1.6 and above)
In addition the service requires rights to the configured audit and error queues and the corresponding forwarding queues. These are typically named:
If the service account user does not have appropriate rights, the service will fail to start.
If the ServiceControl configuration is manually changed to listen to an alternate URL, check that the URLACL assigned to the URI is valid for the new service account. For instructions on how to review and change the the URLACL, refer to Changing the ServiceControl URI
The installer will set the permissions to allow any member of the local Windows Users group to modify files in the embedded Raven DB directory. These rights can be changed manually to be more restrictive as long as the service account user retains modify rights. Note that manual changes to the ACLs may be lost during an upgrade or re-installation of ServiceControl.
These methods confirm that the user account has sufficient rights:
- Configure and start the service as the user and then check the log files.
- Interactively run ServiceControl as the user.
- Open Computer Management.
- Change the service account to the non-privileged user and password and apply the change. The user account will be given "logon as a service" privilege.
- Start the service and confirm that it started.
- Examine the log file to ensure that the service is operating as expected. If the service does not start and the log file does not indicate the issue, try Method 2.
To run the service this way, the user account must have rights to log on interactively on the computer.
- Log on to the computer with admin privileges.
- Substitute the appropriate domain and user name.
- Issue the following command, entering the password when prompted:
runas /user:MyDomain\MyTestUser cmd.exe
If the command returns the error below, then the user account cannot be tested this way without adjusting the logon rights. Normally this only occurs if the computer is configured as a domain controller or the system administrator has restricted logon access using group policies.
1385: Logon failure: the user has not been granted the requested logon type at this computer.
Once logon rights are granted:
- Ensure that the service is stopped.
- From the command prompt running as the service account, change to the ServiceControl installation directory and run
--serviceNameparameter. In the following example, the default name has been used. Check ServiceControl Management if unsure of the service name
- Examine the output and confirm that there are no critical errors.
- Shut down the console session.
- Start the service.
On service start up, the embedded RavenDB attempts to create Windows performance counters. This does not succeed and RavenDB performance counters are not available. This warning can be safely ignored.