We have a secure file on the fs with the structure
#
SYS_ID=sys ;export SYS_ID
SYSTEM_ID=system ;export SYSTEM_ID
Called set_ora_passwd_{ORACLE_SID}.sh
And our shell scripts look like
#!/bin/ksh
# SET ENVIRONMENT VARIABLES
. /oracle/app/oracle/setdb_vant8i
. ${ID_DIR}/set_ora_passwd_${ORACLE_SID}.sh
SCHEMA1=SYS
PASS1=$(eval echo \$${SCHEMA1}_ID)
d=`date "+%Y%m%d"`
LOGFILE=/oracle/trash/sqlshell_$d.log
(
sqlplus -s /NOLOG<<EOSQL
connect $SCHEMA1/$PASS1;
show user;
exit;
EOSQL
) > ${LOGFILE} 2>&1
#END OF FILE
-----Original Message-----
From: Michael Porter [mailto:[Email Address Removed]
Sent: Friday, August 30, 2002 12:06 PM
To: LazyDBA.com Discussion
Subject: Re: Oracle passwords in shell scripts
We are considering storing passwords in the database and reading from
there into a variable to be used by the script(s) to get around
basically the same issue. I'm sure other had tried different
options...
>>> <James.D.[Email Address Removed] 08/30/02 11:15AM >>>
Hi all,
For security reasons, I am unable to use o/s authentication in my
shell
scripts when calling sqlplus. Anyone know a way to avoid hardcoding
them
in the script?
Thanks,
Jim
--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed]
Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
--------
Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
To unsubscribe: send a blank email to oracledba-[Email Address Removed] subscribe: send a blank email to oracledba-[Email Address Removed] the list archive: http://www.LAZYDBA.com/odbareadmail.pl
Tell yer mates about http://www.farAwayJobs.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page