shell脚本随机生成密码

[root@harbor tools]# cat test.sh 
#!/bin/bash

# 生成随机密码
password=$(openssl rand -base64 12)

# 输出生成的密码
echo "生成的密码为: $password"

 

posted @ 2023-04-25 18:00  Leonardo-li  阅读(101)  评论(0编辑  收藏  举报