Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PAM error with pserver CVS repository [ FIXED ]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
gargoylle_ltk
n00b
n00b


Joined: 28 Jun 2004
Posts: 33

PostPosted: Sat Feb 12, 2005 1:33 pm    Post subject: PAM error with pserver CVS repository [ FIXED ] Reply with quote

I'm trying to set up a small CVS repository to use on my LAN (using http://cvsbook.red-bean.com/cvsbook.html as reference)
What I have done so far is:
- I've added a 'cvs' user and a 'cvs' group to the system. The home for the user is /home/cvs
- I created the repository:
Code:
cvs@ltkcentral ~ $ cvs -d /home/cvs/ init
cvs@ltkcentral ~ $ pwd
/home/cvs
cvs@ltkcentral ~ $ ls -l
total 8
drwxrwxr-x  3 cvs  cvs  4096 Feb 12 15:19 CVSROOT
cvs@ltkcentral ~ $

- I added the desired CVS users:
Code:
cvs@ltkcentral ~ $ pwd
/home/cvs
cvs@ltkcentral ~ $ cat CVSROOT/passwd
gargoylle_ltk:[crypted password]:cvs
bram:[crypted password]:cvs
cvs@ltkcentral ~ $ cat CVSROOT/writers
gargoylle_ltk
bram
cvs@ltkcentral ~ $

- I edited /etc/xinted.d/cvspserver and started xinted:
Code:
ltkcentral ~ # cat /etc/xinetd.d/cvspserver
service cvspserver
{
        disable         = no
        socket_type     = stream
        wait            = no
        user            = cvs
        log_type        = FILE /home/cvs/cvspserver
        protocol        = tcp
        env             = HOME=/home/cvs
        log_on_failure  += USERID
        port            = 2401
        server          = /usr/bin/cvs
        server_args     = -f --allow-root=/home/cvs pserver
}
ltkcentral ~ # /etc/init.d/xinetd start
 * Starting xinetd ...                                                                             [ ok ]
ltkcentral ~ # netstat -tlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 *:cvspserver            *:*                     LISTEN      4806/xinetd
tcp        0      0 *:ssh                   *:*                     LISTEN      9680/sshd
ltkcentral ~ #

The problem I have is that whenever I try to import something into this repository I get a PAM error:
Code:
ggarg@ltkcentral ~/development/ltkdc $ cvs -d :pserver:gargoylle_ltk@10.16.200.171:/home/cvs login
Logging in to :pserver:gargoylle_ltk@10.16.200.171:2401/home/cvs
CVS password:
ggarg@ltkcentral ~/development/ltkdc $ cvs -d :pserver:gargoylle_ltk@10.16.200.171:/home/cvs import -m "Initial CVS import" ltkdc ltkstudios ltkdc1
PAM open session error: System error
cvs [import aborted]: end of file from server (consult above messages if any)
ggarg@ltkcentral ~/development/ltkdc $

for each import attempt I make the following line pops up in /var/log/messages:
Code:
Feb 12 15:30:26 ltkcentral cvs: PAM pam_open_session: NULL pam handle passed

what have I done wrong/what more need I do ?


Last edited by gargoylle_ltk on Thu Mar 10, 2005 11:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
EvilMonkey
n00b
n00b


Joined: 23 Jul 2004
Posts: 32

PostPosted: Sun Feb 20, 2005 2:16 am    Post subject: Known CVS bug Reply with quote

There is a known CVS bug that makes pam block some/all cvs commands. I had the same log messages as you, and I fixed it by re-emergeing cvs with the pam use flag turned off

Code:

USE="-pam" emerge -v cvs
/etc/init.d/xinetd restart
Back to top
View user's profile Send private message
mdbarton
n00b
n00b


Joined: 01 Mar 2005
Posts: 10
Location: West Midlands, UK

PostPosted: Tue Mar 08, 2005 5:16 pm    Post subject: Reply with quote

gargoylle_ltk - did EvilMonkey's suggestion work?
Back to top
View user's profile Send private message
gargoylle_ltk
n00b
n00b


Joined: 28 Jun 2004
Posts: 33

PostPosted: Thu Mar 10, 2005 11:06 pm    Post subject: Reply with quote

sorry for not replying sooner...I've been busy and have't experimented with CVS for some time. I'm going to try EvilMonkey's suggestion right now and I'll post the results

// minutes later
yes, the CVS repository seens to be working now. thank you for the suggestion EvilMonkey
Back to top
View user's profile Send private message
mdbarton
n00b
n00b


Joined: 01 Mar 2005
Posts: 10
Location: West Midlands, UK

PostPosted: Fri Mar 11, 2005 6:58 am    Post subject: Reply with quote

cheers - I'm thinking of setting up a repository as well!
Back to top
View user's profile Send private message
Vlad
Apprentice
Apprentice


Joined: 09 Apr 2002
Posts: 264
Location: San Diego, California

PostPosted: Tue Apr 05, 2005 7:50 am    Post subject: Reply with quote

I've been trying to get a CVS repository working for the last couple days, and have poured over the documentation available around the forums, the wiki, and the bug list at gentoo.org. Unfortunately, none of the fixes have helped me =(

I'm setting up a very simple box to host a CVS repository for a small group of developers. They all use Eclipse to checkout/update sources. When adding the repository, however, they recieve strange "String index out of range: 0" errors. When I tried to locally connect to the cvs server...

Code:

# CVSROOT=:pserver:admin@localhost:/root
# export CVSROOT
# cvs login
CVS password:
# cvs import -m 'test1 project' test1 devgroup initial
PAM open session error: System error
cvs [import aborted]: end of file from server (consult above messages if any)


Rest assured the account has write privledges. What am I doing wrong? I added SystemAuth=no to the config file of the repository. I compiled cvs with the following command:

Code:

# USE="-pam" emerge cvs


But I get the same error. What the hell is going on? Any ideas would be seriously appreciated.
Back to top
View user's profile Send private message
Vlad
Apprentice
Apprentice


Joined: 09 Apr 2002
Posts: 264
Location: San Diego, California

PostPosted: Tue Apr 05, 2005 7:56 am    Post subject: Reply with quote

Nevermind, I solved the problem.

It turns out that the cvsd script which installs a repository copies the cvs binary to the chroot jail. When doing so, it copied the binary that was compiled with the PAM use flag, so simply recompiling cvs with USE=-pam was not enough; the resulting binary had to be copied to the chroot jail. Now all is well. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum