«« When to Release? Artists Debate Why You Should Hire Them »»
blog header image
Read-Only CVS Access with pserver Attempt 2

I got secure CVS read/write access set up last week and now ironically enough I need to set up a Password Authenticating Server (or pserver) to give people that aren't committers anonymous read-only access. Here's how I set it up.

1. Use the su command and enter the root password.

We need to set up the inetd daemon. Red Hat 8.0 installed xinetd instead which is apparently more flexible.

2. Make sure the following line is in /etc/services (It was already there in my default install of Red Hat 8.0):

cvspserver 2401/tcp

3. Create the file /etc/xinetd.d/cvspserver and add the following to it:

service cvspserver
{
   socket_type = stream
   protocol    = tcp
   wait        = no
   env         = HOME=/usr/local/cvsroot
   user        = root
   group       = cvs
   server      = /usr/bin/cvs
   server_args = --allow-root=/usr/local/cvsroot pserver
   disable     = no
}

4. Restart xinetd. I used Red Hat's Service Configuration window in Bluecurve. Open the menu on the toolbar and go to Server Settings --> Services.

5. Create a new username: anonymous and give it the password password. Make sure anonymous is a member of the cvs group in /etc/group. I used the Red Hat User Manager.

6. Check out the CVSROOT module from your CVS repository using an ssh account . I used Eclipse to do this. Make a new file named readers and add this single line to it:

anonymous

The make a new file named passwd and add this line to it:

anonymous:r4SaQ9ekbVa9A

The part after the colon is the encrypted password for CVS, which may not be exactly the same on your machine. You can make this the same password as the anonymous account for the machine. Look in /etc/shadow to find the line for the anonymous account (probably at the bottom) and copy the encrypted password from there. It is between the first and second colons.

Then check these new files into CVS and you're done.

---

You can test the pserver at the command line. For AudioMan, the command is:

cvs -d :pserver:anonymous@audioman.dyndns.org:/usr/local/cvsroot login

When prompted for the password, enter password. Now you can use other CVS commands from there.

To check out AudioMan anonymously from CVS using Eclipse read the CVS page on the AudioMan developer site.

References
1. Open Source Development With CVS
2. Configuring pserver

Posted at January 17, 2004 at 12:57 AM EST
Last updated January 17, 2004 at 12:57 AM EST
Comments

Did you go to newark high school?

» Posted by: heather at January 17, 2004 09:25 PM

Nope :)

» Posted by: Ryan at January 17, 2004 09:47 PM

Sourceforge has pserver access using the 'anonymous' account and no password. I wonder how they set it up ...

» Posted by: Ryan at January 20, 2004 09:52 AM

To restart xinetd at the command line, type:

service xinetd restart

» Posted by: Ryan at January 4, 2005 04:08 PM
Google
 
Search scope: Web ryanlowe.ca