[LUNI] Help with bash script
Eric MacAdie
eric at MacAdie.net
Sun Feb 4 14:58:16 CST 2007
What about entering the password as an argument to the script?
Eric MacAdie
Samir Faci wrote:
> and if you do, make sure you chmod the hell out of that file so no one
> besides you can read it.
>
> putting passwords in plain text always makes me nervous.
> --
> Samir
>
> On 2/4/07, Constantin Gavrilescu <costi at rcn.com> wrote:
>> Stephen Boulet wrote:
>> > I'd like to write a script to backup my important linux files to my
>> > macintosh:
>> >
>> > rm -f tracks.sql mahler_backup.tar.bz2
>> > mysqldump --add-drop-table -u root -p --opt tracks > tracks.sql
>> > tar -cpfj mahler_backup.tar.bz2 /usr/local/share/moin tracks.sql
>> >
>> > The middle step needs for me to enter the password, and this is where
>> > I get stuck ...
>>
>> Change the middle row into:
>>
>> mysqldump --add-drop-table -u root -pyourpassword --opt tracks >
>> tracks.sql
>>
>> Where you replace yourpassword with your password :) You may chmod 700
>> the script for some (false) sense of security.
>>
>> --
>> Nu ne fac ei pe noi!
>> A+ Computer Services Corp.
>> http://www.apluscompuservices.com
>> --
>> Linux Users Of Northern Illinois - Technical Discussion
>> http://luni.org/mailman/listinfo/luni
>>
>
>
More information about the luni
mailing list