One: RANDOM
Echo $RANDOM
Random number is a range of 1--32767, generally used it can be cracked
1.2 Generate a eight-digit random password:
echo $ (($RANDOM +11111111))
Two: Md5sum random encryption method generates a longer password
Take 9-digit password:
echo $RADDOM |md5sum|cut-c 2-9
III: Generate random numbers through OpenSSL
[Email protected] tmp]# OpenSSL rand-base64 8
hinfivtfosk=
[Email protected] tmp]# OpenSSL rand-base64
t67tcwo4dqufja==
[Email protected] tmp]#
Four: Get random numbers by time
Date +%s%n (S-S N)
[Email protected] tmp]# date +%s%n
1494493822328919977
[Email protected] tmp]#
V: mkpasswd
To use mkpasswd first download expect
Yum Install Expect-y
[Email protected] scripts]# mkpasswd-l
\DHR (v56zpt
[Email protected] scripts]# mkpasswd-l 18
Uxtxtiluk09wzdd[ga
[Email protected] scripts]#
Six: Equipment:/dev/urandom|cksum
[Email protected] scripts]# head/dev/urandom|cksum
3839730751 3262
[Email protected] scripts]#
Seven: The UUID code is the universal unique identification code:
[Email protected] scripts]# cat/proc/sys/kernel/random/uuid
dbe7d254-11c2-42cc-b541-3f2a990daa8e
[Email protected] scripts]#
The method of generating random numbers in Shell series