创建随机密码

cat /dev/urandom | tr -dc '0-9a-zA-Z' | fold -w 8 | head -1

#/dev/urandom会随机生成字符串
#tr -dc '0-9a-zA-Z' 取0-Z之间的字符
#fold -w 8 指定取8位数密码