Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: [Q] about hiding command line password in UNIX
You can create ".myora" file (which has read permissions for yourself and no
other permissions). This would contain only two export statements (one if
you treat userid/passsword as one string). Introduce a call to this file in
your ".profile" (I am assuming Bourne / Korn shell) which looks like
". .myora"
Now if the variables exported were MYORAUSER and MYORAPASS
you would connect as sqlplus $MYORAUSER/$MYORAPASS
Good luck!
Rangarajan
(Almost Anonymous)
Poorna Prakash wrote:
> Hi Folks,
>
> When invoking SQL scripts with parameters (&1,&2...), from the operating
> system, I specify the parameters on the command line. Since some of the
> scripts have several 'CONNECT' statements, I pass passwords
> of user accounts.
>
> In Unix the command to check process information, ps -ef, displays
> the programs currently executing and there I see my program with the
> password, which I entered on the command line.
>
> Is there a way by which I could suppress, by specifying a password file
> which sqlplus executable will look for to match a user account. A very
> similar example would be, the command ftp which looks for file '.netrc'
> to connect to a remote machine when invoked using 'here documents', in a
> shell program.
>
> Any suggestion is very much appreciated. Thanks.
>
> -Poorna Prakash
> Oracle DBA
Received on Thu Mar 26 1998 - 00:00:00 CST