7 ways to generate random passwords under Linux
1
[[Email protected] ~]# Date +%s | Sha256sum | Base64 | Head-c 32; Echo
M2u0ytlln2i1nzzjntnjzdzhyzm5nziz
2
[Email protected] ~]# </dev/urandom tr-dc _a-z-a-z-0-9 | Head-c${1:-32};echo;
1jmwhhn9xwsowv-1h_8dgjxfrx4lvahf
3
[email protected] ~]# OpenSSL rand-base64 32
wkkf6smfsrreu8l5fvkf9y0o8vywjrw3lphcrza9kwg=
4
[[email protected] ~]# TR-CD ' [: alnum:] ' </dev/urandom | fold-w30 | Head-n1
Ewdzyjzdb4sipbm6z9ihqjfmuk
5
[Email protected] ~]# </dev/urandom tr-dc _a-z-a-z-0-9 | Head-c6
Et3b46
6
[[email protected] ~]# dd if=/dev/urandom Bs=1 count=32 2>/dev/null | Base64-w 0 | Rev | Cut-b 2-| Rev
Bp/0g8jscwwho0nl5ofqomxp/0rypvd27ukimyohkr0
7
[[Email protected] ~]# Date | Md5sum
0bc2d0c2954a1f9d475f8714e5263cee
Reference: http://blog.csdn.net/open_data/article/details/42521253
This article is from the "Youth Deng Yong" blog, please be sure to keep this source http://dengyong.blog.51cto.com/8409869/1981248
7 ways to generate random passwords under Linux