3)Modify the file's permission:
chmod 600 /etc/vsftpd/vsftpd_login.db
4)Create a PAM file which uses your new database
/etc/pam.d/ftp:
auth required /lib/security/pam_userdb.so db=/etc/vsftpd_login
account required /lib/security/pam_userdb.so db=/etc/vsftpd_login
5)Set up the location of the files for the virtual users:
useradd -d /home/ftpsite virtual
ls -ld /home/ftpsite
(which should give):
drwx------ 3 virtual virtual 4096 Jul 30 00:39 /home/ftpsite
6)Create /etc/vsftpd/vsftpd.conf config file:
anonymous_enable=NO
local_enable=YES
write_enable=NO
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
chroot_local_user=YES
guest_enable=YES
guest_username=virtual
listen=YES
listen_port=10021
pasv_min_port=30000
pasv_max_port=30999
7) start the daemon:
vsftpd /etc/vsftpd/vsftpd.conf &
8)ftp localhost 10021
Then whatever account I offer, if always failed on authtencation the user.
So anyone here can help me? Any help is appreciated!