用法
	  
	  1. 準(zhǔn)備工作
	  下載腳本地址
	  http://www.kdeopen.com
	  解開(kāi)cvs.tar.gz
	  tar zxvf cvs.tar.gz
	  
	  2. 安裝CVS服務(wù)器
	  #cd cvs
	  #./install
	  
	  3. 添加用戶(hù)
	  #./cvsadduser [cvs用戶(hù)] [系統(tǒng)用戶(hù)] [密碼]
	  
	  4. 刪除用戶(hù)
	  #./cvsuserdel [cvs用戶(hù)]
	  
	  5. 修改密碼
	  #./cvspasswd [cvs用戶(hù)] [新密碼]
	  
	  二、腳本源碼
	  
	  1. 安裝程序源碼
	  
	  [root@linux cvs]# cat install
	  
	  #!/bin/sh
	  
	  echo "adduser cvs"
	  
	  adduser cvs
	  
	  echo -n "Seting password for cvs :"
	  
	  read cvspass
	  
	  echo cvs:$cvspass|chpasswd
	  
	  echo "adduser cvsroot"
	  
	  adduser cvsroot -g cvs
	  
	  echo -n "Seting password for cvsroot :"
	  
	  read cvsrootpass
	  
	  lpasswd cvsroot -P $cvsrootpass
	  
	  if [ -f /etc/xinetd.d/cvspserver ]; then
	  
	  echo "file cvspserver exists !"
	  
	  exit 0
	  
	  else
	  
	  mkdir -m 755 /cvsroot
	  
	  chown -R cvsroot /cvsroot
	  
	  chgrp -R cvs /cvsroot
	  
	  cp cvspserver /etc/xinetd.d
	  
	  /etc/init.d/xinetd restart
	  
	  echo "export CVSROOT=server:cvsroot@"`hostname`":/cvsroot">>/home/cvsroot/.bash_profile
	  
	  su - cvsroot -c "cvs -d /cvsroot init"
	  
	  fi
	  
	  [root@linux cvs]#
	  
	  2. 添加用戶(hù)程序源碼
	  
	  [root@linux cvs]# cat cvsadduser
	  
	  #!/bin/sh
	  
	  ##############################################################
	  
	  # Script to cvs adduser
	  
	  # File:/root/admintool
	  
	  ##############################################################
	  
	  # Setup environment for script execution
	  
	  ENVS="`pwd`"/envs
	  
	  if [ -f $ENVS ]; then
	  
	  . $ENVS
	  
	  else
	  
	  CVSROOT=/cvsroot/CVSROOT
	  
	  CVSUSER=$1
	  
	  SYSUSER=$2
	  
	  CVSPASS=$3
	  
	  # echo "The file exist."
	  
	  # exit 0
	  
	  fi
	  
	  if ! [ -f $CVSROOT/passwd ]; then
	  
	  touch $CVSROOT/passwd
	  
	  fi
	  
	  cvsadduser() {
	  
	  adduser $CVSUSER -g cvs -s /dev/null -d /tmp
	  
	  echo "$CVSUSER:$CVSPASS"|chpasswd
	  
	  grep "$CVSUSER>" /etc/shadow|gawk -F: '{print $1":"$2":'$SYSUSER'"}'>>$CVSROOT/passwd
	  
	  userdel $CVSUSER
	  
	  }