From: xyon <xy...@in...> - 2007-04-04 17:12:13
|
On Wed, 2007-04-04 at 08:40 -0700, Gary W. Smith wrote: > > "SELECT pwd FROM users WHERE scalix =3D 'lastfirstscalixfirst last' AND > > ()" >=20 >=20 > In this case you could also just do 1=3D1 in the where clause. =20 Ah, I see. Thanks! >=20 > > FYI, this is an stunnel connection redirecting 127.0.0.1:3306 to a > > remote mysql host, could that have anything to do with the problems? > > MySQL from the linux command line as the user defined works fine, > > though. >=20 > This could have something to do with it. I don't do much with stunnels. >=20 >=20 > As for the debugging, are you seeing the expected SQL statement as > output in the secure log file? If so can you post the section of the > log for an entire pam-mysql access? Certainly, here it is: =3D=3D> /var/log/secure <=3D=3D Apr 4 11:24:50 scalix in.imap41d: pam_mysql - option verbose is set to "1" Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_sm_authenticate() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_open_db() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_open_db() returning 0. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_check_passwd() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_format_string() called Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_quick_escape() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - SELECT pwd FROM users WHERE scalix =3D 'UserTestscalixTest User' AND (idUsers > 0) Apr 4 11:24:50 scalix in.imap41d: pam_mysql - SELECT returned no result. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_check_passwd() returning 1. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_sql_log() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_sql_log() returning 0. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_converse() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_open_db() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_check_passwd() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_format_string() called Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_quick_escape() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - SELECT pwd FROM users WHERE scalix =3D 'UserTestscalixTest User' AND (idUsers > 0) Apr 4 11:24:50 scalix in.imap41d: pam_mysql - SELECT returned no result. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_check_passwd() returning 1. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_sql_log() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_sql_log() returning 0. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_sm_authenticate() returning 10. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_release_ctx() called. Apr 4 11:24:50 scalix in.imap41d: pam_mysql - pam_mysql_destroy_ctx() called. Apr 4 11:24:51 scalix in.imap41d: pam_mysql - pam_mysql_close_db() called. The statement used by pam_mysql (SELECT pwd FROM users WHERE scalix =3D 'UserTestscalixTest User' AND (idUsers > 0)) returns results when run from the mysql prompt. --=20 xyon ------------------------------------------------------------------------- "They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin ------------------------------------------------------------------------- |