Solved

Userid Passwd from a plsql code to shell script

Posted on 2011-03-17
4
510 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
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
oracle query help 36 82
query returning everything 11 87
Oracle -- identify blocking session 24 41
Oracle SQL Select unique values from two columns 4 23
Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

914 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now