2

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

1
  • 2
    What kind of svn server do you have? file, svn, http?
    – Wienczny
    Sep 18, 2009 at 23:18

4 Answers 4

4

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.

2

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
1

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.

1

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.howtoforge.com/subversion-trac-virtual-hosts-on-ubuntu-server

2
  • The first link is to a not suitable for work site.
    – TenG
    Oct 14, 2017 at 15:46
  • link removed. (guess domain has a new owner)
    – Freddy
    Oct 20, 2017 at 19:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .