Unlock Options
You can use the --passwordenv <passwordenv>
or --passwordfile <passwordfile>
options with bsafe unlock
to retrieve your master password rather than enter it manually. For example:
To look for an environment variable BSAFE_PASSWORD:
bsafe unlock --passwordenv BSAFE_PASSWORD
If BSAFE_PASSWORD is non-empty and has correct values, the CLI will successfully unlock and return a session key.
To look for the file ~Users/Me/Documents/mp.txt
, which must have your master password as the first line:
bsafe unlock --passwordfile ~/Users/Me/Documents/mp.txt
If the file is non-empty and has a correct value, the CLI will successfully unlock and return a session key.
Warning
If you use the --passwordfile
option, protect your password file by locking access down to only the user who needs to run bsafe unlock
and only providing read access to that user.