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 have an installation of ProFTPd and I'm trying to link authentication to that of a remote database. I have everything configured correctly except for the password hashing. The password hashes are constructed by prepending the text md5 in front of the result of the md5 hash of the password concatenated with the username. So in SQL we can replicate an example of this hashing scheme:

SELECT 'md5' || MD5('stimpy' || 'ren')

gives

md5995dab9d6bdcd572f6b4caaf5399417f

That's pretty easy. What's not been easy thus far is to replicate this hashing in the proftpd.conf file using the options available in mod_sql and mod_sql_passwd

I'm at the point now where I'm digging through the source code to see if I can implement something that way. I'm hoping someone has a better idea!

share|improve this question
2  
Bad idea! Don't re-invent the wheel! There is already crypto libs that does this job. –  F. Hauri Jul 17 '13 at 20:08

2 Answers 2

You can use LDAP or Radius to authenticate 1 or 100 machines, and it'll make administration a hell of a lot easier.

Link to ProFTPD's MOD_LDAP module

Link to ProFTPD's MOD_RADIUS module

share|improve this answer

After some really deep digging, I see that I'll probably need to code my own SQLAuthType, but it won't be so bad since there are provisions within the program for adding on custom authentication schemes, which means I won't have to modify the codebase (whew!):

http://bugs.proftpd.org/show_bug.cgi?id=2368

share|improve this answer

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.