How to add, remove, edit or change users password in a SVN (Subversion) repository

Subversion is frightening for a lot of developers as commits from every member of the team are automatically merged into the central repository, the source code of your project. This means, that with subversion, you're always at risk of introducing new bugs or conflicts with files of your codebase.

However, using any system of version control is already an advantage having in count that a lot of developer don't use any of these. The management of users in Subversion can be sometimes a headache, specially when you forget your password for your subversion repository or you're willing to add a new programmer to the project. In this article, we'll share with you how to easily manage credentials of a SVN repository modifying the passwd file of the repository.

The passwd File

The passwd file, located inside the conf folder of your SVN repository is a file that stores every user that have access to the repository with its password in plain text format. You can edit the file using an SFTP client or even from the command line using VIM or NANO. In this case, we've used FileZilla to download and edit the file with a custom text editor:

Subversion Conf Folder Content

The content of the file follows a very simple format, on every line inside the users block you can add a new user by following the format "username" equal "password":

### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.

[users]
username1 = password1
username2 = password2
username3 = password3
username4 = password4
# comments with #
# sally = sallyssecret

As you can see, this file is the holy grail to manage credentials for your SVN repository. You can change the passwords, create new users, remember the password of a forgotten account etc.

Happy coding !

This could interest you

Become a more social person