3 ms·
Put this in your .bashrc: function rpass() { strings /dev/urandom | grep -o '[[:alnum:]\/!@#$%^&*()<>,.,{}]' | head -n $1 | tr -d '\n'; echo } Then
by IgorPartola 15y ago
Put this in your .bashrc:
function rpass() {
strings /dev/urandom | grep -o '[[:alnum:]\/!@#$%^&*()<>,.,{}]' | head -n $1 | tr -d '\n'; echo
}
Then run $ rpass 16 and get a 16 character random password with a fairly high entropy. Then just use a service like LastPass or a solution like KeePassX or even a single GPG-encrypted file to store your passwords. Problem solved.
Passwords are evil. Most of them should be treated the way you'd treat your private SSH or SSL key. Whenever you can eliminate a password and get the user to authenticate using a third-party identity provider, you are doing them a favor.
Edit: with 80 possible characters, you get 80^16 possible passwords: 10^19 years at 1000 guesses/second.
- yuvadam 15y agoActually LastPass has this option built-in. It can generate a strong password in-form and directly save it to your password vault. Very useful.
- IgorPartola 15y agoYes, but I prefer to generate the passwords on my own. I also use this to generate random passwords for root accounts (sudo FTW), etc.
- duck 15y agoIf you use KeePass there is no need for the script since it will generate one for you based on rules you can set.
- slug 15y agoor use pwgen , apg, etc
- parfe 15y ago1000? Try 600 million passwords a second. http://www.elcomsoft.com/lhc.html http://www.elcomsoft.com/lhc.html
- IgorPartola 15y ago80^16/(600 x 10^6)/(365 x 24 x 3600) = 10^14 years.