To use a low-privileged account as the service account for ServiceControl, the following should be considered:
Access control on queues
The transport connection string used by ServiceControl must enable access to the following ServicControl queues:
particular.
servicecontrol particular.
servicecontrol. errors particular.
(ServiceControl version 1.6 and above)servicecontrol. staging particular.
servicecontrol. timeouts particular.
servicecontrol. timeoutsdispatcher
In addition, the connection string must enable access to the configured audit and error queues and the corresponding forwarding queues. These are typical:
audit
error
error.
(optional)log audit.
(optional)log
If the connection string does not provide appropriate rights, the service will fail to start.
Url namespace reservations
The account under which the ServiceControl instance is running requires URL namespace reservations for the hostname and ports used by the instance. The reservations can be managed using the ServiceControl Powershell commands or from the command line using netsh.exe. For example, to add url reservation for http:\
to LocalService
account the following command can be used netsh http add urlacl url=http:/
.
For instructions on how to review and change the urls used by ServiceControl instance, refer to Changing the ServiceControl URI.
Filesystem paths
The service account running ServiceControl instance requires following filesystem level access rights:
Path | Rights |
---|---|
Executables (e.g. C:\ ) | Read |
Logs (e.g. C:\ ) | Write |
Database (e.g C:\ ) | Write |
Database volume (e.g. C: ) | Read Attributes |
Read attributes
access right is needed by ServiceControl to query for total and total free space on the volume.Performance counters
ServiceControl requires access to Windows performance counter infrastructure. As a result the service account needs to be a member of Performance Monitor Users group.
Testing the configuration
These methods confirm that the service account has sufficient rights:
- Configure the ServiceControl Windows service to run under the custom service account, start it and check the log files.
- Interactively run ServiceControl under the custom service account.
ServiceControl.exe
from the command line, it is important to use the same command line switches that are used when running the Windows service. The command line is visible from within the standard Windows Services user interface.Method 1: Running the service as a non-privileged user
- Open Computer Management.
- Change the service account to the custom user, provide the password and apply the change. The 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.
Method 2: Running the service interactively as a non-privileged user
To run the service this way, the custom service account must have rights to log on interactively on the computer.
- Log on to the computer with admin privileges.
- Switch to the appropriate domain and username.
- Issue the following command, entering the password when prompted:
For example
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 login rights. Normally this only occurs if the computer is configured as a domain controller or the system administrator has restricted login access using group policies.
1385: Logon failure: the user has not been granted the requested logon type at this computer.
Once login 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
ServiceControl.
with theexe --serviceName
parameter. 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.
ServiceControl.exe --serviceName=Particular.ServiceControl