SQL log accounting and post_auth
A.L.M.Buxey at lboro.ac.uk
A.L.M.Buxey at lboro.ac.uk
Wed Apr 16 19:35:27 CEST 2008
Hi,
> Hi,
>
> I want to log accounting information and post-auth information in my sql
> database. I have an MSSQL database. In my accounting section I uncomment
> sql and sql_log. In post_auth section I uncomment sql and sql_log too.
> Here is the result I receive with debug mode
if you want to use the sql_logging function, ONLY uncomment the sql_log
and configure the sql_log{} section as required. if you activate
sql as well, then it will attempt live SQL insertion into the database
for incoming accounting packets. which version of FR are you running?
ideally you'd be with 2.x and then just activate the buffered-sql
virtual server.
> rlm_sql_log (sql_log): Processing sql_log_postauth
> expand: %{User-Name} -> guillaume
> expand: %{%{User-Name}:-DEFAULT} -> guillaume
> rlm_sql_log (sql_log): sql_set_user escaped user --> 'guillaume'
> WARNING: Deprecated conditional expansion ":-". See "man unlang" for
> details
hmm, follow what the server says...dont use that expansion check.
(i see it in your sql_log section)
> The sql_relay file contains this line
> INSERT INTO radpostauth (username, pass, reply, authdate) VALUES
> ('guillaume', 'Chap-Password','Access-Accept', '2008-04-16 10:04:59');
>
> And if I take that line and put in my sql query, it's work and
> succcesfully insert the info
yep - which is EXACTLY what radsqlrelay will do when you aim it at that file.
this isnt live insertion. it creates a log file, which you then use radsqlrelay on.
alan
More information about the Freeradius-Users
mailing list