Security of Environment Variables


Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
Old 05-11-2016
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  
Old 05-11-2016
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:
denden (05-11-2016)
# 3  
Old 05-11-2016
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:
denden (05-11-2016)
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 angshuman HP-UX 0 01-25-2014 05:45 AM
Environment Variables mahinkhan22 Homework & Coursework Questions 5 10-16-2012 11:14 PM
Environment Variables sai_2507 HP-UX 1 05-29-2012 03:43 AM
Reg. Environment variables ecearund Shell Programming and Scripting 0 05-23-2012 05:35 AM
Environment variables rwa25 Shell Programming and Scripting 5 04-28-2012 02:57 AM
Environment variables and cron orange47 Solaris 2 08-02-2011 05:26 AM
Environment variables sravani UNIX for Dummies Questions & Answers 6 10-20-2010 10:22 AM
using environment variables lassimanji Shell Programming and Scripting 2 04-29-2009 02:58 PM
environment variables radhika03 Shell Programming and Scripting 3 01-22-2007 12:58 PM
environment variables sumsin Programming 6 03-13-2006 10:17 AM
help..Environment variables... sekar sundaram UNIX for Dummies Questions & Answers 3 08-30-2005 03:35 AM
Setting up Environment Variables rpandey Shell Programming and Scripting 6 06-06-2005 09:28 AM
environment variables spavlov UNIX for Dummies Questions & Answers 3 08-20-2003 09:49 AM
environment variables Esaia Programming 2 02-20-2003 07:19 PM
what is the use of Environment variables indianguru UNIX for Dummies Questions & Answers 2 07-24-2001 09:41 PM