linux 无交互添加用户设置密码

#!/bin/bash

useradd -m test
echo "123456" | passwd --stdin test
原文地址:https://www.cnblogs.com/zheh/p/6216723.html