How do you generate passwords? [closed]

2019-03-08 03:52发布

How do you generate passwords?

  • Random Characters?
  • Passphrases?
  • High Ascii?

Something like this?

cat /dev/urandom | strings

30条回答
我欲成王,谁敢阻挡
2楼-- · 2019-03-08 04:28

I think it largely depends on what you want to use the password for, and how sensitive the data is. If we need to generate a somewhat secure password for a client, we typically use an easy to remember sentence, and use the first letters of each word and add a number. Something like 'top secret password for use on stackoverflow' => 'tspfuos8'.

Most of the time however, I use the 'pwgen' utility on Linux to create a password, you can specify the complexity and length, so it's quite flexible.

查看更多
走好不送
3楼-- · 2019-03-08 04:28

I used an unusual method of generating passwords recently. They didn't need to be super strong, and random passwords are just too hard to remember. My application had a huge table of cities in North America. To generate a password, I generated a random number, grabbed a randon city, and added another random number.

boston9934

The lengths of the numbers were random, (as was if they were appended, prepended, or both), so it wasn't too easy to brute force.

查看更多
Anthone
4楼-- · 2019-03-08 04:29

Having read and tried out some of the great answers here, I was still in search of a generation technique that would be easy to tweak and used very common Linux utils and resources.

I really liked the gpg --gen-random answer but it felt a bit clunky?

I found this gem after some further searching

echo $(</dev/urandom tr -dc A-Za-z0-9 | head -c8)
查看更多
forever°为你锁心
5楼-- · 2019-03-08 04:30

I use https://www.grc.com/passwords.htm to generate long password strings for things like WPA keys. You could also use this (via screenscraping) to create salts for authentication password hashing if you have to implement some sort of registration site.

查看更多
时光不老,我们不散
6楼-- · 2019-03-08 04:30

In PHP, by generating a random string of characters from the ASCII table. See Generating (pseudo)random alpha-numeric strings

查看更多
放荡不羁爱自由
7楼-- · 2019-03-08 04:31

Mac OS X's "Keychain Access" application gives you access to the nice OS X password generator. Hit command-N and click the key icon. You get to choose password style (memorable, numeric, alphanumeric, random, FIPS-181) and choose the length. It also warns you about weak passwords.

查看更多
登录 后发表回答