Enterprise Manager Generic (MOSC)

MOSC Banner

Problems executing job as another user

edited Jun 6, 2016 11:20AM in Enterprise Manager Generic (MOSC) 2 commentsAnswered ✓

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:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center