Hello guys,
I see when I use SUDO with REX in an Errate installation or run a Command remote, Foreman/Katello uses SUDO without sh before the script, unfortunately in my company the SUDO template only allows execution prefixing “sh” before the script.
Look here the SUDO log (using REX):
Apr 28 20:53:13 : rexuser : command not allowed ; TTY=pts/1 ;
PWD=/home/rexuser ; USER=root ;
COMMAND=/var/tmp/foreman-ssh-cmd-235b2eeb-3f3a-4b14-ae9d-3e83d103449d/script
And here for example another attempt, using sh command before the script, it is allowed (executed manually in order to test):
Apr 28 20:57:33 : itbipat1 : TTY=pts/1 ; PWD=/home/itbipat1 ; USER=root ;
COMMAND=/usr/bin/sh /var/tmp/tempo-ssh-cmd.sh
My question here is, Is there a way to modify the template or the REX to prefixing the “sh” command?