Internal documentation only
This page has been marked as draft.
Command format explaination
This is the most important thing that the GA 4.7 changes introduced:
The first argument in a command must either be an executable or a path to an executable (such as a script). Otherwise, the command will fail to execute. This behaviour was inconsistent between Netprobe and Gateway prior to v4.7.
The docs listed the command /bin/ls >> tmp.txt as something that would run on Netprobe but fail on Gateway on GA 4.6 and below. On GA 4.7 and above, both will fail. This aligns with what the document explains, as the first arg needs to be an executable.
Something like this:
fails because past the sudo command, things are being treated as sudo -u and then rcanillas /home/rcanillas/...) instead of being sudo -u rcanillas and then /home/rcanillas/....
This is where the client would need to review the use of concatenate, so that fields that should be arguments for a command become interpreted as such. The below works:
Since every arg after sudo is indicated to be concatenated, the resulting command to run is then sudo -u rcanillas /home/rcanillas/scripts/command-test.sh arg1, which is what is needed.
This can then be cleaned up by combining some fields:
The last field is “-u rcanillas /home/rcanillas/scripts/command-test.sh arg1”, and this ends up running the same command as the previous screenshot: sudo -u rcanillas /home/rcanillas/scripts/command-test.sh arg1.
NOTE: When working with the concatenate, ensure to include spaces in the fields. If the fields do not have spaces, then the resulting command will look something like sudo-urcanillas/home/rcanillas/scripts/command-test.sharg1, which will obviously not run. This can better be seen on the attached XML.