InterviewSolution
Saved Bookmarks
| 1. |
Solve : shell script? |
|
Answer» HI, I have a shell script where I show oracle user/password, see bellow: ORACLE_HOME=/oracle; export ORACLE_HOME ORACLE_SID=ddfsag; export ORACLE_SID export TWO_TASK=ddfsag PATH=$ORACLE_HOME/bin:$PATH export PATH sqlplus -s user/[emailprotected] << VALIDA whenever sqlerror exit 1 execute pc_web_kodak.gera_dts('061186938001023',53,null,null,'N'); VALIDA We have audited, then I NEED to hide password in shell script. Is there any way ? What do I do ? Thanks.I don't know about Oracle. With MySQL you can store the user password in a hidden file in the user's home directory, with tightly locked permissions. Is that an option? That would take the password out of the script. Who will be running the script? How many users have shell access to this server?HI robpomeroy, Yes, could be, I could store password out of script, but I don't how I can do. only one user, but the shell script will be at UNIX crontabI suggest you go hunting in the man PAGES for Oracle, looking for references to configuration, or passwords. Other than that, try an Oracle users' FORUM - they should be able to answer this QUITE easily for you.Hi robpomeroy, I have found a way for hide password using out of script, see: sqlplus /nolog @file.sql where file.sql : connect user/[emailprotected] But now, I would like to know: is there any way for encrypt the file ? Thanks a lot.In this kind of situation, encryption would not help. Ask instead, how do you ensure that no one else gets read access to file.sql?ok robpomeroy, how do I ensure that no one else gets read access to file.sql?chmod go-wrx file.sql |
|