BACKRUSH  유닉스명령  다음  자료실  Ascii Table   원격접속  달력,시간   프로세스  
지하철노선   RFC문서   SUN FAQ   SUN FAQ1   C메뉴얼   PHP메뉴얼   너구리   아스키월드 아이피서치

글쓴이: backrush [user,db,domain,버철,이메일]생성 조회수: 11140


#!/bin/sh

while [ : ]
do
clear
echo "==============================================================="
echo "ACCOUNT MANAGEMENT(유져성생,mysql,서브도메인,버철호스팅,이메일)"
echo "종료시 사용자계정:q 입력 "
echo "==============================================================="
echo "사용자계정:\c"
read user
if [ $user = "q" ]
then
exit 0
fi
echo "사용자이름:\c"
read name
echo "사용자 E-mail:\c"
read email


auser=`cat /etc/passwd|cut -d':' -f 1,1|grep $user`

if [ "$user" = "$auser" ]then
echo "사용자가 있습니다."
echo "retry"
exit
fi

useradd -d /home/$user -g 1003 -s /bin/csh -m -c $name $user
passwd $user
echo "==============================================================="
echo "==================== User Created ========================="
echo "==============================================================="
echo "
<VirtualHost 218.38.148.154>
ServerAdmin stone@backrush.com
DocumentRoot /home/$user/docs
ServerName $user.backrush.com
ErrorLog logs/error_log
CustomLog logs/access_log common
</VirtualHost>">> /home/www/conf/httpd.conf

echo "$user.backrush.com. IN A 218.38.148.154" >>/var/name/backrushcom.zone
/bin/killer named
/usr/local/sbin/named
/home/www/bin/apachectl restart
echo "==============================================================="
echo "==================== Virtual Domain Created ==============="
echo "==============================================================="

mysqlpass="/usr/local/mysql/bin/mysql"
root="xxxxx"
echo "Mysql Password:\c"
read pass
if [ -s mysqltmp ]
then
rm mysqltmp
fi

echo "create database $user;" > mysqltmp
echo "insert into user values ('localhost','$user',password('$pass'),'N','N','N'
,'N','N','N','N','N','N','N','N','N','N','N');">>mysqltmp

echo "insert into db values('localhost','$user','$user','Y','Y','Y','Y','Y','Y',
'Y','Y','Y','Y');" >>mysqltmp

echo "flush privileges;">>mysqltmp
$mysqlpass -uroot -p$root mysql <mysqltmp
echo "==============================================================="
echo "==================== Mysql User Created ==================="
echo "==============================================================="

echo "===============================================================">ss
echo "====== Welcome to Backrush Service =======">>ss
echo "===============================================================">>ss
echo "방갑습니다 $name님 부디 학업적인 목적에만 쓰이기를... ">>ss
echo "중요한자료는 별도로 백업을 부탁드립니다. ">>ss
echo "본 Backrush의 취지에 어긋난 행위나 이상스런 서비스">>ss
echo "(음악,게임,와레즈,방송,학업에 어긋나는 사이트) ">>ss
echo "특히 타 서버와 연동하여 게시판만 사용하는 얍삽한 사람들은 ">>ss
echo "사절입니다">>ss
echo "부디 자신의 발전적인 용도에 쓰이시기를 간절히 바랍니다.">>ss
echo "===============================================================">>ss
echo "BACKRUSH 하드웨어 자원">>ss
echo "The sparcv9 processor operates at 400 MHz * 4EA">>ss
echo "(4)[darak]/home/stone > prtconf|grep Mem">>ss
echo "Memory size: 2048 Megabytes">>ss
echo "(5)[darak]/home/stone > uname -a">>ss
echo "SunOS darak 5.7 Generic_106541-19 sun4u sparc SUNW,Ultra-4">>ss
echo "===============================================================">>ss
echo "BACKRUSH 소프트웨어 자원">>ss
echo "언어:C,C++,PHP,JAVA,Python,JSP,CGI,Shell">>ss
echo "Database:Oracle,Mysql">>ss
echo "웹어플리케이션:Apache+PHP+CGI+ORACLE+MYSQL">>ss
echo "===============================================================">>ss
echo "BACKRUSH 기본서비스">>ss
echo "1.Telnet Service">>ss
echo " login:$user password:$pass">>ss
echo "2.Mysql Service">>ss
echo " Mysqldb:$user Mysql user:$user Mysql passwd:$pass">>ss
echo "3.Subdomain Service">>ss
echo " $user.backrush.com 홈페이지디렉토리는 docs입니다.">>ss
echo "기타 질문사항은 해당 게시판을 이용하세요">>ss
s="[Backrush]계정생성되었습니다"
mailx -s "$s" $email < ss
done

관련글 : 없음 글쓴시간 : 2003/07/30 3:32 from 61.82.164.84

  [user,버춸,도메인,db]삭제 목록보기 새글 쓰기 지우기 응답글 쓰기 글 수정 이름으로 데몬죽이기  
BACKRUSH  유닉스명령  다음  자료실  Ascii Table   원격접속  달력,시간   프로세스  
지하철노선   RFC문서   SUN FAQ   SUN FAQ1   C메뉴얼   PHP메뉴얼   너구리   아스키월드 아이피서치