Previous Topic: Non-Root Event AgentNext Topic: Configure sudo


sudo and Message Actions

The message actions UNIXCMD and UNIXSH submit a command to a spawned UNIX/Linux shell. The following example shows how to integrate sudo into a message action for a non-root Event Agent. The sudo command is used to execute /usr/bin/touch as the specific user userNAME.

Command: /usr/bin/touch myfile

Command: sudo -u userNAME /usr/bin/touch myfile

The sudo command can be in the message action text field or in a shell script executed by the message action.