I'm not sure what is best, keeping subversion users and passwords in synch with linux users and passwords or just having linux somehow provide subversion authentication service.

I'd prefer to just maintain only linux users since I find it easy to add and remove users on ubuntu. I'd like to issue the command "sudo adduser developer" and "developer" immediately have access to subversion repositories.

At the moment, I must first create a linux user then create subversion user with the following:

sudo htpasswd -m /var/lib/svn/mainrepo/conf/htpasswd developer

Is there a better way?

  • what protocol would you like to use? http or svn+ssh protocol – Patrick R Feb 11 '10 at 2:57

You might look at just using apache authentication, and authenticating THAT with your centralized authentication scheme:



FYI can see this topic: How to use Linux username and password with Subversion?

It uses PAM authentication for SVN accounts.

Are you interested on implement this over apache as the previous link or on a direct way to use SVN client from the command line?


I'd caution you on doing this ... Subversion caches credentials on UNIX systems in the $HOME/.subversion/servers directory - on systems without gnome-keyring this is unencrypted (although protected by user read-only permissions).

Anyone with a reasonable level of systems knowledge will be able to get round this level of protection and would therefore have the user's account password and be able to do anything as this user. If the user has sudo access they could potentially elevate their access to the root user.


There's an apache auth_pam_module that you can use. Be sure to enable https for your repository if you want to do this. The following site will walk you through it:


I especially like the example for groups:

<Location "/svn/repository">
   AuthPAM_Enabled On
   AuthType Basic
   AuthName "My Repository"
   Require group developers

That way you only have to update apache once and can add your new users to the developers group instead.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.