I am trying to get a simple batch file located on a network share to run. Using the “run” command fails. Using the script command sometimes works but the status stays at “running”. I am told the system account does have access to this share. Is the system account the system account on the Bigfix server or the system account running the batch file? I also tried using the software wizard to put the batch file on the local machine but that did not work. It can’t be that hard. If I go the server I deploy to, connect the share and run the batch file, it works fine. What am I missing?
Action:
script “\sbfile02\folder\EE\Connections\Login-aspx\21\21_DOWNTIME_LoginAspx.bat” (action status always "running)
OR
run “\sbfile02\folder\EE\Connections\Login-aspx\21\21_DOWNTIME_LoginAspx.bat” (fails)
The batch file itself is below:
DEL “D:\Program Files\Company\STARS Enterprise 2.1\Site\Unsecured\login.aspx” /Q
This works perfectly from the run menu on the computer itself but not from Bigfix. I’ve narrowed it down to a permissions issue. Can you run a command as a different user? Not sure how to find the Bigfix “system account”.
Since the Bigfix agent runs as the local system account, it doesn’t have permissions to the share. There are several ways to fix this:
Use the software distribution wizard to include the script in the task itself.
Create a “null share” on a server and place your content in that share. See http://support.bigfix.com/bes/misc/null_session_share.html for more details. This works, but isn’t recommended for sensitive content since the null share is open to the world.
Another way it to use the RunAsCurrentUser utility to take advantage of the credentials of whoever is on the machine to get to the share. This approach can work very well in a structured environment or where managing kiosk-like machines where you know who is logged on and what rights they have. In a less structured environment, this may be difficult to pull off. For more info and the utility, see http://support.bigfix.com/cgi-bin/kbdirect.pl?id=392.