lastpass / lastpass-cli

LastPass command line interface tool
GNU General Public License v2.0
2.85k stars 290 forks source link

Windows: Automating CLI Login #627

Open ssnowman-veritone opened 2 years ago

ssnowman-veritone commented 2 years ago

Similar to https://github.com/lastpass/lastpass-cli/issues/597 I am trying to automate the Lastpass CLI login process, Our installation is running on a Windows 2012 R2 Server.

We have set environmental variable LPASS_DISABLE PINENTRY = 1 and then per https://stackoverflow.com/questions/64086272/how-to-automate-the-lastpass-cli-login-process I have executed echo [PASSWORD] | lpass login email@domain.com

I immediately receive a Failed to Enter Correct Password error, and can confirm it's an actual failure (as evidenced by my locking the account temporarily after several failed attempts in a short time).

At first I thought the pipe was having an issue with not escaping a character correctly. However, echo [PASSWORD] | cat displays the password just fine, and even using a different account with a password that is only alphanumeric characters still does not work.

Trying echo [PASSWORD] | lpass login --trust email@domain.com also does not work.

All of the results I found both here on Issues as well as general searching generally point to Linux installs. Is there something specific to the Windows distribution that I'm overlooking, or formatting incorrectly?