mysql & pam problem - was "vsftpd and mysql (pam problem?)"
Luca Ferrari
fluca1978 at infinito.it
Tue Oct 30 08:44:37 UTC 2007
I tried with different values of the crypt parameter (0,1,2,3) and different
functions in the mysql backend to store the password (plain, md5, password).
I found that the only one that seems to work is the plain text one with
crypt=0, and in fact now all the pam_xxx methods are returning zero. Of
course this is not the solution I'd like, and moreover I don't understand
what is that SELECT 0, pass in the mysql command.
Any idea on how to make the password encryption working?
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option verbose is set to "1"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option user is set to "vsftpd"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option passwd is set
to "p0stgre1712SQL"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option host is set to "localhost"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option db is set to "vsftpd"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option table is set to "accounts"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option usercolumn is set to "username"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option passwdcolumn is set to "pass"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - option crypt is set to "0"
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_close_db() called.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_sm_acct_mgmt() called.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_open_db() called.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_open_db() returning 0.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_query_user_stat() called.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_format_string() called
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_quick_escape() called.
Oct 30 09:31:54 ftp last message repeated 4 times
Oct 30 09:31:54 ftp vsftpd: pam_mysql - SELECT 0, pass FROM accounts WHERE
username = 'test0'
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_sql_log() called.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_sql_log() returning 0.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_query_user_stat() returning
0.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_sm_acct_mgmt() returning 0.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_release_ctx() called.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_destroy_ctx() called.
Oct 30 09:31:54 ftp vsftpd: pam_mysql - pam_mysql_close_db() called.
On Monday 29 October 2007 Luca Ferrari's cat, walking on the keyboard, wrote:
> On Friday 26 October 2007 Luca Ferrari's cat, walking on the keyboard,
wrote:
> > Hi all,
> > I've followed line by line the instruction to configure vsftpd for using
> > accounts coming up from a mysql database here:
> > http://www.howtoforge.com/vsftpd_mysql_debian_etch_p2
>
> After enabling the verbose mode of the pam I found in the logs the
> following: Oct 29 15:20:05 ftp vsftpd: pam_mysql - SELECT pass FROM
> accounts WHERE username = 'test'
> Oct 29 15:20:05 ftp vsftpd: pam_mysql - pam_mysql_sql_log() called.
> Oct 29 15:20:05 ftp vsftpd: pam_mysql - pam_mysql_sql_log() returning 0.
> Oct 29 15:20:05 ftp vsftpd: pam_mysql - pam_mysql_check_passwd() returning
> 6. Oct 29 15:20:05 ftp vsftpd: pam_mysql - pam_sm_authenticate() returning
> 7. Oct 29 15:20:05 ftp vsftpd: pam_mysql - pam_mysql_release_ctx() called.
> Oct 29 15:20:05 ftp vsftpd: pam_mysql - pam_mysql_destroy_ctx() called. Oct
> 29 15:20:05 ftp vsftpd: pam_mysql - pam_mysql_close_db() called.
>
>
> now, since the ftp server is still responding with 530 error, I think the
> problem is in the fact that pam_mysql_check_passwrd returns 6 and
> authenticate returns 7, but I'm not sure. Anyone has an idea?
>
> Thanks,
> Luca
More information about the ubuntu-users
mailing list