Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Jun 3 '11 at 11:29

This question came from our site for professional and enthusiast programmers.

1 Answer 1

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.

share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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