30

How do I change the SVN password from command line?

It is the best way for me if it can be done from the command line.

2
  • I though before that SVN has authentication of the host system Unix names server or LDAP. But seems like it can also maintain it's own creds storage.. clear text on file system Commented May 3, 2011 at 23:14
  • What is the access protocol? HTTP/HTTPs, over SSH or the SVN-proprietary one? Commented May 4, 2011 at 15:11

6 Answers 6

18

There are multiple ways passwords are setup on Subversion. It depends upon the server you're using (svnserve, http, svn+ssh), and the way the administrator has set everything up.

Subversion doesn't contain a built in authentication method. Instead, it can use many different external authentication methods from the very simple to the extremely complex. Some will allow users to change their own passwords and even setup their own accounts. Others require a system administrator to do it. It all depends upon your particular setup.

  • On our site, we use Apache http to serve our Subversion repository (svn co http://server/src/repos). I've set it up to use our Windows Active Directory, so the user's username and password is their Windows' username and password. It means I don't have to handle users' I forgot my password requests, and passed the whole account headache to our Windows administrators.
  • Some sites use Apache http, but use a password file located on the Apache server itself. This is usually called htpasswd and its location is configured by the Subversion administrator. It's possible that the System administrator has a way to let the users set their own passwords, but that's not necessarily true. In this instance, you have to contact the administrator and ask them to change your password.
  • Some sites use svnserve (svn co svn://server/repos). The standard way this is setup is that there's a passwd file in the Subversion repository's config directory. This is located on the system that's running the server, and you have no access to it. Again, you have to contact the system administrator.
  • Some sites use SASL for their authentication. This can use Windows Active Directory, LDAP, or any number of authentication methods. Sometimes you can set your own password, sometimes you have to ask the administrator how it's done.

So, you're going to have to ask your Subversion administrator how to change your password. If you're lucky, there's a way to do it yourself. If not, you'll have to ask your Subversion administrator to change it.

Sign up to request clarification or add additional context in comments.

Comments

13

You must edit a file under your /repo/conf/passwd using a command line editor like Vim. There is no way to do this with Subversion command-line utilities like svnadmin.

9 Comments

Thank you for the answer. Seems like i can not access it
svn: '/svn/../conf/passwd' path not found
In my example change /repo with your full repository path, that was only an example.
the point is I am not the admin of this SVN, I do not have access to the admin machine. From the other side i can not give my password to admin and say "please change ma pass from qwerty to 12345"
You cannot change a password if you are not an admin (obviously for security reasons). You must ask for an administrator to change it for you.
|
4

If https is used, the password may be defined by Apache. This is what I needed to do to change password, in case it helps someone else:

# using root account
cd /etc/apache2
cat foo.passwd # the right user, foobar was found here
# copy the line for foobar, in case you want to restore it!
man htpasswd # a little refresher on what the command does
htpasswd foo.passwd foobar
# new password is prompted
cat foo.passwd # check that the line for this user actually got changed

Then do checkout with https to verify the right password got changed.

1 Comment

This did it for me sudo htpasswd /etc/apache2/dav_svn.passwd theUserName
2

This is what I have to do:

cd /etc/httpd/conf/svn

backup current svn-auth just in case

cp svn-auth.htdigest svn-auth.htdigest«yymmDD»
htdigest svn-auth.htdigest “Subversion Repository” «user-name»

It was ask for new passwsord

Comments

1

htpasswd -m C:\csvn\data\conf\svn_auth_file admin

Comments

-1

I recommend installing the Collabnet SubVersion Edge bundle, since it includes a Web tool for allowing users to change their passwords on their own.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.