Wrong credentials used for executing host OS script from 12 Grid Control
I am having what is a really basic issue I have not encountered before using Grid Control 12c to execute an OS script. The target host has both preferred and (global) named credentials that are used in the job specification. I use either with same result.
For example, I would like the simple test script below to reveal the user "john" as opposed to the user "agent" (the UNIX ID of the 12c Grid agent on the Linux SUSE 11 box):
echo User is $USER
The script is defined in the Grid Job creation library to use the named credentials for "john" - a valid unix user. However, the script output reveals "agent" for the result of echo $USER which is not what I am expecting.