修改不同倉庫的策略
#su - cvsroot
$export CVSROOT=/home2/cvsroot/pro1
$cvs co CVSROOT
$cd CVSROOT
$vi config
# Set this to "no" if pserver shouldn't check system users/passwords
SystemAuth=no
# Put CVS lock files in this directory rather than directly in the repository.
LockDir=/var/cache/cvs/pro1
# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
# level of the new working directory when using the `cvs checkout'
# command.
#TopLevelAdmin=no
# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
# history file, or a subset as needed (ie `TMAR' logs all write operations)
LogHistory=TOFEWGCMAR
:wq
$vi loginfo
ALL (echo %{sVv}; cat) | /usr/local/viewcvs-0.9.2/loginfo-handler#SQL checkin
:wq
$cvs commit -m "auth change,log change"
OK,既然不使用系統(tǒng)用戶驗證,那么我們來創(chuàng)建用戶
/************/
不使用系統(tǒng)帳號的原因是充分保證安全,避免系統(tǒng)帳號直接刪除倉庫里的文件.
雖然麻煩,但是很有必要,因為無法保證每一個程序員都對cvs操作很有經(jīng)驗.
在這種情況下,為每一個工程各建一個等效系統(tǒng)用戶,此用戶應該是cvs組的成員.
不必有shell.
(也可以為所有的項目建一個等效用戶,私有的cvs Server完全可以這么做,甚至可以
直接使用cvsroot,呵呵,是比較危險而已)
#adduser -g cvs -G cvs -s /bin/false -d /home2/cvsroot/pro1 -M cvspro1
/************/
創(chuàng)建一個LockDir(選擇/var/cache是因為某些系統(tǒng)放在/var/lock下面有問題)
#mkdir /var/cache/cvs
#chown cvsroot.cvs /var/cache/cvs
#chmod 2775 /var/cache/cvs
#mkdir /var/cache/cvs/pro1
#chown cvspro1.cvs /var/cache/cvs/pro1
#chmod 2775 /var/cache/cvs/pro1
創(chuàng)建用戶
先清除環(huán)境
$export CVSROOT=
$cd ~cvsroot
$rm -rf CVSROOT
直接切換到pro1的倉庫下
$cd /home2/cvsroot/pro1
$cd CVSROOT
創(chuàng)建用戶hleil
$htpasswd -c passwd hleil
修改passwd成cvs的格式
$vi passwd
hleil:svcsdasdcvjn:cvspro1
:wq
加入writers組
$echo hleil >>writers
/*****這里有一個問題**********/
如果用戶hleil需要writers權(quán)限,那么,他不可以出現(xiàn)在readers組中.
writers,readers,passwd的文件尾空行是必要的.
等效系統(tǒng)帳號如果不存在,將導致aclearcase/" target="_blank" >ccess failed.
cvs帳號盡量沒有對應的系統(tǒng)帳號,如果有,確保它們的passwd不同.
/******************************/
OK了!
項目pro2同理.