I'm trying to hide the password when invoking a sqlplus session from within a perl script. The idea is to present a sqlplus (oracle) session as a certain login so that the person calling the script doesn't know what the password of the login being connected is.
So the caller invokes con.pl and it presents them with a sqlplus prompt having automatically logged them in .
The problem I have is that the resulting login/password information is displayed when using ps
I've seen various other suggestions about overcoming this in shell scripts but not from within perl.
$login = "a_user";
$passw = "a_user_pwd";
$instance = "MYINST";
$cons = "sqlplus -R 3 '$login/$passw@$server";
$cons .= " @ARGV";
$cons =~ s/;/\\;/g;
exec $cons;
This works and presents a sqlplus session as login a_user but I can see the password via a ps. I've tried padding out the command with blanks but this doesn't work. This is on unix and the sqlplus session cannot be authenticated via the OS method for various reasons beyond my control.
Does anybody have any ideas about how to overcome this problem ?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.