Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

UPDATE #3: I think I found it.
/etc/httpd/conf.d/subversion.conf

<Location /repos>
        DAV svn
        SVNPath /var/www/svn/repos
        AuthType Basic
        AuthName "Subversion repos"
        AuthUserFile /etc/svn-auth-conf
        Require valid-user
</Location>

svn-auth-conf is in the format of

user1:$apr1$randome letters ... $random letters and numbers

I feel like I used some command line tool to add the users but I can't remember what.

UPDATE #2: locate http.conf gives these results

/usr/share/logwatch/default.conf/logfiles/http.conf
/usr/share/logwatch/default.conf/services/http.conf

I don't see anything in either of them that looked related to subversion. I can post the files here if it will help.

original question:

A few years ago, I installed and setup subversion. I don't remember how I added a user. I need to add another now, but when I checked the passwd file there were no users defined, nor was there anything set in the svnserve.conf file -- both had everything commented out. That is the only way I can find to add users via google. So I tried it:

passwd

user1 = password1
user2 = password2

svnserve.conf

anon-access = none
auth-access = write
pasword-db = passwd
authz-db - authz
realm = repos

but I can still only access it with user1, even though user1 is not a user on the linux server. Is there some other way to add users or do I have something wrong in my configuration?

update:

I've added the following line to my svnserve.conf file

authz-db = authz

then my authz file looks like this

authz [groups] devs = user1,user2

[repos:/]
devs = rw

still doesn't work. the password for user1 is different in the passwd than I use to login. So i think that subversion is not using that for authentication at all. especially since the file was empty before and I was still able to login. is there any way to make sure it uses the svnserve,passwd,authz files for authentication? is there another config file somewhere?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Subversion authentication typically has two parts. The first is a password repository of some kind. The second is an access control list. The password list is used to authenticate users and check their passwords, but you also have to set which users have access to which resources.

There are several password repository types. I am not familier with the passwd type, I use the htpasswd type that uses the same user/password files that apache does for user authentication. I add users to this file with htpasswd .htpasswd username. It looks like you may have done this step correctly for your password type.

The second part is the ACL. Subversion should have a file called access somewhere with sections for each of your repositories. You will need to add a line under the repository you want to access with username = rw to give that user read/write access to that repository.

share|improve this answer
    
i'll give it a try when I get home. that sounds familiar. –  scott Jul 1 '11 at 11:12
    
I don't think this is it. there was no .htpasswd file on my server. –  scott Jul 2 '11 at 4:20

SVN server configuration (mainly) consists of three files:

  • authz
  • passwd
  • svnserve.conf This is the main file (authz-db = authz)

So you just provide us with two config files, please check that the authz file contains:

#[the_name_of_repository:/path_in_that_repository]
[test:/]
user1 = rw
user2 = rw

for the project test you whant to grant access

share|improve this answer
    
I tried this it didn't work. the password i use to log in as user1 is different than the one i have in the passwd file. so I don't think it is using it at all. –  scott Jul 2 '11 at 4:19
    
please, check that you are using the right configuration file: what is the output for ps aux|grep svn –  Sergey Jul 2 '11 at 7:33
    
And one more question. How do you get your repos directory structure (svn:// or throught http server)? –  Sergey Jul 2 '11 at 7:35
    
root 19578 0.0 0.3 4016 664 tty1 R+ 05:15 0:00 grep svn –  scott Jul 2 '11 at 13:29
    
through http server –  scott Jul 2 '11 at 13:30

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.