Wir nutzen Cookies, um Ihnen eine optimale Nutzung dieser Webseite zu ermöglichen. Mehr Informationen finden Sie im Datenschutzhinweis. Wir nehmen an, dass Sie damit einverstanden sind, falls Sie diese Webseite weiter besuchen.

Ihre Cookie-Einstellungen
Ihre Einstellungen wurden aktualisiert.
Damit die Änderungen wirksam werden, löschen Sie bitte Ihre Browser-Cookies und den Cache und laden dann die Seite neu.

Die Checkmk-Konferenz #6 steht an! Regulärer Verkauf endet in . Tickets hier!

Werk #0928: runas: new plugin script to include and execute mrpe, local and plugin scripts as different user

KomponenteChecks & Agents
Titelrunas: new plugin script to include and execute mrpe, local and plugin scripts as different user
Datum2014-05-30 11:29:33
Checkmk EditionCheckmk Raw Edition (CRE)
Checkmk Version1.2.5i3
LevelProminent Change
KlasseNew Feature
KompatibilitätKompatibel - benötigt kein manuelles Eingreifen

With the new plugin runas you can configure additional include files and directories for mrpe, local and plugin scripts. You can also change the user context of each of these scripts. It allows non-root users to add additional scripts which might get executed with reduced permissions.

This check is configured with the configuration file runas.cfg. In a default installation this file is located within the Check_MK config directory under /etc/check_mk/runas.cfg.

The runas.cfg configuration syntax is as follow
[Script type] [User context] [File/Directory]

The Script type can be set to mrpe, local and plugin.
The User context represents the user. If you do not want to change the context set this field to "-"
Depending on the script type the third value points to a file or directory. The mrpe type requires a target file which contains the mrpe commands. Local and plugins types require are target folder, which contains the executable local and plugin scripts.

Here is an example configuration:

/etc/check_mk/runas.cfg
mrpe ab /home/ab/mrpe_commands.cfg
mrpe lm /home/lm/mrpe_commands.cfg
mrpe - /root/mrpe/extra_commands.cfg
plugin ab /var/ab/plugins
local ab /var/ab/local

Note:You need to set up the local and plugin scripts in different folders, because the line
plugin ab /var/ab/plugins indicates that all executable files within this folder are treated as plugins.