Add the possibility to use sudo in all unix agents if Agent not running as ROOT
In larger companies and on customer servers it is common that on Unix systems 3rd party software like the Checkmk Agent can only be executed with a non root user. It would be therefor very helpful if you could execute the commands that need root with sudo instead.
You could place a variable $MK_SUDO in front of all commands that need root. If sudo should be used this variable could be filled via ENV (analogous to the other MK_ variables) with the corresponding "/bin/sudo" path.
If the variable contains the sudo path the command is executed with "/bin/sudo command -args", if the variable is empty the command is executed as before "command -args".
And list of required sudo rules in the documentation would also be very handy ;-)
Comments: 2
-
13 Apr, '24
Lars Sörensen MergedMake the account under which the Agent is running configurable within agent setup.
-
17 Apr, '24
Mohamed Saleh Admin"Run unix agents with non root account" (suggested by <Hidden> on 2024-04-13), including upvotes (1) and comments (0), was merged into this suggestion.
1