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.
|
Copyright © 2010 CA.
All rights reserved.
|
|