The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Checking passwords - scripts bullz26 Shell Programming and Scripting 5 03-11-2008 05:21 AM
How to pass passwords to bash scripts? siegfried Shell Programming and Scripting 5 08-04-2006 02:59 PM
Connecting to Oracle through unix shell scripts guptan UNIX for Advanced & Expert Users 1 07-04-2005 09:16 AM
ORACLE from Shell scripts mohanprabu Shell Programming and Scripting 2 11-23-2004 09:11 PM
Unix passwords? wmosley2 UNIX for Dummies Questions & Answers 1 12-22-2003 06:22 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-13-2008
Registered User
 

Join Date: May 2008
Location: Philadelphia
Posts: 6
Oracle Passwords in Unix scripts

Hi
Most of the shell scripts I am dealing with have to connect to oracle database . The username password is stored in a environment file which sets the variables for username and password . Set user id do not work on AIX so users who will execute these scripts need to have read or execute permissions on these files . This makes these password available to a large group of people. What should be the solution to hide these passwords or these files from others users .
Regards
Cliffors
Reply With Quote
Forum Sponsor
  #2  
Old 05-13-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 734
FWIW, storing the password in an environment variable makes the information available to all users with access to a bsd ps on the box.

Are you able to use sudo? You could store the passwords in a central set of files, readable only by specific groups.

Create specific system users and allocate them to the appropriate groups.

You can then allow certain users to run your various scripts as the specific system users. Your script then goes and looks up the file in question for the DB and uses the password contained within.

This also gives you the ability to create a script for retrieving passwords inline for users with the appropriate rights (say admins only?) to use in _any_ script they want.

eg:
Code:
some_oracle_supplied_command -user `sudo -u orapass /usr/local/bin/get_the_username MY_DB` -pass ``sudo -u orapass /usr/local/bin/get_the_password MY_DB`
Reply With Quote
  #3  
Old 05-14-2008
Registered User
 

Join Date: May 2008
Location: Philadelphia
Posts: 6
Thanks for the reply . It seems that we do not have sudo .lslpp -L sudo does not show me any thing. The password files are read only by group and it has only one member who can execute the scripts. For ps issue we are changing the scripts so that passwords are piped to sqlplus while logging in .

Is sudo a special install . We have AIX 5.2
Regards
Reply With Quote
  #4  
Old 05-14-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 734
sudo is a third party tool, pretty widely used though so you shouldn't have too much trouble finding help on it if you need it.
Reply With Quote
  #5  
Old 05-15-2008
Registered User
 

Join Date: May 2008
Location: Philadelphia
Posts: 6
Thanks . I will look for it.
Reply With Quote
  #6  
Old 05-16-2008
kahuna's Avatar
Registered User
 

Join Date: Apr 2007
Posts: 148
Storing a password is a security problem. You may want to investigate Oracle OS authentication.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:18 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0