Solved

Userid Passwd from a plsql code to shell script

Posted on 2011-03-17
4
505 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.

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

708 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

19 Experts available now in Live!

Get 1:1 Help Now