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?
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".
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"
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
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 User Gave Thanks to gandolf989 For This Post:
1. The problem statement:
What is the mesg value set for your environment? If it is on, how would you turn off your current
session? How would you set it permanently?
3. The attempts at a solution :
Read Unix The textbook.
3rd chapter has many things like environment variables and... (5 Replies)
I have read tons of posts about how you can't set persisting environment variable in a child script of a shell and have it persist. The only way is to source a file as
% . <scriptname>
I am finding that true... but I know there is a way around it. I just don't know how. I worked for 6... (5 Replies)
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. (2 Replies)
hi,
I want to create a new EV(Environment Variable) through a c program and I done this thing through setenv() method. But the newly created EV is not permanent, i.e. when I exit from the program the EV also no longer lives. But I want to make it a permanent EV for the current user. Actually I... (6 Replies)
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... (3 Replies)
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 (2 Replies)