What does the "Load OS Profile" option do?

Discussion created by Scott_Owens Employee on Jul 19, 2012
Latest reply on Oct 12, 2012 by MaryGreening
PAM internally creates a wrapper script which in turn calls user script (for Start Script operator) or user program (for Start Program operator).

When the option to “Load OS Profile” is unchecked, the wrapper script starts with
#!<shell> eg: #/bin/sh
When that option is checked, the wrapper script start with
#-<shell> eg: #-/bin/sh

If you run a simple script on the target machine, with
exit $?

exit $?

You will see the differences in the environment that is loaded and whether it would work for the use case you are trying to implement.

So with "Load User Profile" checked it uses #- instead of #! at the start of the script.