BESClient Unix changes environment variables

Hello,

maybe some one knows how to handle that issue.
BESClient on unix redefine many and drops a lot of environment variables of root account (under which its process is running).
So everything executed inside action script inherits these environment variables of BESClient process, therefore many commands stop working (different PATH, LIB, LIB_, dropped m\w related variables) correctly.
Are there built-in possibility to say for “wait\run” to use root’s “original” environment variables ? I’ve not found needed combination “override wait” options to achieve my goal.

So today I’m using method “su - <user_name> -c commad” to load needed original users environments… but it’s enough painful to manage all cases with quotas and double quotas combinations.

Any another ideas to simplify “life” ?

It’s because BESClient is not running in a Login Shell so it doesn’t process many of Root’s dot_files.

Try

 Wait /bin/sh --login -c "whatever command"

No need for sudo, it’s already root.

2 Likes