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

updated systemctl to have sudo in front to match #238

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

updated systemctl to have sudo in front to match #238

wants to merge 2 commits into from

Conversation

evanowen
Copy link

@evanowen evanowen commented Apr 11, 2019

Updated code to have systemctl have sudo in front. Was breaking on my hosts without it (ubuntu 16.04.5 LTS)

Now matches other lines too...
Line 340: sudo -S service
Line 349: sudo -S service

Updated code to have systemctl have sudo in front. Was breaking on some of my hosts without it (ubuntu 16.04)

Now matches other lines too
Line 340: `sudo -S service`
Line 349: `sudo -S service`
one more update with a sudo
@StevePC
Copy link
Member

StevePC commented Apr 11, 2019

Have you verified this won't cause a regression? there was work done in the past to remove sudo from as many commands as possible where it wasn't required...

@evanowen
Copy link
Author

To answer your question no. If someone somehow got systemctl running as a different user other than root without using sudo this might break their stuff.

However, I am not really sure off the top of my head if that's even possible to get this running without sudo or without making something really insecure. In our org we are using FreeIPA for auth and are using a zenmonitor user. Zenoss then goes into the system and runs the commands as sudo that we specified to gather all the system info. I feel like that's a pretty standard norm to not give a service account full reign over systemctl.

It looks like on like 340, and 349 you guys do pretty much the same thing with the service command as I am describing.

@K0HAX
Copy link

K0HAX commented Nov 20, 2019

Is there a way to create a Configuration Property to toggle this on or off, with the default being off?

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

Successfully merging this pull request may close these issues.

3 participants