I want to add a user in svn on an Ubuntu machine, how would I go about doing that?

link|improve this question

2  
What kind of svn server do you have? file, svn, http? – Wienczny Sep 18 '09 at 23:18
2  
This is not a programming question, you should ask that on serverfault.com – Thomas Levesque Sep 18 '09 at 23:28
shouldn't it be superuser.com? – Mauris Sep 19 '09 at 0:55
feedback

migrated from stackoverflow.com Sep 19 '09 at 12:16

This question came from our site for professional and enthusiast programmers.

4 Answers

up vote 3 down vote accepted

In your SVN repo (note: not the checkout) there is a directory called "conf". In that directory are a few files that control users and their access to the repo:

  • svnserve.conf
  • passwd
  • authz

Read the notes at the top of those files and you should be able to add a new user and configure their read/write access to the repo.

link|improve this answer
feedback

In case you are using HTTP/WebDAV access:

  1. Locate the htpasswd file you use for listing users. This path can be found in the apache configuration for your server - grep for the word AuthUserFile.
  2. Enter htpasswd thepathtothatfile theusernametoadd
  3. When prompted enter the new password for the user, and repeat it to confirm.
  4. Now restart/graceful the apache instance controlling your repository (propably something like apache2ctl -k graceful

The user should now be active on the repository. If you also have per-directory access control set up, follow these steps as well:

  1. Locate your per-directory permissions file - grep your apache config for the term AuthzSVNAccessFile ; this will give you the path (if it is set).
  2. Either add a directory to the file ([/directory/from/root/of/repo]), or select an existing entry.
  3. Add that user underneath the appropriate entry, specifying rw for full access, or r for read-only.

Here is a sample per-directory access file:

[/]
admin = rw

[/project/trunk]
sarah = rw
mike = r
link|improve this answer
feedback

I found a few examples that does what you want. It does however depend on how subversion was installed (web or no web).

http://www.subversionary.org/howto/setting-up-a-subversion-server-on-ubuntu-gutsy-gibbon-server http://www.howtoforge.com/subversion-trac-virtual-hosts-on-ubuntu-server

link|improve this answer
feedback

Go to conf Directory in your repo

Open svnserver.conf and uncomment/add these lines if they are already not.
anon-access = read
auth-access = write
password-db = passwd

Open file named passwd in conf directory to add users, one way to add users easily is to add a line for the new user account in the format "user=password" (no quotes) to the file

Hope that helps .. :)

Thanks,
Mahesh Velaga.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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