Please find here below a correction
of the previous post in “understandable English” format
;-)
Hi all,
I have installed freeRADIUS with mySQL backend.
Into sql.conf there are defined several queries, on
of these is the following:
postauth_query =
"INSERT into ${postauth_table} (id, user, pass, reply, date) values ('',
'%{User-Name}', '%{User-Password:-Chap-Password}', '%{reply:Packet-Type}',
NOW())"
based on the previous one, I would like to build a
new query to insert user’s MAC address into radcheck table, as users
log-out (accounting-stop packet). The query is as follows:
MAC_insert_query =
"INSERT into ${authcheck_table} (UserName, Attribute, op, Value)
VALUES ('%{SQL-User-Name}', 'Calling-Station-Id', ':=', '%{Calling-Station-Id}'
where UserName != '%{SQL-User-Name}'and Attribute != 'Calling-Station-Id'
)"
From freeRADIUS logs (debug mode) I can see that
newly defined query is not recognized by freeRADIUS: no logs in produced for MAC_insert_query.
How can I let freeRADIUS accept the new defined
query?
Thank you in advance
Best regards