anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
guest_enable=YES
guest_username=tao
pam_service_name=vsftpd.vu
userlist_enable=YES
listen=YES
TCP_wrappers=YES
chroot_local_user=YES
下面是腳本
#!/bin/bash
echo qq>>/root/login.txt
echo 123456>>/root/login.txt
echo ww>>/root/login.txt
echo 123456>>/root/login.txt
echo aa>>/root/login.txt
echo 123456>>/root/login.txt
db_load -T -t hash -f /root/login.txt /etc/vsftpd/vsftpd_login.db
chmod 600 /etc/vsftpd/vsftpd_login.db
echo auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login >>/etc/pam.d/vsftpd.vu
echo account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login >>/etc/pam.d/vsftpd.vu
useradd -d /home/ftpsite cc
chmod 700 /home/ftpsite