Best practices for holding passwords in shell / Perl scripts?

前端 未结 13 1205
逝去的感伤
逝去的感伤 2021-02-08 02:19

I\'ve recently had to dust off my Perl and shell script skills to help out some colleagues. The colleagues in question have been tasked with providing some reports from an inter

13条回答
  •  花落未央
    2021-02-08 02:46

    There is no good solution. You can obfuscate the passwords a bit, but you can't secure them.

    If you have control over your DB setup, you could try to connect by a named pipe (at least mysql supports that) without a password and let the OS handle the permissions.

    You could also store the credentials in a file with restrictive permissions.

提交回复
热议问题