[CentOS] mysql authentication in proftpd

2011-08-26 Thread Tim Dunphy
Hello list,

 I was able to get passive mode worked out. I'm really glad I was able to do 
this. I'm able to log into the ftp server, list directories, enter 
subdirectories and upload/download files. However my next task is to enable 
virtual users using mysql. I have installed proftpd-mysql and enabled the sql 
modules in the config. 


 I found a good article on how to do this here:

 http://www.khoosys.net/single.htm?ipg=848



  I set everything up according to this article, and authentication with the 
test user I have stored in the user table is failing. 

[root@LCENT05:~] #/usr/bin/ftp -d mydomain.net
Connected to snjh.net (xx.xx.xx.xx).
220 FTP Server ready.
Name (snjh.net:root): jfuser
---> USER jfuser
331 Password required for jfuser
Password:
---> PASS 
530 Login incorrect.
Login failed.
---> SYST
215 UNIX Type: L8
Remote system type is UNIX.
Using binary mode to transfer files.


I setup a debug log session and this is what I've found:

192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'USER 
jfuser' to mod_tls
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'USER 
jfuser' to mod_core
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'USER 
jfuser' to mod_core
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'USER 
jfuser' to mod_delay
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'USER 
jfuser' to mod_auth
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching CMD command 'USER 
jfuser' to mod_auth
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching POST_CMD command 'USER 
jfuser' to mod_sql
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching POST_CMD command 'USER 
jfuser' to mod_delay
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching LOG_CMD command 'USER 
jfuser' to mod_sql
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching LOG_CMD command 'USER 
jfuser' to mod_log
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_tls
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_core
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_core
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_sql_passwd
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_sql
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_vroot
192.168.1.30 (189.15.88.64[189.15.88.64]) - mod_vroot/0.8.5: vroot registered
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_delay
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching PRE_CMD command 'PASS 
(hidden)' to mod_auth
192.168.1.30 (189.15.88.64[189.15.88.64]) - dispatching CMD command 'PASS 
(hidden)' to mod_auth
192.168.1.30 (189.15.88.64[189.15.88.64]) - USER jfuser (Login failed): No such 
user found.


It looks like authentication is bypassing mod_sql altogether and selecting 
mod_auth instead. The only authentication method I have enabled in the config 
is mod_sql so I'm not sure why this is occuring.

Here is the authentication section of my config:

# Use pam to authenticate (default) and be authoritative
#AuthPAMConfigproftpd
#AuthOrdermod_auth_pam.c* mod_auth_unix.c
AuthOrdermod_sql.c


This is my sql login section:

# SQL login 
SQLConnectInfo ftpdb@db1 proftpd secret

Which I have verified does work from the ftp server:

[root@VIRTCENT08:~] #mysql -uproftpd -psecret -h db1
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3354
Server version: 5.5.15-log MySQL Community Server (GPL) by Remi

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use ftpdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql>

I was hoping I could ask some advice as to why this doesn't work in it's 
present form. 

Here's the full config. Thanks in advance!


# This is the ProFTPD configuration file
#
# See: http://www.proftpd.org/docs/directives/linked/by-name.html

# Server Config - config used for anything outside a  or  
context
# See: http://www.proftpd.org/docs/howto/Vhost.html

ServerName"ProFTPD server"
ServerIdenton "FTP Server ready."
ServerAdminroot@localhost
DefaultServeron


# Cause every FTP user except adm to be chrooted into their home directory
# Aliasing /etc/security/pam_env.conf into the chroot allows pam_env to
# work at session-end time (http://bugzilla.redhat.com/477120)
VRootEngineon
DefaultRoot/var/www/html/jokefire.com
VRootAlias  

Re: [CentOS] mysql authentication in proftpd

2011-08-26 Thread Always Learning

Hi Tim,

>  I have installed proftpd-mysql ...

I do not know the answer. On Centos 5.x I use as FTP sever the standard
server VSftp. It has always worked problemlessly. For client I use
Filezilla. That too just works.

I do not understand why you are involving 'sql modules'.

Are you trying to transfer MySQL data to a remote server?

I use SSH (I think it is) from with Gnome to transfer some date between servers.


Best regards,

Paul
Centos 5.3, 5.4, 5.5 and 5.6 with VSftp, FileZilla, MySQL etc. - They just work 
for me.




___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] mysql authentication in proftpd

2011-08-26 Thread Always Learning

On Sat, 2011-08-27 at 01:24 +0100, Always Learning wrote:
> I use SSH (I think it is) from with Gnome to transfer some date
> between servers.

Sorry, that should be 

I use SSH (I think it is) from within Gnome to transfer some data
between servers.

(back to the ImageMagick task)

Paul.

___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos