noninteractive "pass insert" fails

Ernesto Alfonso erjoalgo at gmail.com
Fri Jul 27 18:13:13 CEST 2018


Thanks, that works.

Ernesto

On Fri, Jul 27, 2018, 7:59 AM Frank Thommen <f.thommen at dkfz-heidelberg.de>
wrote:

> Hello Ernesto,
>
> On 07/27/2018 04:32 PM, Ernesto Alfonso wrote:
> > Hi,
> >
> > I need to generate a numeric pin but pass seems to only support a yes/no
> > special characters flag.
> >
> > So I generate my own pin:
> >
> >      PIN=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c ${LENGTH})
> >
> > When I try to insert that into pass via standard in:
> >
> >      pass insert ${NAME} <<< $PIN
> >
> > I get exit status 1 with no error message, and no password is inserted.
> >
> > - How can I insert a password non-interactively?
>
> For me this works:
>
>      echo "$PIN" | pass insert --echo ${NAME}
> or
>      pass insert --echo ${NAME} <<<$PIN
>
> important is the "--echo"
>
>
> > - Alternatively, how can I generate a numeric pin with no alpha
> characters?
> > - Should pass provide an error message when it fails?
>
> It provides an appropriate exit status of >0.
>
> Cheers
> frank
> _______________________________________________
> Password-Store mailing list
> Password-Store at lists.zx2c4.com
> https://lists.zx2c4.com/mailman/listinfo/password-store
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20180727/7c3e90b0/attachment.html>


More information about the Password-Store mailing list