(imported comment written by nicoya91)
I don’t have any insight into this, but would like to echo that I’m having the same problem, only it’s not isolated to commands with redirection.
I’ve authored several custom fixlets that use varations of “wait rpm -i .rpm” or “run rpm .rpm”, no problems. Basic useradd or groupadd commands won’t work.
I’ve tried the following, thinking perhaps there were issues with paths or quotings,and I’ve tried them all with both “run” and “wait”:
wait /usr/sbin/useradd -c ‘bogus user’ -m -s /bin/false -G bogusgroup bogus
wait useradd -c ‘bogus user’ -m -s /bin/false -G bogusgroup bogus
wait useradd -c “bogus user” -m -s /bin/false -G bogusgroup bogus
wait groupadd bogusgroup
wait /usr/sbin/groupadd bogusgroup
Ironically, the client logs always report success:
At 13:04:24 -0600 - actionsite (http://:52311/cg
i-bin/bfgather.exe/actionsite)
Command succeeded wait /usr/sbin/groupadd bogusgroup (fixlet 14002)
Command succeeded wait /usr/sbin/useradd -c ‘bogus user’ -m -s /bin/false -G
bogusgroup bogus (fixlet 14002)
At 13:04:24 -0600 -
ActionLogMessage: (action 14002 ) ending action
I tried contacting BigFix support on this. Unfortunately the response was “We don’t support custom fixlets - try the forums”.
If I deploy the fixlet as a shell script instead of using the BigFix action language, works like a charm. It seems clear that there are limitations using run/wait with Unix/Linux systems. Just wish there was a way to find out what they are!