쉘 스크립트 작성
vi useradd.sh
#!/bin/bash
A=1
while [ $A -lt 1001 ]
do
B=
echo "docs${A}"
useradd $B
echo “pass00##” | passwd –stdin ${B}
### virtual
echo “<VirtualHost *:80>” >> /usr/local/apache/conf/extra/httpd-vhosts.conf
echo “DocumentRoot /free/home/$B/html” >> /usr/local/apache/conf/extra/httpd-vhosts.conf
echo “ServerName $B.wordpres.kr” >> /usr/local/apache/conf/extra/httpd-vhosts.conf
echo “CustomLog logs/access_log vcommon” >> /usr/local/apache/conf/extra/httpd-vhosts.conf
echo “</VirtualHost>” >> /usr/local/apache/conf/extra/httpd-vhosts.conf
echo “” >> /usr/local/apache/conf/extra/httpd-vhosts.conf
### named
echo “$B IN A 218.145.31.50” >> /var/named/xinet.kr.zone
A=
expr $A + 1
done