LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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: 27,005
Blog Entries: 54

Rep: Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763Reputation: 2763
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, Lubuntu, FreeBSD
Posts: 3,930
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration