How do I add a user in SVN?
UPDATE #3: I think I found it.
<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
I don't see anything in either of them that looked related to subversion. I can post the files here if it will help.
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
passwdfile there were no users defined, nor was there anything set in the
svnserve.conffile -- both had everything commented out. That is the only way I can find to add users via google. So I tried it:
user1 = password1 user2 = password2
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
user1is not a user on the linux server. Is there some other way to add users or do I have something wrong in my configuration?
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?
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
accesssomewhere with sections for each of your repositories. You will need to add a line under the repository you want to access with
username = rwto give that user read/write access to that repository.