Obfuscating sensitive information in EXPORT commands


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Obfuscating sensitive information in EXPORT commands
# 1  
Old 09-18-2015
Obfuscating sensitive information in EXPORT commands

Hi.

Been a while since I posted last time, and I hope you all are doing well.
I'm automating a Data Integration process end to end using Shell programming over Linux 2.6x platform, and I'm accessible to Korn and Bash shells with provision to use Perl 5.1 also.
What we do as a common practice to make all global values available to all the scripts is to enlist all EXPORT commands for these in a single flat file(name of the file is global_variable.cfg) and invoke this file at the start of each script.

The structure of this file looks something like below:
Code:
export PATH=/usr/bin;/apps/scripts/DEV/
export INST_DEV=gtr_dev
export PWD_DEV=happy123
........


Since this flat file is accessible to all users configured to the system, how can I obfuscate only the sensitive details like database passwords of this file from any unintended user may not be able to track them even if he accesses the file? Also, how can I hide/obfuscate the database passwords from the sql prompts whilst the SQL queries are getting executed?

Any help is highly appreciated.
Please revert for further clarifications.


Thanks.
Moderator's Comments:
Mod Comment Dont forget code tags...

Last edited by vbe; 09-18-2015 at 08:59 AM..
# 2  
Old 09-18-2015
For sqlplus

Code:
sqlplus /nolog
conn user/password
@my.sql

Password will not be shown on ps output.

As for other problems, one should not keep passwords in plain text files, rather user oracle wallet or similar tool.

Regards
Peasant.
# 3  
Old 09-18-2015
Thanks for the quick response.
But the configuration file(which has all EXPORT commands) not only has DB passwords, but also passwords which are required to perform file SCP's.

For DB's, passwords can be saved in Oracle wallet, but what about the other passwords?

Please help.


Thanks.
# 4  
Old 09-18-2015
Why dont you use ssh keys to connect passwordless then since you are using scp...
# 5  
Old 09-18-2015
Quote:
Originally Posted by kumarjt
Thanks for the quick response.
But the configuration file(which has all EXPORT commands) not only has DB passwords, but also passwords which are required to perform file SCP's
How does that even work? scp doesn't take plantext passwords, you'd have to install an insecure brute-forcing tool to do that.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Solaris commands to retrieve chipset information

I need to know what are the commands in Solaris to retrieve the below information about the hardware platform. 1. Chipset information (information about various hardware controller cards on the mother boards, system BIOS versions, PCI firmware version etc..) 2. Serial number of the work... (2 Replies)
Discussion started by: rajujayanthy
2 Replies

2. Post Here to Contact Site Administrators and Moderators

Please remove sensitive data

Hi Kindly remove the following from the post . These are confidential info posted by mistake https://www.unix.com/shell-programming-and-scripting/201037-perl-while-loop-each.html please remove the comments section which is first 16 lines in the perl script . Also please remove the ... (1 Reply)
Discussion started by: ptappeta
1 Replies

3. Shell Programming and Scripting

Case sensitive in If loop .

Hi All, select app from the menu: ABC DEF GHI JKL ALL # ALL will select all the apps in the menu echo "Enter your option" read option; if then <execute the below command> elif # option is the 1 selection from menu...not ALL <execute the below command> else (14 Replies)
Discussion started by: Devaraj A
14 Replies

4. Solaris

nxge interfaces too sensitive ?

Hi all, I am writing this post in order to share my experience with the SUN nxge ethernet interfaces and try to see if some of you managed to solve similar issues than the ones we experienced here with T5520 running Solaris 10. First, we noticed that it was somehow difficult to have those... (5 Replies)
Discussion started by: fpraile
5 Replies

5. Solaris

export vs env vs set commands

Hi I'm trying to understand variable scopes in solaris10. It is said that to display env variables we use 3 commands : - env - set - export What is the difference between them ? thx for help. ---------- Post updated at 11:00 AM ---------- Previous update was at 10:50 AM ---------- ... (2 Replies)
Discussion started by: presul
2 Replies

6. UNIX for Dummies Questions & Answers

How to take parameters as non case sensitive

Is there a way for me to take a parameter then store it in a variable and use its value as non case sensitive? Ex. Lets say i have a parameter which contains "Hey". Then im gonna store it to GR using GR=$1. CL=/install/$GR.g How can i make GR non case sensitive so that the... (1 Reply)
Discussion started by: khestoi
1 Replies

7. UNIX and Linux Applications

Obfuscating mysql root password

I would like to set the root password for mysql databases installed on various machines connected within a network. These machines receive their mysql installation via a script that pulls the installation files from the server and starts installing. During installation I would also like to set the... (0 Replies)
Discussion started by: figaro
0 Replies

8. UNIX for Dummies Questions & Answers

export script commands with xterm

I am attempting to write a shell script that runs a program which generates data and then runs another program to plot the data. The problem is that I need the plotting to take place in a different terminal window that stays open after the plotting has finished. I have experimented 'xterm -e '... (1 Reply)
Discussion started by: chris2051
1 Replies

9. UNIX for Dummies Questions & Answers

Is Hostname Case sensitive ?????

Hello users, I have a question ? I was just wondering whether the hostname on unix systems are case sensitive. For example in the system which I work. ping TestHost and ping testhost gives me the same output i.e I get the reply from the remote host Is this applicable for all... (3 Replies)
Discussion started by: ajphaj
3 Replies

10. Shell Programming and Scripting

obfuscating shell scripts

Does anyone know of any tool(s) to obfuscate shell scripts for intellectual property protection purposes? My searches turned up one such tool for Perl but not for shell scripts. Thanks. (2 Replies)
Discussion started by: tabourje
2 Replies
Login or Register to Ask a Question