Joined: 26 May 2008
|Posted: Sun Oct 16, 2011 6:05 pm Post subject: *Solved* pure-ftpd with user auth from mysql fails.
I´ve run into a weird scenario where my pure-ftpd setup just broke and I cannot figure out whats the reason.
I´m using pure-ftpd with mysql user auth (http://machiel.generaal.net/index.php?subject=user_manager_pureftpd) and it have worked flaweless until a week ago.
Using the ftp administration webinterface I can login and update user details but when trying to access FTP server I get this error:
530 Login authentication failed.
I have reset passwords for some accounts but they all fail, I´l also looked into the db and double checked md5sums so the md5sum of the password I´m using is the same as in database and it is.
This is the only noteworth from /var/log/messages:
[WARNING] Authentication failed for user [user].
I have not touched the /etc/conf.d/pure-ftpd file for a long time and the IP adresses confed is correct (pure-ftpd conf, mysql conf etc).
I also cleaned / flushed the iptables rules just in case but that didnt help either.
How can something just break like that and how can I get more detailed info or errorsearch this?
While reading MAN for pure-ftpd I noticed that -d param could be used twice for more verbose output in logs, or specifically it logs both incoming and outgoing communication so I finally got something to go on.. and the error was because I had a wrong path to the mysql socket in pure-ftpd-mysql configuration.
That was one error and the next coming was that pure-ftpd made a weird hostname+domain so I had to create new user in mysql with the hostname and then it was all fixed