Generate password and print to stdout?

Jason Banfelder jbanfelder at mail.rockefeller.edu
Tue Nov 14 14:58:49 CET 2017


One might also use something like…
   gpg --armor --gen-random 1 20
(depending on your install, the command might be gpg2).
Since pass uses gpg under the hood, this is likely to be installed already.

But, beware this warning from the man page: "don't  use this command unless you know what you are doing; it may remove precious entropy from the system!"

--Jason


From: Password-Store <password-store-bounces at lists.zx2c4.com> on behalf of Alan Orth <alan.orth at gmail.com>
Date: Tuesday, November 14, 2017 at 8:54 AM
To: Till Schäfer <till2.schaefer at tu-dortmund.de>
Cc: "password-store at lists.zx2c4.com" <password-store at lists.zx2c4.com>
Subject: Re: Generate password and print to stdout?

Yeah, I've got a shell function that does something with /dev/urandom as well. I guess I was just trying to clean up my shell's config a bit but I'll just keep using that function. Here's mine:

< /dev/urandom tr -dc 'A-Za-z0-9!"#$%&'\''()*+,-./:;<=>?@[\]^_`{|}~' | head -c 25 ; echo

By the way, pass hasn't used pwgen since the release of 1.7 in February, 2017.

Thanks,

On Tue, Nov 14, 2017 at 3:00 PM Till Schäfer <till2.schaefer at tu-dortmund.de<mailto:till2.schaefer at tu-dortmund.de>> wrote:
Hi,
there is a standard unix tool for this purpose: pwgen

Regards,
Till

On Dienstag, 14. November 2017 13:51:26 CET b3yond wrote:
> pass can't do this, as it can't use files as output which are outside
> .password-store.
>
> you can use this command instead for a 32 length alphanumeric passphrase:
>
> cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
>
> I hope this helps :)
>
> b3yond
>
>
> On 14.11.2017 13:21, Alan Orth wrote:
> > Hello,
> >
> > I'm wondering how to make pass print a generated password to stdout.
> > Sometimes I need to generate a password that I don't want or need to
> > store. It would be nice if I could just use pass generate for that.
> > Currently it seems that the "pass-name" argument is mandatory.
> >
> > Thank you,
> >
> > Alan Orth
> > alan.orth at gmail.com<mailto:alan.orth at gmail.com> <mailto:alan.orth at gmail.com<mailto:alan.orth at gmail.com>>
> > https://picturingjordan.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__picturingjordan.com&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=jfFJSFF7c6hadZvzAzchJQCRhIJliQexx0MdWBNFzJg&e=>
> > https://englishbulgaria.net<https://urldefense.proofpoint.com/v2/url?u=https-3A__englishbulgaria.net&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=naLerl_wuU8XXVNVzDVoQbvktpgRNEdK9TIqU6yDdXM&e=>
> > https://mjanja.ch<https://urldefense.proofpoint.com/v2/url?u=https-3A__mjanja.ch&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=nZTDY0j0WSmJY51y3nezU0I52gE3j29-iciRuUnP6Bk&e=>
> >
> >
> >
> > _______________________________________________
> > Password-Store mailing list
> > Password-Store at lists.zx2c4.com<mailto:Password-Store at lists.zx2c4.com>
> > https://lists.zx2c4.com/mailman/listinfo/password-store<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.zx2c4.com_mailman_listinfo_password-2Dstore&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=_28Epr0xeBsJ3Uw1lxh1Ykxc7gQSR5NJpGiKg4yJHk0&e=>
>
>


--
Dipl.-Inf. Till Schäfer
TU Dortmund University
Chair 11 - Algorithm Engineering
Otto-Hahn-Str. 14 / Room 237
44227 Dortmund, Germany

e-mail: till.schaefer at cs.tu-dortmund.de<mailto:till.schaefer at cs.tu-dortmund.de>
phone: +49(231)755-7706<tel:+49%20231%207557706>
fax: +49(231)755-7740<tel:+49%20231%207557740>
web: http://ls11-www.cs.uni-dortmund.de/staff/schaefer<https://urldefense.proofpoint.com/v2/url?u=http-3A__ls11-2Dwww.cs.uni-2Ddortmund.de_staff_schaefer&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=-Zgyqi5AQ6qrSuCjRRRrGVhbMu5Pi9z4eQOakhFBANc&e=>
pgp: https://keyserver2.pgp.com/vkd/SubmitSearch.event?&&SearchCriteria=0xD84DED79<https://urldefense.proofpoint.com/v2/url?u=https-3A__keyserver2.pgp.com_vkd_SubmitSearch.event-3F-26-26SearchCriteria-3D0xD84DED79&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=dxniFphgupwtcy-eFnH7tPr6lobt1lKI8QgJwuVt2zI&e=>
_______________________________________________
Password-Store mailing list
Password-Store at lists.zx2c4.com<mailto:Password-Store at lists.zx2c4.com>
https://lists.zx2c4.com/mailman/listinfo/password-store<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.zx2c4.com_mailman_listinfo_password-2Dstore&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=_28Epr0xeBsJ3Uw1lxh1Ykxc7gQSR5NJpGiKg4yJHk0&e=>
--

Alan Orth
alan.orth at gmail.com<mailto:alan.orth at gmail.com>
https://picturingjordan.com<https://urldefense.proofpoint.com/v2/url?u=https-3A__picturingjordan.com&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=jfFJSFF7c6hadZvzAzchJQCRhIJliQexx0MdWBNFzJg&e=>
https://englishbulgaria.net<https://urldefense.proofpoint.com/v2/url?u=https-3A__englishbulgaria.net&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=naLerl_wuU8XXVNVzDVoQbvktpgRNEdK9TIqU6yDdXM&e=>
https://mjanja.ch<https://urldefense.proofpoint.com/v2/url?u=https-3A__mjanja.ch&d=DwMFaQ&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=Nq9MEQIGIz5_QtqsbYm6aRB_AaOOhCs4C_VhqZVvSdA&m=PkUeK-GOmLDsv6FXIB3j-16JNBQUQfZwyAhXiwA_5aY&s=nZTDY0j0WSmJY51y3nezU0I52gE3j29-iciRuUnP6Bk&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/password-store/attachments/20171114/ad456375/attachment.html>


More information about the Password-Store mailing list