批量创建用户

$ cat test26
#!/bin/bash
# process new user accounts
input="users.csv"
while IFS=',' read -r userid name
do
echo "adding $userid"
useradd -c "$name" -m $userid                  #添加备注,并创建指定家目录
done < "$input"
$

cat users.csv
rich,Richard Blum
christine,Christine Bresnahan
barbara,Barbara Blum
tim,Timothy Bresnahan

上一篇:5W1H聊开源之Who——谁“发明”了开源?


下一篇:46 Linden Street ACT I