From: xyon <xy...@in...> - 2007-04-03 22:43:55
|
Hi Gary, Thank you so much for your reply. I thought I had debugging turned on with "verbose=3D1", but perhaps there's even more verbose debugging available? Here is what I've extracted from /var/log/secure (I apologize for the bad formatting in my previous message): pam_mysql - SELECT pwd FROM users WHERE scalix =3D 'UserTestscalixTest User' I didn't realize you could use a fully customized SQL statement with PAM_MySQL. Would you mind sharing some of your config, please? Thank you, On Tue, 2007-04-03 at 15:17 -0700, Gary W. Smith wrote: > Xyon,=20 >=20 > Try to turn on debugging for pam-mysql. If you do that then it will put > the full SQL statement executed into the security log (or > /var/log/secure on Linux). This will help see what pam-mysql is > thinking. It's possible that it's doing something completely different > than what your are expecting. >=20 > Personally I use a custom SQL statement with pam-mysql. >=20 > Hope that helps. >=20 > Gary Wayne Smith >=20 > > -----Original Message----- > > From: pam...@li... [mailto:pam- > > mys...@li...] On Behalf Of xyon > > Sent: Tuesday, April 03, 2007 2:06 PM > > To: pam...@li... > > Subject: [Pam-mysql-general] SELECT returned no result > >=20 > > Good day to everyone, > >=20 > > I am having a hard time getting pam_mysql to work with a custom > > database. Here is some information: > >=20 > >=20 > > Code: > >=20 > > # grep -v ^# /var/opt/scalix/sx/s/sys/pam.d/ual.remote > >=20 > > auth sufficient /lib/security/pam_mysql.so \ > > user=3Dscalix passwd=3Dmypass \ > > host=3D127.0.0.1 db=3Dstaging table=3Dusers \ > > usercolumn=3Dscalix passwdcolumn=3Dpwd \ > > crypt=3D0 verbose=3D1 > > auth required pam_deny > >=20 > > account required om_auth > > password required om_auth nullok > >=20 > >=20 > > /var/log/secure: > > Code: > >=20 > > Apr 2 17:24:45 scalix in.imap41d: pam_mysql - SELECT pwd FROM users > > WHERE scalix =3D 'UserTestscalixTest User' > > Apr 2 17:24:45 scalix in.imap41d: pam_mysql - SELECT returned no > > result. > > Apr 2 17:24:45 scalix in.imap41d: pam_mysql - > pam_mysql_check_passwd() > > returning 1. > > Apr 2 17:24:45 scalix in.imap41d: pam_mysql - pam_sm_authenticate() > > returning 10. > >=20 > >=20 > >=20 > > Code: > >=20 > > mysql> SELECT pwd FROM users WHERE scalix =3D 'UserTestscalixTest User'= ; > > +------+ > > | pwd | > > +------+ > > | test | > > +------+ > > 1 row in set (0.00 sec) > >=20 > > mysql> > >=20 > >=20 > >=20 > > As you can see running the query manually brings back results, but it > > appears it doesn't when run from pam_mysql. > >=20 > > Perhaps I have a misconfiguration in the ual.remote file? The > > ual.remote file is used by Scalix to login web/imap/pop users. > >=20 > > Is there a way to test pam_mysql without scalix being involved so I > can > > narrow down the culprits? > >=20 > > Thanks, > >=20 > > -- > > xyon > >=20 > > > ----------------------------------------------------------------------- > > -- > > "They who can give up essential liberty to obtain a little temporary > > safety deserve neither liberty nor safety." --Benjamin Franklin > > > ----------------------------------------------------------------------- > > -- >=20 --=20 xyon ------------------------------------------------------------------------- "They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin ------------------------------------------------------------------------- |