I have noticed that if i create a new Bladelogic NSH Script (3rd type option) with this content:
echo "DC = \"$DC\" >> /etc/sudoers
The related job run on a Linux Server always fails:
/var/tmp/stage/script_DBKey-SJobKeyImpl-2007518-1__a7e6784c-244c-4b66-93bb-e8572125ac97.2000283.1_format_disk.sh: line 10: unexpected EOF while looking for matching `"'
/var/tmp/stage/script_DBKey-SJobKeyImpl-2007518-1__a7e6784c-244c-4b66-93bb-e8572125ac97.2000283.1_format_disk.sh: line 11: syntax error: unexpected end of file
My scope is to understand if it's possible to modify the /etc/sudoers file with a Bladelogic script (i know that that entry doesn't mean nothing in the sudoers )
For sure the RSCD Agent is mapped to work as root so i don't have grants problem on Linux OS side.
this has nothing to do w/ bsa. you did not close your double quotes:
echo "DC = \"$DC\"" >> /etc/sudoers
is what you need.
you opened the double quotes before DC, then you enclosed $DC w/ escaped double quotes, and did not close the outside double quote.