proftpd+mysql 验证。登录ftp localhost 时候失败



proftpd.conf的配置内容如下:但是报错,日志如下2018-06-04 09:58:51,008 mod_sql/4.3[14619]: SQLMinUserUID      : 2001
2018-06-04 09:58:51,008 mod_sql/4.3[14619]: SQLMinUserGID      : 2001
2018-06-04 09:58:51,008 mod_sql/4.3[14619]: SQLDefaultUID      : 65533
2018-06-04 09:58:51,008 mod_sql/4.3[14619]: SQLDefaultGID      : 65533
2018-06-04 09:58:51,008 mod_sql/4.3[14619]: <<< sql_sess_init
2018-06-04 09:58:54,679 mod_sql/4.3[14619]: >>> cmd_endpwent
2018-06-04 09:58:54,679 mod_sql/4.3[14619]: <<< cmd_endpwent
2018-06-04 09:58:54,679 mod_sql/4.3[14619]: >>> cmd_endgrent
2018-06-04 09:58:54,679 mod_sql/4.3[14619]: <<< cmd_endgrent
2018-06-04 09:58:54,679 mod_sql/4.3[14619]: entering    mysql cmd_exit
2018-06-04 09:58:54,679 mod_sql/4.3[14619]: exiting     mysql cmd_exit
2018-06-04 09:58:55,780 mod_sql/4.3[14621]: defaulting to 'mysql' backend
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: backend module 'mod_sql_mysql/4.0.8'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: backend api    'mod_sql_api_v1'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: >>> sql_sess_init
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: entering    mysql cmd_defineconnection
2018-06-04 09:58:55,781 mod_sql/4.3[14621]:   name: 'default'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]:   user: 'root'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]:   host: 'localhost'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]:     db: 'proftpd'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]:   port: '3306'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]:    ttl: '0'
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: exiting     mysql cmd_defineconnection
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: connection 'default' successfully established
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: mod_sql engine     : on
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: negative_cache     : off
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: authenticate       : users groups userset groupset
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: usertable          : ftpuser
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: userid field       : userid
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: password field     : passwd
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: UID field          : uid
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: GID field          : gid
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: homedir field      : homedir
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: shell field        : shell
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: group table        : ftpgroup
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: groupname field    : groupname
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: grp GID field      : gid
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: grp members field  : members
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: SQLMinUserUID      : 2001
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: SQLMinUserGID      : 2001
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: SQLDefaultUID      : 65533
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: SQLDefaultGID      : 65533
2018-06-04 09:58:55,781 mod_sql/4.3[14621]: <<< sql_sess_init
2018-06-04 09:58:58,815 mod_sql/4.3[14621]: >>> cmd_endpwent
2018-06-04 09:58:58,815 mod_sql/4.3[14621]: <<< cmd_endpwent
2018-06-04 09:58:58,815 mod_sql/4.3[14621]: >>> cmd_endgrent
2018-06-04 09:58:58,815 mod_sql/4.3[14621]: <<< cmd_endgrent
2018-06-04 09:58:58,815 mod_sql/4.3[14621]: entering    mysql cmd_exit
2018-06-04 09:58:58,815 mod_sql/4.3[14621]: exiting     mysql cmd_exit
"/var/log/proftpd/sql.log" 276L, 19290C   

# from being group and world writable.
Umask                           022

# 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 under which the server will run.
User                            ftpuser
Group                           ftpgroup

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Set the user and group under which the server will run.
User                            ftpuser
Group                           ftpgroup

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
#DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite          on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
  DenyAll
</Limit>

LoadModule mod_sql.c
LoadModule mod_sql_mysql.c

<Global>

 #SQLBackend mysql
 SQLEngine on
 SQLAuthenticate on
 SQLLogFile /var/log/proftpd/sql.log
 # 这个 AuthTypes 网上的很多教程都是不对的。
 SQLAuthTypes Crypt

 SQLAuthenticate users* groups*
 SQLConnectInfo proftpd@localhost:3306  root #*Caskey123

 SQLUserInfo ftpuser userid passwd uid gid homedir shell
 SQLGroupInfo ftpgroup groupname gid mckend errorembers
 aaaaaaaaaaaaa 2001
 SQLMinUserUID 2001
 CreateHome on
 # Update count every time user logs in
 SQLLog PASS updatecount
 # SQLLog PASS counter
 SQLNamedQuery updatecount UPDATE “count=count+1, accessed=now() WHERE userid=’%u'” ftpuser

# Update modified everytime user uploads or deletes a file
 SQLLog STOR,DELE modified
 SQLNamedQuery modified UPDATE “modified=now() WHERE userid=’%u'” ftpuser

</Global>

# A basic anonymous configuration, no upload directories.  If you do not


猜你喜欢

转载自blog.csdn.net/loveuxinxin/article/details/80563352