4

We are running a VisualSVN Server that needs ~300 users to be created. As the need to mass create users is likely to reoccur, I'd prefer not to task someone with data entry for account creation. I've found the htpasswd which has following form:

test:$apr1$5tf$V0ImysKrNpxE6XW5QwyLd0

I've edited password files for other apps/servers in the past that used MD5 hex which this clearly is not. What algorithm is this?

bahrep
  • 664
  • 1
  • 9
  • 27
somehume
  • 153
  • 1
  • 5

3 Answers3

2

"MD5 "$apr1$" + the result of an Apache-specific algorithm using an iterated (1,000 times) MD5 digest of various combinations of a random 32-bit salt and the password. See the APR source file apr_md5.c for the details of the algorithm."

More details here: http://httpd.apache.org/docs/2.2/misc/password_encryptions.html

Hope that helps!

somehume
  • 153
  • 1
  • 5
2

Alternatively you can manage VisualSVN Server users and groups using WMI.

ManagementClass userClass = new ManagementClass("root\\VisualSVN", "VisualSVN_User", null);

// Obtain in-parameters for the method
ManagementBaseObject inParams =
     userClass.GetMethodParameters("Create");

// Add the input parameters.
inParams["Name"] = "user1";
inParams["Password"] = "secret";

// Execute the method and obtain the return values.
ManagementBaseObject outParams =
    userClass.InvokeMethod("Create", inParams, null);

You can find more samples on link below: https://stackoverflow.com/questions/10017282/control-visualsvn-server-from-c-sharp

Ivan Zhakov
  • 1,806
  • 14
  • 15
-1

From the command line:

PowerShell Invoke-WmiMethod -Class VisualSVN_User -Name Create -ArgumentList 'user', 'password' -Namespace Root\VisualSVN
  • 2
    And this answers the question how? – Sven Dec 16 '16 at 20:55
  • I guess you could parse a file with the usernames and passwords, loop over it, then call the code I posted. – Michael Newcomb Dec 19 '16 at 14:02
  • I was answering this part: "As the need to mass create users is likely to reoccur, I'd prefer not to task someone with data entry for account creation". You could parse a file with the usernames and passwords, loop over it, then call the code I posted. I guess I should have commented on Ivan's answer. – Michael Newcomb Dec 19 '16 at 14:05