Problems executing job as another user
Hi,
Enterprise Manager 12.1.0.4
Targets here are the ODABASE for ODA x4 virtualized machines
In EM, I have a job in my library that should run under user "grid". When executed, it really runs under this user,
but when the script tries to use the environment variable $HOME, it points to /home/oracle instead of /home/grid.
Here is what I did to test it:
test.sh:
#!/bin/bash
echo "I am `whoami`"
echo "directory is `pwd`"
echo "my home is $HOME"
cd ~
pwd
. ~/.bash_profile
When run in an interactive shell, I get this:
login as: grid
grid@server's password: