Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

Topic: Oracle on Unix/Linux >> protect shell script

Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property. You may review the entire Oracle Certification Program Candidate Agreement online Here.



  


 Title: protect shell script
 shikhu  Posted: Dec 28, 2007 05:28:03 AM

 Total Post: 84
 Joined: Jul, 2006






 Hi Linux gurus,

I want to protect the userid/password which is in my shell script .
How can I do that , plz. reply soon. Its Urgent !!!!!!!!

Thanx.


- Shikha Rani

 Vinod
Posted: Dec 28, 2007 11:24:49 PM  

 Total Post: 54
 Joined: Oct, 2007






 
Hi,

You can protect password from appearing in shell script by the below mentioned method

echo "Name : \c"
read Name
echo "Password : \c"
stty -echo
read Password
stty echo
echo ${username}/${Password} | sqlplus

Vinod


 Vinod
Posted: Dec 28, 2007 11:27:35 PM  

 Total Post: 54
 Joined: Oct, 2007






 
echo "username : \c"
read username
echo "Password : \c"
stty -echo
read Password
stty echo
echo ${username}/${Password} | sqlplus



 shikhu
Posted: Jan 07, 2008 02:05:52 AM  

 Total Post: 84
 Joined: Jul, 2006






 
Thanx. vinod,

but this has to be set up again when i closed that session ,i want to set it permanently .

Do u have any idea.


-shikha

 Vinod
Posted: Jan 07, 2008 05:57:42 AM  

 Total Post: 54
 Joined: Oct, 2007






 

The encrypted hash values of password can be passed as input in the script .Could you copy paste the script , will have a look .



 shikhu
Posted: Jan 07, 2008 06:32:20 AM  

 Total Post: 84
 Joined: Jul, 2006






 
Ya Vinod,
this is my file
exp.sh

exp username/password file=export_7108.dmp log=export_7108.log full=y

I want to protect this username and password, means nobody can see the userid and password by opening this file but he can execute it.


Thanx.



 Vinod
Posted: Jan 07, 2008 08:27:08 AM  

 Total Post: 54
 Joined: Oct, 2007






 
Hi
exp userid='/' file=export_7108.dmp log=export_7108.log full=y .. This will work in unix environment (with os auth and exp privs) . However if you would like to exp as sysdba then you can put it as '"/as sysdba"' as well .

Vinod

 Time Zone: EDT

  




Forum Rules & Description


Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user




 








Get FREE Magazines

Top 10 Forum User

  Murtuja Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Gopu Gopi327
  Gitesh Trivedi322
  Vinoth Kumar264
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software