www.thornleyware.com

Providing customized source code control with CVS

Configuring pserver

Decisions:

It is necessary to find whether the server runs inetd or xinetd to receive incoming connections. The server should come with a file called "/etc/inetd.conf", indicating inetd, or a directory called "/etc/xinetd.d", indicating xinetd. The usual standard has been inetd, but Red Hat started shipping its 7.0 Linux with xinetd. In general, inetd is more familiar, xinetd is more functional, and the two are not compatible.

You also need to determine where you are going to put the repository, and where the cvs executable is. I will assume /home/cvs/repository and /usr/local/bin/cvs respectively for these examples. Substitute as appropriate.

You need to decide what passwords the users will log in as. If security is not a problem, you may choose to use a single password for each user.

You also need to decide whether to create a user account for each CVS user, or whether to map the users onto one or a few Unix user accounts. The former is often more work to set up, but the latter destroys what accountability pserver provides.

Process:

1. Become root

The next three steps will have to be done as root, so enter su - and type the root password.

2. Edit /etc/services

You need to edit the /etc/services file to include the following line:
cvspserver 2401/tcp # CVS client/server operations
This will define the pserver service to the operating system.

3. Configure inetd or xinetd

If you have inetd, you need to add this line to /etc/inetd.conf:
2401 stream tcp nowait root /usr/local/bin/cvs cvs -f --allow-root=/home/cvs/repository pserver
substituting wherever cvs is installed for /usr/local/bin/cvs (if not there> and the CVS repository directory for /usr/cvsroot.

If you have xinetd, create the enclosed file as /etc/xinetd.d/cvspserver. Substitute as necessary for where CVS is and where the repository is.

4. Restart inetd or xinetd

Get inetd or xinetd to reread their configuration file(s). Do this with kill -SIGHUP inetd for inetd or kill -SIGUSR2 xinetd for xinetd.

5. Leave root

You no longer need to be root to execute the following step, so return to your non-root account with exit.

6. Add your users

Add users to the CVS password file, which is CVSROOT/passwd inside the repository. Within that directory, use something like the cvs_passwd.pl supplied, in the form of
cvs_passwd.pl <user name> <password> <real user name>
where <user name> is the name the user will be under on the client machine, and the optional <real user name> would be the account on the server machine, if different. Unfortunately, there is no way to change passwords through CVS, or allow the user to change his or her own password.

All contents of these pages Copyright 2002 by David H. Thornley.
Permission granted for verbatim copying and use within an organization.


Contact: webmaster@thornleyware.com