chocolatey / chocolatey/docs

Chocolatey Agent - Updates Around Running as Local System

Open
#189 0 comments 0 reactions 1 assignee Claimed by @ryanrichter94 View on GitHub
Documentation Enhancement
Dominant language
MDX
Stars
223
Forks
248
Avg merge
1d 26m
Merged PRs (30d)
4

Description

### Supported Scenarios:

It is possible and supported to set up Local System to run as the agent (and even the CCM Service). However one thing to keep in mind is that some software out there (Matlab being an example) will refuse to be installed under the context of Local System and must be installed by a local administrative user - there is no way for us to support this scenario due to the requirements of the software installer itself, so this is NOT supported by us should you run into this and you should see alternative methods of installation (noted below).

Recapping Supported Scenarios:
* Installation setup as Local System and running under Local System - supported 100%.
* Software that won't install under Local System having errors installing with the agent once you've set this up - NOT supported at all by us b/c we can't change the underlying software installation requirements of the software installer itself.
* If you run into any software that refuses to install under Local System, you may just need to explore a different way of installing those things:
* using choco directly with an administrator on the system
* using some other tool that also does not run under Local System

### Setup Items
You will need to make sure you address the following:
1. Ensure that your Chocolatey configuration has `useLocalSystemForServiceInstalls` enabled - best to be explicit about this `choco feature enable --name="'useLocalSystemForServiceInstalls'"`. Please see https://docs.chocolatey.org/en-us/configuration#access-control-security for more details.
1. You may or may not have to adjust configuration of other fields. Waiting for confirmation on this aspect. Other fields that may or may not require adjustment - https://docs.chocolatey.org/en-us/configuration#windows-services-installation. Consider this optional at the moment unless the next step errors and doesn't install under local system appropriately.
1. When installing the agent, add the following package parameter - `/UseDefaultChocolateyConfigUser`. Please see https://docs.chocolatey.org/en-us/agent/setup#package-parameters for details.

### Other Notes
> We have been under the impression that the chocolatey agent service must be ran as a user account that is a member of the Local Admin Group (text pasted below):

This is likely a misnomer for us and requires a documentation update - we count LocalSystem as a Local Administrator, even if it isn't explicitly in the Administrators group.

We should also provide an example scenario of how to set up the service to run under Local System.

## # References
* https://chocolatey.zendesk.com/agent/tickets/10731
* https://chocolatey.zendesk.com/agent/tickets/10598
* https://chocolatey.zendesk.com/agent/tickets/10623
* https://chocolatey.zendesk.com/agent/tickets/10791

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.