bug-parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU Parallel Bug Reports unmasked passwd with mysql in parallel


From: Hal Ebi
Subject: GNU Parallel Bug Reports unmasked passwd with mysql in parallel
Date: Fri, 22 Nov 2013 15:59:39 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0

Hi Ole,

parallel --version
GNU parallel 20130922

Recently I have been setting up parallel for pipelines to work with mysql and it runs these great. My problem is that when I list the running processes initiated by parallel (e.g. with ps or top), "parallel shows" the commands as they are run without masking the password for the mysql user. This is a problem as anyone with access to the server I am working on can freely see the connection parameters along with my password.

An example:
when I run mysql or mysqldump alone (not from parallel) the password is always masked out.
E.g.:
When I am running the following:

mysqldump --opt -h $DBHOST -P $DBPORT -u $DBUSER -p$DBPASS testdb1 > testdb1.sql

ps shows:

mysqldump --opt -h myhost -P 3306 -u testuser -px xxxxxx testdb1


when I try to do the same using the following command with parallel:

cat testlist | parallel -j 4 "mysqldump --opt -h $DBHOST -P $DBPORT -u $DBUSER -p$DBPASS {} 
> {}.sql" &

ps shows the following:

\_ perl /usr/local/bin/parallel -j 4 mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -p2AtP8!z {} > {}.sql \_ /bin/bash -c mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -p2AtP8!z testdb1 > testdb1.sql | \_ mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -px xxxxxx testdb1 \_ /bin/bash -c mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -p2AtP8!z testdb2 > testdb2.sql | \_ mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -px xxxxxx testdb2 \_ /bin/bash -c mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -p2AtP8!z testdb3 > testdb3.sql | \_ mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -px xxxxxx testdb3 \_ /bin/bash -c mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -p2AtP8!z testdb4 > testdb4.sql \_ mysqldump --opt -h Ris-lx06 -P 3306 -u testuser -px xxxxxx testdb4

Is there a way to make parallel to pass the passwords on silently to mysql?

Thank you.

Regards,
Hal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]