Discuss UNIX and Linux computer and network security, cyber security, cyber attacks, IT security, and more.

Security of Environment Variables

👤 Login to reply

Thread Tools Search this Thread Display Modes
Old 05-11-2016
denden denden is offline
Registered User
Join Date: May 2016
Last Activity: 21 June 2018, 10:02 AM EDT
Posts: 1
Thanks: 2
Thanked 0 Times in 0 Posts
Security of Environment Variables


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?

Sponsored Links
Old 05-11-2016
vbe's Unix or Linux Image
vbe vbe is offline Forum Staff  
Join Date: Sep 2005
Last Activity: 16 July 2018, 9:56 AM EDT
Location: Switzerland - GE
Posts: 6,550
Thanks: 311
Thanked 564 Times in 526 Posts
maybe if you gave an example or be more clear in of what you are trying to do, we could give our comments...
The Following User Says Thank You to vbe For This Useful Post:
denden (05-11-2016)
Sponsored Links
Old 05-11-2016
gandolf989 gandolf989 is offline
Registered User
Join Date: Sep 2006
Last Activity: 9 July 2018, 10:48 AM EDT
Location: Pittsburgh
Posts: 263
Thanks: 4
Thanked 48 Times in 47 Posts
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".

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"

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.


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.
THIS_PWD=`grep "^user1:" | cut -d":" -f2`

The Following User Says Thank You to gandolf989 For This Useful Post:
denden (05-11-2016)
Sponsored Links
👤 Login to reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Environment Variables mahinkhan22 Homework & Coursework Questions 5 10-16-2012 11:14 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
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

All times are GMT -4. The time now is 03:17 PM.

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
Show Password

Not a Forum Member?
Forgot Password?