It is currently Mon, 18 Nov 2019 22:18:42 GMT



 
Author Message
 hiding parameters in ps -ef list
Hello all,

I've written some shellscripts which are polling the database.
During the queries, de ps -ef lists gives the loginparameters,
=>> also the password <==
So any telnetter can read the DBA passwd from a ps -ef.
It's not likely some enduser knows the passwd to telnet to the
nodes, but ...just in case.... how to hide the parameters in my script?

S



 Tue, 01 Apr 2003 03:00:00 GMT   
 hiding parameters in ps -ef list

It depends upon the database interface utility that you are using.

Most utilities allow one to pass a password through redirection or with
environment variables.

If you must pass the password through a command line argument then,
yes I know this is a godawful kluge, make the password argument the
last argument and put 80 spaces before it.  The ps utility can only
read the first 80 characters of commands so at least it will be
"invisible" to ps.



 Tue, 01 Apr 2003 03:00:00 GMT   
 hiding parameters in ps -ef list

If the database you are talking about is Oracle, then do not supply a
userid/password on the command line and just embedd them either in a
here-document or in a sql script.

sqlplus /nolog <<-sqlEOF
connect user/pass
(....rest of script goes here...)
exit
sqlEOF

or

sqlplus /nolog @myscript
where myscript.sql is:

connect user/pass
(...rest of script goes here...)
exit;



 Tue, 01 Apr 2003 03:00:00 GMT   
 
   [ 3 post ] 

Similar Threads

1. Hiding parameters from ps -ef?

2. hiding parameters from ps -ef

3. How to hide the parameter from ps -ef

4. How do I hide commands from ps -ef

5. Program Parameters Not to Show in ps -ef

6. Hiding command line parameters from ps

7. Hiding procedure parameters from ps

8. ps -ef | grep ps

9. ps ea vs ps -ef


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software