Best practices for holding passwords in shell / Perl scripts?

前端 未结 13 1192
逝去的感伤
逝去的感伤 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:47

    Keep them in a separate file, trivially encrypted, and make a separate user in the database with read only access to necessary tables. If you think the file has been read, then you can shut off access to just that user.

    If you want to get fancy, a SUID program could check the /proc//exe and cmdline (in Linux), and only then release the username.

提交回复
热议问题