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

I finally got the Mina FTPServer up and running with the help of Femi (another user here).

so here's the issue:

I have the server setup for SQL based user management through db-user-manager on my Win2k3 server, and have two users set up in the table:

john // password jim // password

Both of them are set to the following table properties:

userid      userpassword        homedirectory       enableflag      writepermission     idletime        uploadrate      downloadrate        maxloginnumber      maxloginperip
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
john        password            c:\pub\john         1               0                   30              1               NULL                5                   3
jim         password            c:\pub\jim          1               0                   30              1               NULL                5                   3

And when logging in to the FTP server using the CORRECT user//password combo of john//password, the log shows this:

RECEIVED: USER john
SELECT userid, userpassword, homedirectory, enableflag, writepermission, idletime, uploadrate, downloadrate, maxloginnumber, maxloginperip FROM FTP_USER WHERE userid = 'john'
RECEIVED: PASS *****
SELECT userpassword FROM FTP_USER WHERE userid = 'john'
USER FAILED TO LOG IN
Login Failure - john
SENT: 331 user name okay, need password for john.
SENT: 530 authentication failed.
CLOSED

I KNOW for a fact that I didn't screw up entering the username or password (because they are too easy to screw up...), and the fact that I get prompted for the username and password tells me that the host I entered is correct... so where else could I be screwing up at...?

Here is a link to my original post that Femi helped me out in. it contains the xml config file if needed: Apache-Mina FTPServer Database User Manager failure

Can someone PLEASE help me?

share|improve this question

migrated from stackoverflow.com Jul 20 '11 at 18:43

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

1 Answer 1

up vote 2 down vote accepted

I noticed that in your xml code, for the user manager tag you only have

<db-user-manager>

in the documentation, it shows it as

<db-user-manager encrypt-passwords="salted">

I think this is where your problem lies. since the encryption isn't defined in your code, it defaults as MD5. change yours to one of the 3 below:

"Salted"

"MD5"

"Clear"

and you should be all set to go. Let me know if it works. The documentation is retarded and says "not required", but I call BS, since it automatically defaults to md5 if left out... so in a way it IS required if you're not using MD5 encryption on your passwords.

share|improve this answer
    
Holy shit! I can't believe it was THAT simple... boy do I feel stupid now HAHA! - Solution worked, added the encrypt-passwords bit to the line and set the encryption type, worked like a charm. Thanks a mil! :) –  Jason Jul 19 '11 at 23:27

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.