How to setup anonymous CVS access on Ubuntu Server 6.06
Posted December 29, 2006
on:This infomation was obtained from this page: http://www.debian-administration.org/articles/186 – I intend to take NO credit for this infomation im just making it more widely avaliable 🙂
Once you have the CVS server up and running you need to add a new system account with no shell for the anonymous user.
The following command will do that:
useradd -s /bin/false anonymous
The next step is to configure the anonymous user to be a valid user with no password for CVS logins. This involves adding a line to a file passwd beneath your CVSROOT directory.
My CVS repository is located in /home/cvs, so for me the command is:
echo “anonymous:” >> /home/cvs/CVSROOT/passwd
Then to make sure this is only used for read-only access add the anonymous user to the file readers in the same directory
echo “anonymous” >> /home/cvs/CVSROOT/readers
This should be sufficient to allow the anonymous user to login and checkout code without being able to modify anything.
The syntax for the client would be:
skx@mystery:/tmp$ cvs -d :pserver:anonymous@hostname:/home/cvs login
Logging in to :pserver:anonymous@hostname:2401/home/cvs
CVS password: [Enter here = blank password]
skx@mystery:/tmp$ cvs -d :pserver:anonymous@hostname:/home/cvs co module
The anonymous client will now be able to keep up to date with the codebase and not be able to modify anything upon the server. Attempting to commit a local change will result in the following error message:
cvs [server aborted]: “commit” requires write access to the repository
cvs commit: saving log message in /tmp/cvsXXX
Below is ONLY for reference purposes!
The code which runs this site is available online, and can now be checked out anonymously if you wish:
cvs -d :pserver:anonymous@cvsrepository.org:/home/cvs login
cvs -d :pserver:anonymous@cvsrepository.org:/home/cvs co yawns
Please remember that I did not write this tutorial or responsable for any errors etc. The original documentation can be found here: http://www.debian-administration.org/articles/186
Leave a comment