On Sat, Jan 06, 2018 at 02:57:30 +0100, Marek Howard wrote: > export PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS="'"'"`' > > I want to forbid '"` characters in generated passwords mostly because it > screws up some generated configuration files. But even with this variable, I > can still occasionally see " and ' in generated passwords. > > [...] > > I'm using `pass generate foobar` to generate passwords.
PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS is the set of characters used to
generate passwords if you pass -n, --no-symbols. So there are two things
to note here:
1. You need to pass -n or --no-symbols to pass in order for
PASSWORD_STORE_CHARACTER_SET_NO_SYMBOLS to have any effect. The
equivalent variable for the unlimited character set is
PASSWORD_STORE_CHARACTER_SET.
2. You may want to specify characters you want to *keep*. Otherwise you
will end up with passwords like these:
""'''``""'"`"``"````'`'"`
However, I'm not sure if there is an elegant way to have the full set of
[:graph:] as understood by tr(1) *without* the specified characters (and
without changing the code to invoke tr(1) multiple times). So my best
guess here is something like:
PASSWORD_STORE_CHARACTER_SET='[:alnum:].,!?&*%_~$#^@{}[]()<>|=/\+-'
(note that the - should go at the end, to avoid nasty surprises)
signature.asc
Description: PGP signature
_______________________________________________ Password-Store mailing list [email protected] https://lists.zx2c4.com/mailman/listinfo/password-store
