当前位置: 技术问答>linux和unix
CVS ext认证方式下的问题
来源: 互联网 发布时间:2016-01-17
本文导语: 我做的方法: 以root身份登陆 (1)groupadd cvs (2)useradd cvsroot -g cvs (3)chmod g+s /home/cvsroot (4)passwd cvsroot (5)mkdir /home/cvsroot/proj1 (6)chmod 2775 /home/cvsroot/proj1 并且在proj1下面建立了文件hui.c chown cvsroot.cvs hui.c ls -...
我做的方法:
以root身份登陆
(1)groupadd cvs
(2)useradd cvsroot -g cvs
(3)chmod g+s /home/cvsroot
(4)passwd cvsroot
(5)mkdir /home/cvsroot/proj1
(6)chmod 2775 /home/cvsroot/proj1
并且在proj1下面建立了文件hui.c
chown cvsroot.cvs hui.c
ls -l /home/cvsroot/proj1/
结果如下:
-rw-r----- 1 root cvs 23 Apr 6 14:59 hui.c
(7)vi /etc/xinetd.d/cvspserver
内容如下:
service cvspserver
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvsroot/proj1 ext
log_on_success += USERID
log_on_failure += USERID
}
(chmod 644 cvspserver
(9)su - cvsroot(切换到cvsroot用户下)
(10)cvs -d /home/cvsroot/proj1 init
(11)chmod 2775 /home/cvsroot/proj1
(12)exit(回到root用户下)
(13)netstat -l | grep cvspserver
结果如下:
tcp 0 0 *:cvspserver *:* LISTEN
(14)cat /etc/services | grep cvspserver
结果如下:
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
(15)rpm -aq | grep ssh
结果如下:
openssh-3.6.1p2-33.30.6
openssh-askpass-3.6.1p2-33.30.6
openssh-clients-3.6.1p2-33.30.6
openssh-server-3.6.1p2-33.30.6
openssh-askpass-gnome-3.6.1p2-33.30.6
(16)ps -ax | grep sshd
结果如下:
1456 ? S 0:01 /usr/sbin/sshd
30214 pts/2 S 0:00 grep sshd
(17)service sshd status
结果如下:
sshd (pid 11037 11035 1456) is running...
(1系统本来就有一个帐号sophia,将其所属组更改:
chmod sophia.cvs sophia
用ls -l /home可以看到:
drwx------ 4 sophia cvs 1024 Apr 6 14:22 sophia
(19)在/etc/profile中添加如下内容:
CVSROOT=:ext:sophia@10.11.100.118:/home/cvsroot/proj1
CVS_RSH=ssh
export CVSROOT CVS_RSH
(20)同时,在文本方式下也执行:
#CVSROOT=:ext:sophia@10.11.100.118:/home/cvsroot/proj1;CVS_RSH=ssh
#export CVSROOT CVS_RSH
(21)查看两个环境变量:
echo $CVSROOT
结果如下:
:ext:wanghf2@10.11.100.118:/home/cvsroot/proj1
echo $CVS_RSH
结果如下:
ssh
(22)将/home/cvsroot/proj1/CVSROOT/config文件中的SystemAuth=no(将前面的#号去掉,并保存)
(23)su - sophia
(24)cd /home/sophia
(25)在/home/sophia/目录下建立proj1目录,并chmod 775 proj1
(26)cvs checkout proj1
但是出现如下错误:
[sophia]$ cvs checkout proj1
sophia@10.11.100.118's password:
cvs server: cannot open /home/cvsroot/proj1/CVSROOT/config: Permission denied
Cannot access /home/cvsroot/proj1/CVSROOT
Permission denied
(26)另外查看了/home/cvsroot/proj1/CVSROOT的ACLs:
# getfacl /home/cvsroot/proj1/CVSROOT/
getfacl: Removing leading '/' from absolute path names
# file: home/cvsroot/proj1/CVSROOT
# owner: cvsroot
# group: cvs
user::rwx
group::rwx
other::r-x
并且ls -l /home/cvsroot/proj1
结果如下:
drwxrwsr-x 3 cvsroot cvs 1024 Apr 6 14:23 CVSROOT
-rw-r----- 1 cvsroot cvs 23 Apr 6 14:59 hui.c
各位大侠请帮忙看看我的(26)步错误原因,不胜感激
以root身份登陆
(1)groupadd cvs
(2)useradd cvsroot -g cvs
(3)chmod g+s /home/cvsroot
(4)passwd cvsroot
(5)mkdir /home/cvsroot/proj1
(6)chmod 2775 /home/cvsroot/proj1
并且在proj1下面建立了文件hui.c
chown cvsroot.cvs hui.c
ls -l /home/cvsroot/proj1/
结果如下:
-rw-r----- 1 root cvs 23 Apr 6 14:59 hui.c
(7)vi /etc/xinetd.d/cvspserver
内容如下:
service cvspserver
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvsroot/proj1 ext
log_on_success += USERID
log_on_failure += USERID
}
(chmod 644 cvspserver
(9)su - cvsroot(切换到cvsroot用户下)
(10)cvs -d /home/cvsroot/proj1 init
(11)chmod 2775 /home/cvsroot/proj1
(12)exit(回到root用户下)
(13)netstat -l | grep cvspserver
结果如下:
tcp 0 0 *:cvspserver *:* LISTEN
(14)cat /etc/services | grep cvspserver
结果如下:
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations
(15)rpm -aq | grep ssh
结果如下:
openssh-3.6.1p2-33.30.6
openssh-askpass-3.6.1p2-33.30.6
openssh-clients-3.6.1p2-33.30.6
openssh-server-3.6.1p2-33.30.6
openssh-askpass-gnome-3.6.1p2-33.30.6
(16)ps -ax | grep sshd
结果如下:
1456 ? S 0:01 /usr/sbin/sshd
30214 pts/2 S 0:00 grep sshd
(17)service sshd status
结果如下:
sshd (pid 11037 11035 1456) is running...
(1系统本来就有一个帐号sophia,将其所属组更改:
chmod sophia.cvs sophia
用ls -l /home可以看到:
drwx------ 4 sophia cvs 1024 Apr 6 14:22 sophia
(19)在/etc/profile中添加如下内容:
CVSROOT=:ext:sophia@10.11.100.118:/home/cvsroot/proj1
CVS_RSH=ssh
export CVSROOT CVS_RSH
(20)同时,在文本方式下也执行:
#CVSROOT=:ext:sophia@10.11.100.118:/home/cvsroot/proj1;CVS_RSH=ssh
#export CVSROOT CVS_RSH
(21)查看两个环境变量:
echo $CVSROOT
结果如下:
:ext:wanghf2@10.11.100.118:/home/cvsroot/proj1
echo $CVS_RSH
结果如下:
ssh
(22)将/home/cvsroot/proj1/CVSROOT/config文件中的SystemAuth=no(将前面的#号去掉,并保存)
(23)su - sophia
(24)cd /home/sophia
(25)在/home/sophia/目录下建立proj1目录,并chmod 775 proj1
(26)cvs checkout proj1
但是出现如下错误:
[sophia]$ cvs checkout proj1
sophia@10.11.100.118's password:
cvs server: cannot open /home/cvsroot/proj1/CVSROOT/config: Permission denied
Cannot access /home/cvsroot/proj1/CVSROOT
Permission denied
(26)另外查看了/home/cvsroot/proj1/CVSROOT的ACLs:
# getfacl /home/cvsroot/proj1/CVSROOT/
getfacl: Removing leading '/' from absolute path names
# file: home/cvsroot/proj1/CVSROOT
# owner: cvsroot
# group: cvs
user::rwx
group::rwx
other::r-x
并且ls -l /home/cvsroot/proj1
结果如下:
drwxrwsr-x 3 cvsroot cvs 1024 Apr 6 14:23 CVSROOT
-rw-r----- 1 cvsroot cvs 23 Apr 6 14:59 hui.c
各位大侠请帮忙看看我的(26)步错误原因,不胜感激
|
在说什么?没头没脑的。把问题描述清楚。
你是想问怎么在cvs下用ext认证登陆?还是你在配置的时候遇到什么问题?
你是想问怎么在cvs下用ext认证登陆?还是你在配置的时候遇到什么问题?