Security of Environment Variables


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Security of Environment Variables

Hello,

I'm trying to help a client with passing decrypted passwords into child processes. I just want to ask how secure (or not) it is to pass those decrypted passwords via environment variables?

Thanks,
denden
# 2  
maybe if you gave an example or be more clear in of what you are trying to do, we could give our comments...
This User Gave Thanks to vbe For This Post:
# 3  
The Oracle Import process can be a good example of this. If you put the password
in the command, then you can see it when you use the "ps -ef | grep impdp".

Code:
impdp system/change_on_install ...

But if you use the echo command and pipe to the impdp command, then you won't
see the password when you do "ps -ef | grep impdp"

Code:
echo "system/change_on_install" | impdp  ...

Another option would be to put a delimited text file under the ~/.ssh directory.
You can then grep for the line that you want and use the cut command to grab
the password.

~/.ssh/pw
Code:
user:this_pwd
user1:this_pwd
user2:this_pwd
user3:this_pwd

You script that needs a password would have the following. Including the carrot
and colon will make sure that the line starts with the username and does not
accidentally pick up more than one line if you have similar usernames. You do
need to make sure that each username is unique in the file.
Code:
THIS_PWD=`grep "^user1:" | cut -d":" -f2`

This User Gave Thanks to gandolf989 For This Post:
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Environment Variables
sai_2507
Hi Experts, Need your help in understanding the commands to setup the environment variables in hp-ux. Beleive need to use either set,setenv or export. I am confused between above three options, when to use which option? On command line, I have tried both set and setenv but couldn't...... HP-UX
1
HP-UX
using environment variables
lassimanji
say i define an environment variable in a particular script (upgrade.sh). my script is upgarde.sh and it calls another script try.sh. will this environment variable be accessible to try.sh also. if not how to I make environment variables global so that they can be used by any script.... Shell Programming and Scripting
2
Shell Programming and Scripting
environment variables
radhika03
Hi, If i have a variable set and exported in my pofile file will that variable be available in all shell scripts created. Thanks, Radhika.... Shell Programming and Scripting
3
Shell Programming and Scripting
help..Environment variables...
sekar sundaram
hi, 1). i would like to know what is meant by environment variables? 2). is the number of envi variables is a constant number for unix systems? 3). how to see the list of envi variables (and the values of the envi variables)in a single command? 4). if this questions were already asked...... UNIX for Dummies Questions & Answers
3
UNIX for Dummies Questions & Answers
environment variables
Esaia
Hi! How-to get the environment variables in GNU. getenv() only fetches the ones that you can find under export (not the ones under declare)... best regars .David... Programming
2
Programming