LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-06-2006, 07:24 PM   #1
Swakoo
Member
 
Registered: Apr 2005
Distribution: Red Hat / Fedora / CentOS
Posts: 508

Rep: Reputation: 30
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?
 
Old 12-06-2006, 09:21 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
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?
 
Old 12-06-2006, 10:39 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to delete the file contents using shell scripts sharad Linux - Software 3 05-26-2006 11:44 AM
how to delete the contents of a file using shell scripts sharad Linux - Software 5 05-22-2006 05:22 AM
Deleting the lines from a file using shell scripts sharad Linux - General 1 05-22-2006 03:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration