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 ;
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 ;
My question here is, Is there a way to modify the template or the REX to prefixing the “sh” command?