View Single Post
  #1  
Old 5th January 2010, 22:27
phall472 phall472 is offline
Junior Member
 
Join Date: Jan 2010
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help needed to set up vsftpd with mysql pam - 530 Login Incorrect

Hello
Although I am a PHP MySQL programmer for over 7 years I am having problems setting up vsftpd to work with mysql -pam. I had my host set it up for me as I do not know Linux at all. I had them follow the tutorial:
http://www.howtoforge.com/vsftpd_mysql_debian_etch
Both pages.

I then was able to get SmartFTP to work properly. Here is the successful login using Smart FTP:

[13:33:22] SmartFTP v4.0.1072.0
[13:33:22] Resolving host name "XXXXXXXXXXXXX"
[13:33:22] Connecting to XXXXXXXXXXXX Port: 21
[13:33:22] Connected to XXXXXXXXXXXXXXXX.
[13:33:22] 220 (vsFTPd 2.0.7)
[13:33:22] USER XXXXXXXXXXXXXXXX
[13:33:22] 331 Please specify the password.
[13:33:22] PASS (hidden)
[13:33:23] 230 Login successful.
[13:33:23] SYST
[13:33:23] 215 UNIX Type: L8

And I can see the two directories that I created in my virtual FTP in SmartFTP. So I know vsftpd mysql is working and directing SmartFTP to the correct directory.

But with FTP Commander and WS FTP I receive 530 Login Incorrect error.
Here is the connection using FTP Commander:

Connecting to XXXXXXXXXXXXXXXX , 04 Jan 2010 13:35:32
USER XXXXXXXXXXXXXX
PASS (hidden)
< 530 Login incorrect.
530 Login incorrect.
Connection closed

I have tried passive and active modes in FTP Commander.

Here is the vsftpd
auth required pam_mysql.so user=vsftpd passwd=ftpdpass host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=2
account required pam_mysql.so user=vsftpd passwd=ftpdpass host=localhost db=vsftpd table=accounts usercolumn=username passwdcolumn=pass crypt=2

Here is vfstpd.conf:
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
nopriv_user=vsftpd
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/vsftpd.pem
guest_enable=YES
guest_username=vsftpd
local_root=/home/vsftpd/$USER
user_sub_token=$USER
virtual_use_local_privs=YES
user_config_dir=/etc/vsftpd_user_conf


Any help would be appreciated.

Thank you
Reply With Quote
Sponsored Links