Re:Have I been pwned? Check if your email has been compromis...
by rmk2 on Wednesday December 04, 2013 @09:18PM
(#6852249)
This is not meant as criticism: Is there any particular reason for all the tr pipes? Is there any advantage to using tr instead of base64?
I essentially use the following:
base64 </dev/urandom | head -c $COUNT | xargs -0
Re:Have I been pwned? Check if your email has been compromis...
by thrill on Wednesday December 04, 2013 @09:30PM
(#6852296)
Criticism welcome. Yours is nicer.
Re:Have I been pwned? Check if your email has been compromis...
by jackalope on Wednesday December 04, 2013 @09:39PM
(#6852333)
I use this for a little more entropy:
LANG=C tr -dc "[:print:]" < /dev/urandom | fold -w 32 | head -n 1
Re:Have I been pwned? Check if your email has been compromis...
by andrewaylett on Thursday December 05, 2013 @08:40AM
(#6854291)
I much prefer using the program `pwgen`. It's installed on all my Linux boxes and it's available from Cygwin too, and it generates a 'pronounceable' password, which makes it a lot easier to remember and also much easier to copy.
There's also the benefit of fewer moving parts -- with a pipeline like that, I'd be worried about accidentally stripping out some of the randomness. I'm fairly confident that a simple invocation of `pwgen` will work.
I've gone to generating a unique password with a simple random number generator if the end site supports password recovery (in case Chrome's password memorizing system forgets it).
#!/bin/bash if [ $1 ] ; then a=$1 else a=16 fi dd if=/dev/urandom bs=1000 count=1 2>/dev/null | tr -d -c "[:alnum:]" | tr -d '`' | tr -d "'" | tr -d '"' | tr -d '\\' | head -c $a echo