CVS supports virtual users, which have access to the repository, but not to the system.
Those users names and passwords are stored in CVSROOT/passwd file, but there is no standard method CVS provides to add users to this file.
So, how do you add a user to cvs CVSROOT/passwd file?
cvs passwd file has the following stucture:
user_name:hashed_password[:real_user]

the first row is the user name which the user is aware of (what he preceives as his user name).
the second row is the user password, encrypted with the standard unix crypt() function.
the third row is an optional real user name to map this user to. this is useful if you want all users to act under the same user.
in my case, I wanted all users to act under the user ‘cvs’ with the group ‘cvs’.
I wrote this script, which uses htpasswd, which is a standard apache tool, to create the passwd file.
(change /cvs to your actual repository path)
add-cvs-user:


#!/bin/bash
if [ $# = 0 ]; then
  echo user name not specified
  exit
fi
PASS=`htpasswd -n $1`
echo $PASS:cvs >> /cvs/CVSROOT/passwd

make sure you change the file ownership to root:root, and change the permissions for it so that only root can read its content.