UseLinuxcommand to generate random passwords is a basicLinuxoperation function, and there are many forms of implementation, the specific use of the following:
1. generate random passwords using OpenSSL
The specific usage is as follows:
OpenSSL rand-base64 20
almost all Linux distributions include OpenSSL. We can use its random function to generate a random letter string that can be used as a password, with the following number, which is the length of the specified password.
2. generate a random password using urandom
The specific usage is as follows:
Strings/dev/urandom |TR-DC a-za-z0-9 | HEAD-C20; Echo
3. generate random passwords using dd
The specific usage is as follows:
DD If=/dev/urandom Bs=1 count=15|base64-w 0
using dd to generate a random password, we need to encode the result by Base64 so that it can be human readable.
4. generate a random password using md5sum
The specific usage is as follows:
Date |md5sum
the above is usedLinuxcommand generates random passwords, which can be generated using third-party tools, such asmkpasswd,RANDPW,Pwgen,SPW,GPG,Xkcdpassand so on, interested in can understand!
How do I generate random passwords using Linux commands?