Does anyone know what would be the minimum rights I would need to grant to a domain user account in order to run a windows service as that user?
For simplicity, assume that the service does nothing over and above starting, stopping, and writing to the "Application" event log - i.e. no network access, no custom event logs etc.
I know I could use the built in Service and NetworkService accounts, but it's possible that I may not be able to use these due to network policies in place.
Set it manually: Go to Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment. Edit the item "Log on as a service" and add your domain user there. Show activity on this post. Also you can use Service Security Editor for a GUI to configure all services.
While a service account rarely requires Domain Admin level rights, they often are over-privileged as an easy way to overcome any potentially unforeseen operation challenges that may impact service continuity.
The default user account on Windows under which services install is the "Local System" account. This account is fine for many Agent tasks, but there are some tasks that you might want to perform with your Agent that need different permissions than the Local System account has.
To see the Service permissions you can use the "sc" command from a Windows command-line prompt. To compare permissions for a particular Service, run it on two systems.
Two ways:
Edit the properties of the service and set the Log On user. The appropriate right will be automatically assigned.
Set it manually: Go to Administrative Tools -> Local Security Policy -> Local Policies -> User Rights Assignment. Edit the item "Log on as a service" and add your domain user there.
I do know that the account needs to have "Log on as a Service" privileges. Other than that, I'm not sure. A quick reference to Log on as a Service can be found here, and there is a lot of information of specific privileges here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With