LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 691|回复: 1

vsftpd + mysql 问题?

[复制链接]
发表于 2010-9-7 15:12:42 | 显示全部楼层 |阅读模式
我搭了个vsftpd,想通过mysql虚拟用户认证,在网上找了很多 帖子的认证方法,总是 过不去 ,不知道 为什么。我的系统是LFS 6.6
 楼主| 发表于 2010-9-7 15:31:10 | 显示全部楼层
大致 配置 文件 如下
vsftp.conf
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
pam_service_name=vsftpd
guest_enable=YES
guest_username=ftp
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
anon_other_write_enable=YES
anon_umask=022

/etc/pam.d/vsftpd

auth required /lib/security/pam_mysql.so user=ftp passwd=ftp host=localhost db=vsftpd table=users usercolumn=name passwdcolumn=passwd crypt=2
account required /lib/security/pam_mysql.so user=ftp passwd=ftp host=localhost db=vsftpd table=users usercolumn=name passwdcolumn=passwd crypt=2

/etc/passwd

ftp:x:45:45:anonymous_user:/home/ftp:/bin/false
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表