#!/bin/bash
if [ ! "$1" ]
then
echo "Usage:/root/batchusers userfile"
exit 1
fi
if [ ! -e "$1" ]
then
echo "Input file not found"
exit 1
fi
for name in `cat $1`
do
useradd $name -s '/bin/false'
done
详细解决方案
RHCE 创建用户
热度:69 发布时间:2023-12-20 22:50:06.0