How do I generate random passwords using Linux commands?

Source: Internet
Author: User
Tags base64

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?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.