I am familiar with running the the scriptutil command from nsh. I have been successful using it under nsh on a Linux server to remotely execute shell scripts on other Linux servers.
I would like to use it on a Windows (2008R2) server to execute shell scripts on a Linux server. I have encountered two problems.
The first problem is the host file and sensor script seem to require fully path names when executing the command. For example:
WIN2008R2# cat hosts hosta.domain.com hostb.domain.com
WIN2008R2# cat test.sh
echo "this is a test running on host `hostname`"
WIN2008R2# scriptutil -f hosts -s test.sh
scriptutil: Unable to load hosts file hosts: No error
Usage: scriptutil [-d tmpdir] [-f file] [-h host] [-l]
[-o file] -s scan [-x arg]
BladeLogic security scanner
-? Output this message and exit
-d tmpdir Remote staging directory (default: /tmp)
-f file Name of file containing list of host to run scan against
-h host ... Add host to list of hosts to run scan against
-l List all scanners available and exit
-o file Name of output file (def: stdout)
-s name ... Name of scanners to run
-x arg Pass arg to sensor
Once I use a full path name, the scriptutil command only executes the shell script (scanner) on the fist host in the host file. All other cannot seem to locate the scanner. For example:
WIN2008R2# scriptutil -f /c/Users/jmorndorff-admin/hosts -s /c/Users/jmorndorff-admin/test.sh
Unable to copy script "/c/Users/jmorndorff-admin/test.sh" to host hostb.domain.com: No such file or directory
this is a test running on host hosta.domain.com
Linux hosta.domain.com 2.6.18-308.1.1.el5 #1 SMP Fri Feb 17 16:51:01 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
Can anyone give me a clue to better understand this behavior?