Solved

Userid Passwd from a plsql code to shell script

Posted on 2011-03-17
4
519 Views
Last Modified: 2012-05-11
I submit a job using dbms_scheduler which invokes a shell script that connects to database.
I pass the userid and password to shell script as arguments via the job.
But when I do ps - ef ... I can see the username and password being displayed on screen...

I have two questions:
1. What should I do to avoid the display of password by executing ps -ef .
2. As I am already connected to the database, can I directly send the user id and password to shell without specifying it manually.. i.e. Currently I send the user id and password hardcoded in my job arguments... If the password changes in future, I need to change my code too.. Is there a way where I do not have to send the hard coded user id and password from plsql.
0
Comment
Question by:sanpradeep
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Expert Comment

by:MrNed
ID: 35163021
I usually have a config file stored somewhere securely on the server with username/password/database combinations to be used for scripts. I can have a common function to extract it in your profile script and every other script can retrieve them as needed - nothing shows up on the command lines.

Of course if you dont/cant secure the file properly, there's not much point.
0
 

Author Comment

by:sanpradeep
ID: 35163814
You mean to say that there is no way we can find out the password of the current connected session by querying any dictionary view..
0
 
LVL 7

Accepted Solution

by:
MrNed earned 500 total points
ID: 35163937
No, definitely not. You can get a hashed version of it (http://www.lifeaftercoffee.com/2005/08/23/oracle-password-hacks/), but that is not enough to re-connect with.
0
 

Author Comment

by:sanpradeep
ID: 35173906
Thanks for clarifying...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows how to recover a database from a user managed backup

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question