I would like to import the usernames and passwords in the svn/conf/passwd file into apache's htpasswd format. Is there any utility that can help me?


I don't know of a direct utility, but you can probably rig one up with sed and htpasswd, e.g.

sed -ne "s/\(.*[^ ]\) *\= *\([^ ].*\)/htpasswd -b password_file \"\1\" \"\2\"/p"
    < svn/conf/passwd > out.sh

to build a script that'll hopefully generate the file for you. Untested, sorry - don't have apache to hand. You'll need to create the password file first.

  • Thanks this would really help me in the future! However, for now I just managed to do it by hand! :) – Shyam Mar 7 '11 at 3:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.