Shell-Script - 新增使用者
Published in:2022-08-03 | category: Shell-Script


#!/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

Prev:
Shell-Script - 偵測 telegraf 服務
Next:
Shell-Script - 抓 youtube 影片腳本