proxy代理   soft软件   IT 业界特快   norton 诺顿病毒库   代理列表   search FTP搜索   whois IP地理位置   blog 追求完美  
money理财   life生活   RSS聚合门户   firefox WEB浏览器   免费域名   typeset 假古文   AntiVirus 反病毒   ipcn 站点导航  

« February 10, 2004 | Main | February 12, 2004 »

February 11, 2004

passchsquid.sh -- Password Change For Squid Auth 我爱网络

#!/bin/bash## passchsquid.sh for squid# Password Change For Squid Auth#              By Zhang Xiuling (windtear@ipcn.org)##HTPASSWD="/usr/local/apache/bin/htpasswd -b -d /etc/squid/passwd"HTPASSWD="/usr/bin/htpasswd -b -d /etc/squid/passwd"MKPASSWD="/usr/bin/mkpasswd -l 8 -d 0 -c 8 -C 0 -s 0"DEFAULTUSER=windtearPLAINPASSDIR=/etc/squid/_userHTMLFILE=/var/www/ipcn.org/proxy/index.htmlPASSFILE=/var/www/ipcn.org/proxy/password.txtPERL=/usr/bin/perlFILENAME=`basename $0`usage() {        echo        echo "usage: $FILENAME [USERNAME]"        echo        echo "Example:"        echo "  $FILENAME windtear"        echo        exit}[[ $1 = "-h" || $1 = "--help" || $1 = "-v" || $1 = "--version" ]] && usageSQUIDUSER=${1:-$DEFAULTUSER}SQUIDPASS=$($MKPASSWD)SQUIDPASS=${2:-$SQUIDPASS}[[ -f $PLAINPASSDIR/$SQUIDUSER ]] && ORIGPASS=$(cat $PLAINPASSDIR/$SQUIDUSER)echo $ORIGPASSecho $SQUIDPASSecho $SQUIDPASS > $PLAINPASSDIR/$SQUIDUSER$HTPASSWD $SQUIDUSER $SQUIDPASS$PERL -pi -e "s#密码:$ORIGPASS#密码:$SQUIDPASS#" $HTMLFILEecho "帐号:windtear" > $PASSFILEecho "密码:$SQUIDPASS" >> $PASSFILE   More...

Posted by windtear at 9:37 AM

apache 服务器的 CA 证书 我爱网络

http://windtear.net/archives/2004/02/11/000412.html 2003年11月17日 效命了一年的mail.ipcn.org的证书过期了 今天我觉得重做一下证书 怕麻烦 那就给10年吧 cd /etc/httpd/conf vi Makefile /usr/bin/openssl req -new -key $(KEY) -x509 -days 3650 -out $(CRT) [Wed Feb 11 02:03:32 /etc/httpd/conf] root@ipcn.org# make genkey umask 77 ; \ /usr/bin/openssl genrsa -des3 1024 > /etc/httpd/conf/ssl.key/server.key Generating RSA private key, 1024 bit long modulus .....++++++ ..............................++++++ e is 65537 (0x10001) Enter PEM pass phrase: Verifying password - Enter  More...

Posted by windtear at 2:41 AM



Google
 
搜索windtear.net 搜索所有网页

本站使用中的任何问题,请与 windtear @ windtear.net 联系
Copyright© 1999-2012 Windtear. All rights reserved.