LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   Storing password used in shell scripts in encrypted file (http://www.linuxquestions.org/questions/linux-security-4/storing-password-used-in-shell-scripts-in-encrypted-file-508025/)

Swakoo 12-06-2006 07:24 PM

Storing password used in shell scripts in encrypted file
 
Hi guys,

I have a set of scripts which backup the database on a daily basis, and port them (using scp) over to another server for archival purposes.

Problem is in this script, I run the command 'mysqldump' to dump out the database, which also require me to provide -u and -p, which is in clear text.

other than specifying a chmod value of 711 for the file, is it possible to store the password required in another file and encrypt it so that if anyone chance upon it, its gibberish to them?

unSpawn 12-06-2006 09:21 PM

is it possible to store the password required in another file and encrypt it so that if anyone chance upon it, its gibberish to them?
And the password to decrypt the gibberish goes where?

anomie 12-06-2006 10:39 PM

Quote:

other than specifying a chmod value of 711 for the file
I think you mean 700, or at least 710. Unless you want anyone on the system to be able to run your db dump script.


All times are GMT -5. The time now is 10:46 AM.