使用proftp和mysql用户找不到。密码失败

时间:2016-01-13 20:50:55

标签: proftpd

我想让我的proftpd使用mysql。 用户在数据库中找到但密码失败

我使用命令

创建密码
/bin/echo -n "password" | openssl dgst -binary -md5 | openssl enc -base64

然后我将该密码粘贴到db

这是日志文件的内容

mod_sql/4.2.5[13059]: query "SELECT userid, passwd, uid, gid, homedir, shell FROM ftpuser WHERE (userid='me') LIMIT 1"
mod_sql/4.2.5[13059]: entering  mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_select
mod_sql/4.2.5[13059]: user UID 48 below SQLMinUserUID 500, using SQLDefaultUID 65533
mod_sql/4.2.5[13059]: user GID 48 below SQLMinUserGID 500, using SQLDefaultGID 65533
mod_sql/4.2.5[13059]: user GID 48 below SQLMinUserGID 500, using SQLDefaultGID 65533
mod_sql/4.2.5[13059]: cache miss for user 'me'
mod_sql/4.2.5[13059]: user 'me' cached
mod_sql/4.2.5[13059]: + pwd.pw_name  : me
mod_sql/4.2.5[13059]: + pwd.pw_uid   : 65533
mod_sql/4.2.5[13059]: + pwd.pw_uid   : 65533
mod_sql/4.2.5[13059]: + pwd.pw_gid   : 65533
mod_sql/4.2.5[13059]: + pwd.pw_shell : /sbin/nologin
mod_sql/4.2.5[13059]: + pwd.pw_shell : /sbin/nologin
mod_sql/4.2.5[13059]: <<< cmd_getpwnam
mod_sql/4.2.5[13059]: >>> cmd_gid2name
mod_sql/4.2.5[13059]: cache miss for GID '65533'
mod_sql/4.2.5[13059]: cache miss for GID '65533'
mod_sql/4.2.5[13059]: : entering        mysql cmd_select
mod_sql/4.2.5[13059]: entering  mysql cmd_open
mod_sql/4.2.5[13059]: connection 'default' count is now 2
mod_sql/4.2.5[13059]: exiting   mysql cmd_open
mod_sql/4.2.5[13059]: query "SELECT groupname FROM groups WHERE (gid = 65533) LIMIT 1"
mod_sql/4.2.5[13059]: entering  mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_select
mod_sql/4.2.5[13059]: <<< cmd_gid2name
mod_sql/4.2.5[13059]: exiting   mysql cmd_select
mod_sql/4.2.5[13059]: <<< cmd_gid2name
mod_sql/4.2.5[13059]: >>> cmd_getgroups
mod_sql/4.2.5[13059]: cache hit for user 'me'
mod_sql/4.2.5[13059]: cache miss for GID '65533'
mod_sql/4.2.5[13059]: cache hit for user 'me'
mod_sql/4.2.5[13059]: cache miss for GID '65533'
mod_sql/4.2.5[13059]: : entering        mysql cmd_select
mod_sql/4.2.5[13059]: entering  mysql cmd_open
mod_sql/4.2.5[13059]: connection 'default' count is now 2
mod_sql/4.2.5[13059]: exiting   mysql cmd_open
mod_sql/4.2.5[13059]: query "SELECT groupname FROM groups WHERE (gid = 65533) LIMIT 1"
mod_sql/4.2.5[13059]: entering  mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_select
mod_sql/4.2.5[13059]: exiting   mysql cmd_select
mod_sql/4.2.5[13059]: entering  mysql cmd_escapestring
mod_sql/4.2.5[13059]: entering  mysql cmd_open
mod_sql/4.2.5[13059]: entering  mysql cmd_open
mod_sql/4.2.5[13059]: connection 'default' count is now 2
mod_sql/4.2.5[13059]: exiting   mysql cmd_open
mod_sql/4.2.5[13059]: entering  mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_escapestring
mod_sql/4.2.5[13059]: : entering        mysql cmd_select
mod_sql/4.2.5[13059]: entering  mysql cmd_open
mod_sql/4.2.5[13059]: connection 'default' count is now 2
mod_sql/4.2.5[13059]: exiting   mysql cmd_open
mod_sql/4.2.5[13059]: query "SELECT groupname, gid, members FROM groups WHERE (members = 'me' OR members LIKE 'me,%' OR members LIKE '%,me' OR members LIKE '%,me,%')"
mod_sql/4.2.5[13059]: entering  mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_select
mod_sql/4.2.5[13059]: <<< cmd_getgroups
mod_sql/4.2.5[13059]: <<< cmd_getgroups
mod_sql/4.2.5[13059]: >>> cmd_auth
mod_sql/4.2.5[13059]: entering  mysql cmd_escapestring
mod_sql/4.2.5[13059]: entering  mysql cmd_escapestring
mod_sql/4.2.5[13059]: entering  mysql cmd_open
mod_sql/4.2.5[13059]: connection 'default' count is now 2
mod_sql/4.2.5[13059]: exiting   mysql cmd_open
mod_sql/4.2.5[13059]: entering  mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' count is now 1
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_escapestring
mod_sql/4.2.5[13059]: cache hit for user 'me'
mod_sql/4.2.5[13059]: cache hit for user 'me'
mod_sql/4.2.5[13059]: >>> cmd_check
mod_sql/4.2.5[13059]: checking password using SQLAuthType 'OpenSSL'
mod_sql/4.2.5[13059]: no digest found in password hash
mod_sql/4.2.5[13059]: no digest found in password hash
mod_sql/4.2.5[13059]: 'OpenSSL' SQLAuthType handler reports failure
mod_sql/4.2.5[13059]: checking password using SQLAuthType 'Crypt'
mod_sql/4.2.5[13059]: checking password using SQLAuthType 'Crypt'
mod_sql/4.2.5[13059]: 'Crypt' SQLAuthType handler reports failure
mod_sql/4.2.5[13059]: <<< cmd_check
mod_sql/4.2.5[13059]: <<< cmd_auth
mod_sql/4.2.5[13059]: entering  mysql cmd_exit
mod_sql/4.2.5[13059]: entering  mysql cmd_close
mod_sql/4.2.5[13059]: connection 'default' closed
mod_sql/4.2.5[13059]: connection 'default' count is now 0
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_exit
mod_sql/4.2.5[13059]: exiting   mysql cmd_close
mod_sql/4.2.5[13059]: exiting   mysql cmd_exit

我认为这是关键但过去没有多少运气

mod_sql/4.2.5[13059]: checking password using SQLAuthType 'OpenSSL'
mod_sql/4.2.5[13059]: no digest found in password hash
mod_sql/4.2.5[13059]: no digest found in password hash
mod_sql/4.2.5[13059]: 'OpenSSL' SQLAuthType handler reports failure

任何帮助/想法将不胜感激

1 个答案:

答案 0 :(得分:0)

你需要在你的passwd值中添加摘要格式,比如 {md5} X03MO1qnZdYdgyfeuILPmQ ==,密码字符串中缺少{md5}值