mysql accounting

Seferovic Edvin edvin.seferovic at kolp.at
Wed Jun 14 01:19:27 CEST 2006


Hello,

I do NOT want to be rude, but sometimes searching the archives helps A LOT !
BELIEVE ME ! But for the lazy developers among you people - here is the part
that describes the needed feature. Thanks to Jamal ( of course ). This is
copy paste - so do NOT blame me ;)

---- START ----
Create a table in the radius schema (called "fails_log") to include three
columns: trial_date, username, password. 
Create a function in the database (called "fails"). The main statements
which you should write are 
"

 fails ( username1 in out char, password1 in char) return char is

v_user char:='';

v_password:='';

begin

select username , value into v_user from radcheck  where
attribute='password' and username= username1 and password=password1;

if v_user = '' then insert into fails_log values
(sysdate,username1,password1);

else return v_user;

end if;

end; 

 

"   

Update authorize_ceck_query module in sql.conf  file to be as follows: 
authorize_check_query = "SELECT id,Username,Attribute,Value,op FROM
${authcheck_table} WHERE Username =(select
fails('%{SQL-User-Name}','%{User-Password}') from dual) ORDER BY id"

 

That is all. Then you can find all failed logs inside the new created table
fails_log.

---- END ----

Regards,

Edvin Seferovic

-----Original Message-----
From: freeradius-users-bounces+edvin.seferovic=kolp.at at lists.freeradius.org
[mailto:freeradius-users-bounces+edvin.seferovic=kolp.at at lists.freeradius.or
g] On Behalf Of Sean Taylor
Sent: Donnerstag, 15. Juni 2006 07:13
To: freeradius-users at lists.freeradius.org
Subject: mysql accounting

I have a quick question on the mysql accounting.  I am working on my own
interface for managing the freeradius+mysql setup.  Everything is
working great, I can view all my users, see who's connected, add new
users, manage static vs. dynamic IP's, etc..The problem is it doesnt
seem to log authentication failures into the radacct table.  It logs all
the successes just fine, but it would be very beneficial to have it log
the failures too.  I have the sql module turned on in the accounting
section of the config and have uncommented all of the accounting
queries.  Any help appreciated.

Thanks
Sean Taylor
Systems Administrator
Valutel Communications

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




More information about the Freeradius-Users mailing list