LinuxSir.cn,穿越时空的Linuxsir!

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

我的proftpd怎么了,大家帮我啊,tony请进──────》

[复制链接]
发表于 2005-6-5 22:11:24 | 显示全部楼层 |阅读模式
:help  :help  :help  :help  :help
我是想建一个mysql的数据库,用里面的数据做用户登陆,可是一个用户一不让登陆,530错误!!怎么办,
我是根据tony的帖子做的,帖子在2楼:


我的proftpd.conf
#
# /etc/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.
#

ServerName                        "Debian"
ServerType                        standalone
DeferWelcome                        off

MultilineRFC2228                on
DefaultServer                        on
ShowSymlinks                        on

TimeoutNoTransfer                600
TimeoutStalled                        600
TimeoutIdle                        1200

DisplayLogin                    welcome.msg
DisplayFirstChdir               .message
ListOptions                        "-l"

DenyFilter                        \*.*/

# Uncomment this if you are using NIS or LDAP to retrieve passwords:
#PersistentPasswd                off

# Uncomment this if you would use TLS module:
#TLSEngine                         on

# Uncomment this if you would use quota module:
#Quotas                                on

# Uncomment this if you would use ratio module:
#Ratios                                on

# Port 21 is the standard FTP port.
Port                                21

# To prevent DoS attacks, set the maximum number of child processes
# to 30.  If you need to allow more than 30 concurrent connections
# at once, simply increase this value.  Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances                        30

# Set the user and group that the server normally runs at.
User                                nobody
Group                                nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                                022  022
# Normally, we want files to be overwriteable.
AllowOverwrite                        on

# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php ... p;ID=LSS-2004-10-02
# It is on by default.
#DelayEngine                         off

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
#   User                                ftp
#   Group                                nogroup
#   # We want clients to be able to login with "anonymous" as well as "ftp"
#   UserAlias                        anonymous ftp
#   # Cosmetic changes, all files belongs to ftp user
#   DirFakeUser        on ftp
#   DirFakeGroup on ftp
#
#   RequireValidShell                off
#
#   # Limit the maximum number of anonymous logins
#   MaxClients                        10
#
#   # We want 'welcome.msg' displayed at login, and '.message' displayed
#   # in each newly chdired directory.
#   DisplayLogin                        welcome.msg
#   DisplayFirstChdir                .message
#
#   # Limit WRITE everywhere in the anonymous chroot
#   <Directory *>
#     <Limit WRITE>
#       DenyAll
#     </Limit>
#   </Directory>
#
#   # Uncomment this if you're brave.
#   # <Directory incoming>
#   #   # Umask 022 is a good standard umask to prevent new files and dirs
#   #   # (second parm) from being group and world writable.
#   #   Umask                                022  022
#   #            <Limit READ WRITE>
#   #            DenyAll
#   #            </Limit>
#   #            <Limit STOR>
#   #            AllowAll
#   #            </Limit>
#   # </Directory>
#
# </Anonymous>
DefaultRoot ~ SQLAuthTypes Plaintext Crypt SQLAuthenticate users* groups* SQLConnectInfo ftpdb@localhost proftpd password SQLUserInfo ftpuser userid passwd uid gid homedir shell SQLGroupInfo ftpgroup groupname gid members SQLMinID 500 SQLHomedirOnDemand on SQLLog PASS updatecount SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser SQLLog STOR,DELE modified SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser DeferWelcome on RootLogin off RequireValidShell off

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
 楼主| 发表于 2005-6-5 22:16:05 | 显示全部楼层
我是想建一个mysql的数据库,用里面的数据做用户登陆,可是一个用户一不让登陆,530错误!!怎么办,
我是根据tony的帖子做的,如下:
使用MySQL认证ProFTPD用户:

1. apt-get update //更新数据库

2. apt-get mysql-client mysql-server //安装MySQL

3. apt-get proftpd-mysql //安装支持MySQL的ProFTPD

说明:

    像其它守护程序一样,vsftpd提供了standalone和 inetd(inetd或xinetd)两种运行模式。简单   解释一下,standalone一次性启动,运行期间一直驻留在内存中,优点是对接入信号反应快,缺点是损耗了一定的系统资源,因此经常应用于对实时反应要求较高的专业FTP服务器。inetd恰恰相反,由于只在外部连接发送请求时才调用FTP进程,因此不适合应用在同时连接数量较多的系统

4. mysql -uroot -p //用Root登录MySQL,

create database ftpdb //建ftpdb 数据库

grant select, update on ftpdb.* to proftpd@"%" identified by 'password' //新增一个用户,用于存取ftpdb 数据库,用户名 proftpd,密码 password

use ftpdb //对 ftpdb 库操作
ftpgroup的表结构

CREATE TABLE `ftpgroup` ( `groupname` varchar(16) NOT NULL default , `gid` smallint(6) NOT NULL default '5500', `members` varchar(16) NOT NULL default , KEY `groupname` (`groupname`) ) TYPE=MyISAM;
插入一条记录

INSERT INTO `ftpgroup` VALUES ('ftpgroup', 5500, 'ftpuser');
ftpuser的表结构

CREATE TABLE `ftpuser` ( `id` int(10) unsigned NOT NULL auto_increment, `userid` varchar(32) NOT NULL default , `passwd` varchar(32) NOT NULL default , `uid` smallint(6) NOT NULL default '5500', `gid` smallint(6) NOT NULL default '5500', `homedir` varchar(255) NOT NULL default , `shell` varchar(16) NOT NULL default '/sbin/nologin', `count` int(11) NOT NULL default '0', `accessed` datetime NOT NULL default '0000-00-00 00:00:00', `modified` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) TYPE=MyISAM ;
插入一条记录

INSERT INTO ftpuser (userid, passwd, uid, gid, homedir, shell) VALUES ('ftpuser', 'ftppasswd', 5501, 5500, '/tony','/sbin/nologin'); //目录/tony应该存在

5.修改/etc/proftpd.conf 加入以下内容:

DefaultRoot ~ SQLAuthTypes Plaintext Crypt SQLAuthenticate users* groups* SQLConnectInfo ftpdb@localhost proftpd password SQLUserInfo ftpuser userid passwd uid gid homedir shell SQLGroupInfo ftpgroup groupname gid members SQLMinID 500 SQLHomedirOnDemand on SQLLog PASS updatecount SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE userid='%u'" ftpuser SQLLog STOR,DELE modified SQLNamedQuery modified UPDATE "modified=now() WHERE userid='%u'" ftpuser DeferWelcome on RootLogin off RequireValidShell off

6. /etc/init.d/proftpd stop /etc/init.d/proftpd start //使用/etc/init.d/proftpd restart 似乎不能达到预期的效果

7.使用 用户名:ftpuser 密码:ftppasswd 测试
条目
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-6 09:04:56 | 显示全部楼层
我的系统用户可以登陆我的ftp,是不是在proftpd.conf有个开关阿,也不知道现在访问不访问我的mysql???
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-9 09:33:30 | 显示全部楼层
顶上去,哪位大哥帮我啊???
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-6-14 00:58:45 | 显示全部楼层
ding,ding
回复 支持 反对

使用道具 举报

发表于 2006-4-6 09:09:17 | 显示全部楼层
楼主,你的问题解决了吗?我也想知道答案!~
回复 支持 反对

使用道具 举报

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

本版积分规则

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