Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --sudo-service-user flag #589

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Add --sudo-service-user flag #589

merged 1 commit into from
Sep 28, 2023

Conversation

MikeMcQuaid
Copy link
Member

This flag allows setting the UserName for launchd plists when running as root. This means that launchd will drop privileges to the relevant user when starting the service.

This is significantly more secure than running services as root and enables a reasonable way to run systemwide services as unprivileged users.

This flag allows setting the `UserName` for `launchd` plists when
running as `root`. This means that `launchd` will drop privileges to the
relevant user when starting the service.

This is significantly more secure than running services as `root` and
enables a reasonable way to run systemwide services as unprivileged
users.
@SMillerDev
Copy link
Member

From all documentation I understood that Username didn't actually do anything for plists anymore. Are you sure this works?

@MikeMcQuaid
Copy link
Member Author

@SMillerDev I am 100% sure this works when run as root. My understanding of the UserName documentation changes it that it doesn't work when not run as root (which meets my testing experiences too).

@MikeMcQuaid MikeMcQuaid merged commit 8a29e18 into master Sep 28, 2023
5 checks passed
@MikeMcQuaid MikeMcQuaid deleted the sudo_service_user branch September 28, 2023 11:50
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants