C-Duv/sysadmin-scripts

duplicityBackup: MySQL password is present on the command line which is insecure

C-Duv opened this issue · 2 comments

The script uses the MySQL password in the command line which can make the mysql client trigger the following warning on STDERR:

Warning: Using a password on the command line interface can be insecure.

Script must be adapted to avoid using this insecure way of passing MySQL password (and then avoid the warning).

Possible solution, use the --defaults-extra-file option by writing, on the fly, a temporary .cnf file with MySQL credentials.

Usage:

--defaults-extra-file=/path/to/workingBasePath/service_name.cnf

Example file:

[client]
host     = localhost
user     = backup-user
password = secret

78f7281 should fix this problem.