Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

Running sqlplus from a unix shell script, how do I handle passwords?

SOLVED
Go to solution
wvsa
Regular Advisor

Running sqlplus from a unix shell script, how do I handle passwords?

Good afternoon all,
Currently we have a number of unix shell scripts that run sqlplus (see attached). In each of these scripts (see attached ${BASEDIR}/etc/rms_env) we source in and environment file which contains all the Oracle passwords. Well this is not good because the developers can break out of the script and low and behold the passwords are a part of their environment. Does anyone have a way to get around this, having the passwords for Oracle in the developers enviornment after the script is run? Should I create a subshell, or ? to remove the environment variables that contain the oracle passwords? Is there a better way to handle this?

Thankyou for your help.
3 REPLIES
harry d brown jr
Honored Contributor
Solution

Re: Running sqlplus from a unix shell script, how do I handle passwords?

Scott Dunkley
Regular Advisor

Re: Running sqlplus from a unix shell script, how do I handle passwords?

You could pass the passwords to the script when the script is called ie as $1.
Better to regret something you have done, than something you havn't
George A Bodnar
Trusted Contributor

Re: Running sqlplus from a unix shell script, how do I handle passwords?

If this is a single purpose account (batch, etc.) then you could make the account "externally authenticated" inside Oracle and you simply supply "/" for username and password to SQLPLUS.

Then you simply would control access to the UNIX account that is externally trusted and this will remove the need for passwords.