下面是个简单的批量开ftp的Shell
首先把需要开的ftp放在test.txt里面 下面写脚本
vim add.sh
#!/bin/sh
for domain in `cat test.txt` //定义变量
do
useradd $domain //调用变量
echo '密码' | passwd --stdin $domain &>/dev/null
done
转载于:https://blog.51cto.com/bighuamao/499236
下面是个简单的批量开ftp的Shell
首先把需要开的ftp放在test.txt里面 下面写脚本
vim add.sh
#!/bin/sh
for domain in `cat test.txt` //定义变量
do
useradd $domain //调用变量
echo '密码' | passwd --stdin $domain &>/dev/null
done
转载于:https://blog.51cto.com/bighuamao/499236