Vsftp虚拟用户配置
Step1: 安装Vsftpd虚拟用户需用到的软件及认证模块
yum install pam* libdb-utils libdb* --skip-broken -y
Step2: 配置虚拟用户名及密码(奇数行是账号,偶数行是密码) 注意不能有空格和空行
创建虚拟用户临时文件/etc/vsftpd/ftp_user.txt,新建虚拟用户和密码,其中test001、test002为虚拟用户名,123456为密码,如果有多个用户,依次格式填写即可:
test001
123456
test002
123456
Step3: 生成Vsftpd虚拟用户数据库认证文件,设置权限:
db_load -T -t hash -f /etc/vsftpd/ftp_user.txt /etc/vsftpd/ftp_login.db
chmod 700 /etc/vsftpd/ftp_login.db
Step4: 配置PAM认证文件,/etc/pam.d/vsftpd行首加入如下两行,其余行注释掉:
auth required pam_userdb.so db=/etc/vsftpd/ftp_login
account require