Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
what protocol would you like to use? http or svn+ssh protocol –  Patrick R Feb 11 '10 at 2:57
add comment

4 Answers 4

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

http://blogs.open.collab.net/svn/2007/03/subversion_ldap.html

share|improve this answer
add comment

FYI can see this topic: http://serverfault.com/questions/23644/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?

share|improve this answer
add comment

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.

share|improve this answer
add comment

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:

http://blog.eval.ca/2007/01/04/pam-authentication-for-apache-trac-and-svn/

I especially like the example for groups:

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

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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