[MDEV-19949] [Enhancement] mariabackup option of '--password' or '-p' without specifying password in commandline Created: 2019-07-04  Updated: 2023-08-01

Status: Open
Project: MariaDB Server
Component/s: mariabackup
Fix Version/s: None

Type: Task Priority: Major
Reporter: Kwangbock Lee Assignee: Unassigned
Resolution: Unresolved Votes: 3
Labels: None

Issue Links:
Relates
relates to MDEV-31809 Automatic SST user account management In Review

 Description   

Hi.

During mariabackup testing, I realized that for the option of "--password" I had to specify password in the commandline together.
If I use the option only without password, It says it requires a argument.





















[root@maria-master full]# mariabackup --backup --target-dir /tmp/full -uroot -p
mariabackup: option '-p' requires an argument





















For security purpose, It would be great that we just get the password input in next commandline like the other client tool does.

Great thanks,
Kwangbock



 Comments   
Comment by Geoff Montee (Inactive) [ 2019-07-12 ]

As a workaround, you can add the user name and password to ~/.my.cnf. e.g.:

[mariabackup]
user=mariabackup
password=mypassword

See here:

https://mariadb.com/kb/en/library/mariabackup-overview/#authentication-and-privileges

Comment by Richard Lane [ 2020-07-27 ]

I would like to also vote for this enhancement. We have strict requirements for not using passwords in command line and will not comply to DFSEC requirements without at least an environment variable to supply password vs. command line.

Geoff, the workaround is actually worse since it is in plain text in a config files, which is also a major violation. Even if the file has root+mysql read only permissions.

Generated at Thu Feb 08 08:55:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.