3 ms·
Neat, I have the following in my `.bashrc` to accomplish pretty much the same thing. It should be noted that I do not use it for passwords (I have a password s
by ninjin 11y ago
Neat, I have the following in my `.bashrc` to accomplish pretty much the same thing. It should be noted that I do not use it for passwords (I have a password safe for that), but I do use it for passphrases since I may have to read them over the phone.
secret () {
# '\u' for `sed` is a GNU extension.
shuf /usr/share/dict/words \
| grep '^[A-Za-z]\+$' \
| head -n 3 \
| sed -e 's|\(.\)\(.*\)|\u\1\2|g' \
| tr -d '\n' \
| sed -e 's|$|\n|g'
}
> for _ in `seq 7`; do secret; done
InterweaveMakariosEncrusting
DisseminatingAgriculturalistCautioned
EffectuatingCobblersEgos
AccidentalKopeckRevolts
RefDivansUndersigns
SalesmanSubmitterFlak
TempsIlluminedQuickening
- StavrosK 11y agoGood luck reading "makarios" over the phone, though. You need a phonetically distinct alphabet, like the NATO alphabet, and entropy is very low there.
- ninjin 11y agoYour mileage may wary, but I have never had any issues reading them to the human operators. Security questions are bad policy anyway and I assume that they are less picky when hearing "SiloRepossessedTapir" compared to "SiloRepossessTapir", than for "Mary" to "Maria".
- StavrosK 11y agoWouldn't such a misheard phrase make the password you've set not match?