huahsin68
huahsin68

Reputation: 6989

how to recover root password in Collabnet SVN Edge?

I am using CollabNet SVN Edge as my repository server in windows, anyhow I have mess up the user accounts of this SVN including the root one. May I know how can I restore the admin account of this SVN?

Upvotes: 20

Views: 24931

Answers (5)

Clancy Bufton
Clancy Bufton

Reputation: 1

I can confirm that it's tricky to get the right password hash.

An easier way was to add my user account to the admin role.

Shutdown csvn first, then edit the csvn-production-hsqldb.script.

Look for your user primary key:

INSERT INTO USER VALUES(7,5,'LDAP_AUTH_ONLY',TRUE,'my.username','[email protected]','LDAP User','my.username')

In this example, it is 7.

Add your user primary key to the admin role:

INSERT INTO ROLE_PEOPLE VALUES(1,7)

Start csvn.

Upvotes: 0

Andrew Kondrashov
Andrew Kondrashov

Reputation: 3

  1. if you are starting from Docker - find you svn-data folder. /srv/svn-data on a host machine
  2. Find folder Conf
  3. Find svn_auth_file
  4. Its looks like admin:pass_hash. Change all after : to 21232f297a57a5a743894a0e4a801fc3
  5. log in with admin:admin

Upvotes: 0

gannu_lee
gannu_lee

Reputation: 283

In 2017, the hashed string is

INSERT INTO USER VALUES(1,2,'$2a$13$7SoSK1AUMK.Nf9NVlfSyr.OfRrYP8lyH/rOBThvBm68r5wO/A/d22',TRUE,'admin','[email protected]','admin user','Super Administrator')

and that is admin/admin

Upvotes: 8

Jeyanthan I
Jeyanthan I

Reputation: 1619

If at all you are looking for an option to reset your admin password as you have forgotten it, the only way to reset this without deleting the database is to edit it directly (it's pretty easy).

  1. Stop the Subversion Edge service on Windows or run the $ bin/csvn stop command on Linux/Solaris
  2. Find your install directory (eg, c:\csvn).This will contain a folder named data which contains a file named "csvn-production-hsqldb.script".
  3. Open this file in a text editor. Search for "'admin'" (with the single quotes) -- you should find a row that looks like this:

    INSERT INTO USER VALUES(1,2,'admin user','[email protected]',TRUE,
        '78989asdef7898abde4252aedcb4352','Super Administrator','admin')
    
  4. Replace the long encrypted password field ("789...") with this: 21232f297a57a5a743894a0e4a801fc3

  5. Save, and restart the Subversion Edge service.

    Username : admin Password : admin

should work after that.

Upvotes: 57

David W.
David W.

Reputation: 107090

CollabNet Edge uses Apache httpd for serving the Subversion repository. I don't have it installed, so I'm not 100% sure where things are stored, but the standard Apache Httpd documentation can help you out. Also refer to the online Subversion manual, and most importantly take a good look at the Apache httpd Server Configuration in Chapter 6. These can help clarify how Apache httpd and Subversion are setup and pared together. Everything is basically a front end to Apache httpd and your repository. I'd start with Chapter 6 of the Subversion online manual in the section of configuring Apache.

Cutting to the chase: See if you have a command called htpasswd on your system. This command allows you to generate the passwords for Apache. You can use this command to replace the encrypted passwords with different passwords that you do know. Make a backup copy of that svn_auth_file and see if you can use htpasswd to change your passwords to something you know.

Remember to back up every file before you mess with it, and read up about how Apache is configured in the Subversion online manual. Take a look at your Apache httpd configuration files and get an idea of how everything is put together. Then, try using htpasswd to reset your admin password.

Upvotes: 1

Related Questions