MySQL and postauth_query

Hugh Messenger hugh at alaweb.com
Tue May 8 04:17:16 CEST 2007


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





More information about the Freeradius-Users mailing list