更新
This commit is contained in:
parent
4ea882d4d0
commit
312d32e256
@ -22,13 +22,13 @@ customAddUser() {
|
||||
#使用 stty echo 打开 shell 的回显功能
|
||||
# read -s -p "请输入密码:" pass
|
||||
# pass=${pass:-123456}
|
||||
useradd $user
|
||||
adduser $user
|
||||
echo -e "\n"
|
||||
# echo $user:$pass | chpasswd
|
||||
if [[ $? -eq 0 ]]; then
|
||||
read -p "是否将用户添加入sudo组?(y/n)" confirmAdd
|
||||
if [[ "$confirmAdd" == `echo -e "\n"` || $confirmAdd == "Y" || $confirmAdd == "y" ]]; then
|
||||
usermod -aG sudo cirry
|
||||
usermod -aG sudo $user
|
||||
fi
|
||||
else
|
||||
return $?
|
||||
|
Loading…
Reference in New Issue
Block a user