MySQL and postauth_query

Cory Robson cory at cmi.net.au
Tue May 8 04:33:51 CEST 2007


The problem is with your sql server not with freeradius, I'm using the exact
same sql statement on one of my machines.

MySQL runs fine with the original statement on a Linux derivative
Seems an incompatibility issue.



-----Original Message-----
From: freeradius-users-bounces+cory=cmi.net.au at lists.freeradius.org
[mailto:freeradius-users-bounces+cory=cmi.net.au at lists.freeradius.org] On
Behalf Of Hugh Messenger
Sent: Tuesday, 8 May 2007 10:17 AM
To: freeradius-users at lists.freeradius.org
Subject: MySQL and postauth_query

Dear freeradius Alpha Geeks,

Am I loosing my mind or is there a bug in the postauth_query in the MySQL 
version of sql.conf?

I'm running freeradius 1.1.6 on RHEL4, and MySQL 5.0.37 on W2k.  Don't ask.

Out-of-box, this postauth query ...

        postauth_query = "INSERT into ${postauth_table} (id, user, pass, 
reply, date) values ('', '%{User-Name}', '%{User-Password:-Chap-Password}', 
'%{reply:Packet-Type}', NOW())"

... fails with:

        Incorrect integer value: '' for column 'id' at row 1

If I change this to remove the (auto incrementing) 'id' column ...

        postauth_query = "INSERT into ${postauth_table} (user, pass, reply, 
date) values ('%{User-Name}', '%{User-Password:-Chap-Password}', 
'%{reply:Packet-Type}', NOW())"

... it works.

   -- hugh


- 
List info/subscribe/unsubscribe? See
http://www.freeradius.org/list/users.html

__________ NOD32 2248 (20070507) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





More information about the Freeradius-Users mailing list