html tool

2017年5月23日星期二

使用脚本新建用户并设置初始密码

add:https://stackoverflow.com/questions/2150882/how-to-automatically-add-user-account-and-password-with-a-bash-script


I liked Tralemonkey's approach of echo thePassword | passwd theUsername --stdin though it didn't quite work for me as written. This however worked for me.
echo -e "$password\n$password\n" | sudo passwd $user

没有评论:

发表评论