Last active
November 6, 2021 11:57
-
-
Save lawvs/7d54e73234a3aedcd1829919197fa889 to your computer and use it in GitHub Desktop.
生成随机密码
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 使用 openssl 生成密码 | |
openssl rand -base64 12 | |
# 使用 dd 命令生成密码 | |
dd if=/dev/urandom bs=1 count=15 2>/dev/null|base64 -w 0 | |
# 使用 md5sum 生成密码 | |
date |md5sum | |
# 使用 gpg 工具生成密码 | |
gpg --gen-random --armor 1 12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment