I'm working in an environment that uses RHEL/CENTOS 5-7. I'm trying to migrate all crontab entries to rundeck. I'm using SSH to execute the scripts, and I have one user that has rights to sudo as service accounts I've dictated. Now to the question, I'm trying to run a script as an oracle user. I'm having issues with the shortened directory names such as $ORA_DAT being recognized while the script is running. If I was using CLI I would just su - oracle, but that's not an option while running the script through rundeck. Currently I'm running it as this: sudo -u oracle /oracle/local/scripts/refresh_config_files.ksh
What can I do to run this with the variables admins set up in the past?
[link][5 comments]