If you already know something about Pam, skip it and I know it might not be as much as you. You are not interested also please skip, because do not see this can also be configured.
User <-> vsftpd <-> pam module <-> user and password database
VSFTPD uses a very clever and also unix/linux standard method to authenticate users, that is, Pam. You may be unfamiliar with Pam, but you've been using it. The so-called Pam, English is: Pluggable authentication Modules, pluggable authentication module (do not know if this translation is right). See plug this keyword, you know is very flexible.
Now almost all daemon programs are typically certified with Pam, including TELNET/SSHD/IMAPD, even your login, using Pam
The biggest benefit of Pam is flexibility. It doesn't matter what data format your users and passwords use (database or password files), as long as there is a corresponding PAM module can be stored. For example, we can not only use VSFTPD + pgsql to do user login verification, as long as you like you can also use the MYSQL,ORACLE,LDAP database to store user data, as long as the corresponding Pam can. All daemon can use a background database to do user authentication login, including telnet/sshd and so on.
1. System version for centos6.0, directly with Yum to install VSFTPD
[root@localhost ~] #yum-y install vsftpd db4-devel db4 db4-utils pam-devel pam PAM_PKCS11 FTP//installer software and VSFTPD
2.[root@localhost ~] #chkconfig vsftpd on//boot 2345 start vsftpd service
3.[root@localhost ~] #cp-rf/etc/vsftpd/vsftpd.conf/etc/vsftpd/vsftpd.conf.1//backup vsftpd.conf for VSFTPD.CONF.1
4.[root@localhost ~] #grep-V "#"/etc/vsftpd/vsftpd.conf.1>/etc/vsftpd/vsftpd.conf//Remove # number Redirect to/etc/vsftpd/ vsftpd.conf file.
5.[root@localhost ~] #cat/etc/vsftpd/vsftpd.conf//vsftpd.conf contents are as follows:
anonymous_enable=no# settings do not allow anonymous access
local_enable=yes# settings are accessible to local users. Note: If you use a virtual host user, all virtual users will not be able to access the project if it is set to No.
#chroot_list_enable =yes #使用户不能离开主目录我这句是没加入的加入就登录不了不知道为什么?
Write_enable=yes
local_umask=022//Generate mask is 022
Dirmessage_enable=yes
Xferlog_enable=yes
Connect_from_port_20=yes
xferlog_file=/var/log/vsftpd.log# set the VSFTPD service log save path. Note that the file does not exist by default. You have to touch it manually.
Xferlog_std_format=yes
Ascii_upload_enable=yes #允许使用ASCII模式上传
Ascii_download_enable=yes #设定支持ASCII模式的上传和下载功能.
Listen=yes
guest_enable=yes# settings enable Virtual user features
guest_username=vritual# Specifies the host user of the virtual user. There is already a built-in FTP user in-rhel/centos I am here to create my own vritual
Pam_service_name=vsftpd#pam Authentication file name. Pam will be certified according to/ETC/PAM.D/VSFTPD
user_config_dir=/etc/vsftpd/vuser_conf# set the virtual user personal vsftp Rhel/centos FTP service file storage path. CentOS FTP service file with Virtual user personality (Profile name = Virtual user name)
Virtual_use_local_privs=yes