#!/bin/bash
while [ "i" != "1" ]
do
echo -n new user name:
read name
useradd $name
echo "123456" | passwd --stdin $name
echo finish new user name is:$name
done
sed -i "s/GSSAPIAuthentication yes/GSSAPIAuthentication no/g" /etc/ssh/sshd_config
sed -i "s/#UseDNS yes/UseDNS no/g" /etc/ssh/sshd_config
service sshd restart
- link: https://note.laurance.eu.org/2022/08/03/shell-script-建立新增使用者/
- Copyright notice: All articles on this website, unless otherwise stated, adopt CC BY-NC-ND 4.0 reprint policy. If reproduced, please indicate source!