FTP Server and mySQL Authentication
I'm currently setting up a server for my dorm floor so we can pool photos and serve the occasional game, etc. I'm using Open-Source SuSE 10.0.
I've got Apache and mySQL working fine (as far as I can tell), but I've run into a huge stumbling block with FTP. I've tried pure-ftpd and proftpd, and have been able to get neither working- pure-ftpd I can only log in with root and the system account I made at installation, and with proftpd I can't get anyone logged in at all. I'm trying to authenticate via a mySQL database, because this would allow me to integrate FTP accounts with the web interface, and adding a system account for each user would get messy (there are some 75 people on the floor). Obviously I'm doing something very wrong, but I don't know where to start... "Login failed" is really not very helpful as far as figuring out the problem. :\ So, if someone could let me know of a way to get more specific error information, I could get closer to the issue and ask some more specific questions. Any help from someone who's used mySQL authentication with pure-ftpd or proftpd (ar any other software I can use) would be very appreciated. Also, I'm a bit confused about how mysql acounts translate into system accounts, and the whole linux user/group system in general... please excuse me for being a helpless newbie. :x Thanks. |
Update...
After some frustrated fiddling, I got into the system log and discovered that pure-ftpd was reporting that "The SQL server seems to be down". I'm pretty sure that this is not the case, seeing as how I can log into the mySQL command line in the terminal. Thus, I'm guessing it has something to do with my configuration. This is the mySQL configuration for pure-ftpd. Can someone tell me if something is wrong with it? Code:
############################################## |
This may seem like a stupid question but, did you create a "users" database with a "users" table?
By default, mysql has a "mysql" database, and you can add others. Are you sure about using unix sockets as opposed to the tcp/ip loopback device? I'll admit that I'm asking some of these questions more out of curiosity than help. I am going to need to figure out how to do this myself at some point soon... (I'm just starting to learn sql, so don't rely on me too much, though I've been tinkering with Linux for a while) |
Yeah, I set up the db via the mysql console.
After some more tinkering, it seems to work. Thanks for the help gd2shoe. ^_^ |
I've had this same problem with pureftpd and it took me hours until I found that I'm using MySQL 5 so:
"MySQL 4.1 and up uses an authentication protocol based on a password hashing algorithm that is incompatible with that used by older clients. If you upgrade the server to 4.1, attempts to connect to it with an older client may fail with the following message: shell> mysql Client does not support authentication protocol requested by server; consider upgrading MySQL client" Solution: use the older algorithm to encrypt the password of the user. mysql> SET PASSWORD FOR 'user'@'host' = OLD_PASSWORD('here_goes_password'); |
All times are GMT -5. The time now is 03:56 AM. |