From: xyon <xy...@in...> - 2007-04-04 15:25:31
|
Ah, I think the formatting of the email left some things out, but you are correct I did leave user.status_column and users.where_clause undefined, I thought they were not needed, I apologize. Here is what I currently have: users.host =3D 127.0.0.1; users.database =3D staging; users.db_user =3D scalix; users.db_passwd =3D mypass; users.where_clause =3D idUsers > 0; users.table =3D users; users.user_column =3D scalix; users.password_column =3D pwd; users.status_column =3D 'A'; users.password_crypt =3D 0; users.use_323_password =3D false; users.use_md5 =3D false; users.update_table =3D ; verbose =3D 1; The reason I put a where clause like that listed above is when 'users.where_clause' is defined, pam_mysql adds an "AND ()" to the end of the statement causing the query to break: "MySQL error(You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1)" "SELECT pwd FROM users WHERE scalix =3D 'lastfirstscalixfirst last' AND ()" I've rebooted just in case pam_mysql had any cached settings from stale connections, and tried with the above config, but I still receive "SELECT returned no result", while a manual query works fine. Is there further debugging I can turn on in pam_mysql? 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. On Wed, 2007-04-04 at 07:39 -0700, Gary W. Smith wrote: > > #users.where_clause =3D domainusers.active =3D 1 and domains.active=3D1= and > > servers.active =3D 1 and servers.server_name in ('servername','*'); > >=20 > > #users.table =3D domainusers inner join domains on domainusers.domain_i= d > > =3D domains.domain_id inner join servers on domains.server_id =3D > > servers.server_id; users.table =3D users; > >=20 > > users.user_column =3D scalix; > > users.password_column =3D pwd; > > #users.status_column =3D 'A'; >=20 > Why are you commenting out the where, table and status_columns? Leave > users.status_column =3D 'A' in place. It will have no impact but I > believe it's a required field. >=20 > You commented out the table and where clause but didn't put another one > in. =20 --=20 xyon ------------------------------------------------------------------------- "They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin ------------------------------------------------------------------------- |