Subversion is an open-source version control system. One of several authenication mechanisms Subversion can use is an internal password file. Unfortunately, if this system is used for authentication, the user has no control over changing their password. The user must ask a system administrator to edit the password file and change their password.
I have written a CGI script that enables users to change their password via a web interface. In addition, I have written two CGI scripts to allow a repository administrator to add and/or remove users from a repository password file via a web interface. Subversion doesn't actually have administrator users in the repository so you have to add a file in the repository conf
directory to define who is an administrator.
Click here for a demo of how the GUI works.
All of the CGI scripts were written in Perl. They have been tested in both UNIX (OpenBSD, FreeBSD, MacOS X, Linux, etc) and Windows with Apache.
In order for this script to work, the user that is running the web server process must be able to write to the repository conf
directory.
All three of these scripts have several variables at the top that can be customized to different Subversion installations. The most important one to set is the $repodir
variable which defines where your Subverions repositories are located.
svnpasswd.pl - The svnpasswd.pl
CGI script allows users to change their password within a Subversion repository via a web interface.
svnadduser.pl and svnrmuser.pl - The svnadduser.pl
and svnrmuser.pl
CGI scripts allows an administrator for a particular repository to add/remove a user to/from that repository via a web interface. Administrators for a repository are defined by creating a file in the repository conf
directory and listing the administrative users, one per line, in the file. There must be a matching user in the repository password file for each user in the admins file. By default this file is called admins
but it can be named almost anything as long as that name is reflected in the script. Here is an example of an admins file:
# These are administrators for this repository # Comments are ignored vicente miguel carlos
Last modified: Tuesday, 04-Aug-2009 13:34:19 MDT :: Erik Mugele :: Main Page :: Contact Page :: Powered by Teuton |