docker run --rm -it -v ~/.lpass:/root/.lpass returnpath/lpass
This container has a couple helper scripts for prompting for the master password:
bin/bash-askpass: Pass in a string for the prompt text to show, then it will read in your master password and echo it to STDOUT. This will be piped directly into
lpasswhen used as
bin/quiet-askpass: Same as
bash-askpassbut without the prompt. Intended for use when piping (bash PIPE functionality
|) the output to other commands. If you do not use this,
lpasswill attempt to read
PIPEwill attempt to read
STDOUTresulting in a deadlock.
To use either of the included
askpass scripts, simply set
LPASS_ASKPASS to the script name. For example:
# Prompts with: "Enter LastPass Master Password: " docker run --rm -it -v ~/.lpass:/root/.lpass -e LPASS_ASKPASS=bash-askpass returnpath/lpass show --password -G ".*my-item-regex.*" # Without prompt docker run --rm -it -v ~/.lpass:/root/.lpass -e LPASS_ASKPASS=quiet-askpass returnpath/lpass show --password -G ".*my-item-regex.*"
For more advanced usage, see the Official
lpass man page
This project is simply packaging and helper scripts for the
lpass tool. As such, nothing in this repository is "novel", or "non-obvious". This repo is therefore released under the GPL 2 to comply with the upstream project's license.
The upstream tools are released under various Open Source Licenses:
lpass" is released under the GPL version 2 or later with an exception for linking with OpenSSL.
- lpass source code for "
util.c" is released under the ISC License.
OpenSSL" is dual-licensed under the OpenSSL License and the SSLeay License.
The text of these tool's licenses are included here to avoid confusion.