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

Is it possible to interact with systemd system units as non-root user? (Authentication?) #425

Open
patrickjane opened this issue Jul 5, 2023 · 0 comments

Comments

@patrickjane
Copy link

I have my program running as non-root user, and I use NewSystemConnectionContext() to create a connection to systemd via dbus. I can query the status of services via GetUnitPropertiesContext(), however when I want to start/stop/restart something via e.g. StartUnitContext() I get the error: "Interactive authentication required."

Of course when working with the CLI one would normally just sudo systemctl start ..., however programmatically this is not possible. Does this library support any means of authentication whatsoever? I could not find any hints regarding this.

I want to avoid running my program as root as this would open up quite a few security issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant