Re: MySQL radacct not updated (Thor Spruyt)
Hi Thor, Thanks for the reply. The NAS is a Linksys WRT-54G running DD-WRT firmware. I have made no changes to the NAS configuration and up to a while ago the radacct file was being updated. I suspect that the problem is either in radiued.conf, sql.conf or the MySQL access rights. I have noticed that by inserting sql in the post-auth section of radiusd.conf it updates the radpostauth part of the database. Is there a part of radiusd.conf that needs to be changed to do the the same for radacct? Below is the output when Radius starts up. I'm sorry to fill the post with so much info but if you look at the SQL part of the startup it seems OK. Can you spot anything wrong? Starting - reading configuration files ... reread_config: reading radiusd.conf Config: including file: /usr/local/etc/raddb/proxy.conf Config: including file: /usr/local/etc/raddb/clients.conf Config: including file: /usr/local/etc/raddb/snmp.conf Config: including file: /usr/local/etc/raddb/eap.conf Config: including file: /usr/local/etc/raddb/sql.conf main: prefix = /usr/local main: localstatedir = /usr/local/var main: logdir = /usr/local/var/log/radius main: libdir = /usr/local/lib main: radacctdir = /usr/local/var/log/radius/radacct main: hostname_lookups = no main: max_request_time = 30 main: cleanup_delay = 5 main: max_requests = 1024 main: delete_blocked_requests = 0 main: port = 0 main: allow_core_dumps = no main: log_stripped_names = no main: log_file = /usr/local/var/log/radius/radius.log main: log_auth = no main: log_auth_badpass = yes main: log_auth_goodpass = yes main: pidfile = /usr/local/var/run/radiusd/radiusd.pid main: user = (null) main: group = (null) main: usercollide = no main: lower_user = no main: lower_pass = no main: nospace_user = no main: nospace_pass = no main: checkrad = /usr/local/sbin/checkrad main: proxy_requests = yes proxy: retry_delay = 5 proxy: retry_count = 3 proxy: synchronous = no proxy: default_fallback = yes proxy: dead_time = 120 proxy: post_proxy_authorize = yes proxy: wake_all_if_all_dead = no security: max_attributes = 200 security: reject_delay = 1 security: status_server = no main: debug_level = 0 read_config_files: reading dictionary read_config_files: reading naslist Using deprecated naslist file. Support for this will go away soon. read_config_files: reading clients read_config_files: reading realms radiusd: entering modules setup Module: Library search path is /usr/local/lib Module: Loaded exec exec: wait = yes exec: program = (null) exec: input_pairs = request exec: output_pairs = (null) exec: packet_type = (null) rlm_exec: Wait=yes but no output defined. Did you mean output=none? Module: Instantiated exec (exec) Module: Loaded expr Module: Instantiated expr (expr) Module: Loaded SQL Counter sqlcounter: counter-name = Max-All-Session-Time sqlcounter: check-name = Max-All-Session sqlcounter: key = User-Name sqlcounter: sqlmod-inst = sql sqlcounter: query = SELECT SUM(AcctSessionTime) FROM radacct WHERE UserName='%{%k}' sqlcounter: reset = never rlm_sqlcounter: Counter attribute Max-All-Session-Time is number 1671 rlm_sqlcounter: Check attribute Max-All-Session is number 1672 rlm_sqlcounter: Current Time: 1124906492 [2005-08-24 18:01:32], Next reset 0 [2005-08-24 18:00:00] rlm_sqlcounter: Current Time: 1124906492 [2005-08-24 18:01:32], Prev reset 0 [2005-08-24 18:00:00] Module: Instantiated sqlcounter (noresetcounter) Module: Loaded PAP pap: encryption_scheme = crypt Module: Instantiated pap (pap) Module: Loaded CHAP Module: Instantiated chap (chap) Module: Loaded MS-CHAP mschap: use_mppe = yes mschap: require_encryption = no mschap: require_strong = no mschap: with_ntdomain_hack = no mschap: passwd = (null) mschap: authtype = MS-CHAP mschap: ntlm_auth = (null) Module: Instantiated mschap (mschap) Module: Loaded preprocess preprocess: huntgroups = /usr/local/etc/raddb/huntgroups preprocess: hints = /usr/local/etc/raddb/hints preprocess: with_ascend_hack = no preprocess: ascend_channels_per_line = 23 preprocess: with_ntdomain_hack = no preprocess: with_specialix_jetstream_hack = no preprocess: with_cisco_vsa_hack = no Module: Instantiated preprocess (preprocess) Module: Loaded realm realm: format = suffix realm: delimiter = @ realm: ignore_default = no realm: ignore_null = no Module: Instantiated realm (suffix) Module: Loaded SQL sql: driver = rlm_sql_mysql sql: server = localhost sql: port = sql: login = radius sql: password = radius sql: radius_db = radius sql: acct_table = radacct sql: acct_table2 = radacct sql: authcheck_table = radcheck sql: authreply_table = radreply sql: groupcheck_table = radgroupcheck sql: groupreply_table = radgroupreply sql: usergroup_table = usergroup sql: nas_table = nas sql: dict_table = dictionary sql: sqltrace = no sql: sqltracefile = /usr/local/var/log/radius/sqltrace.sql sql: readclients = no sql: deletestalesessions = yes sql: num_sql_socks = 5 sql:
Re: MySQL radacct not updated (Thor Spruyt)
sean wrote: The NAS is a Linksys WRT-54G running DD-WRT firmware. I have made no changes to the NAS configuration and up to a while ago the radacct file was being updated. I suspect that the problem is either in radiued.conf, sql.conf or the MySQL access rights. I have noticed that by inserting sql in the post-auth section of radiusd.conf it updates the radpostauth part of the database. Is there a part of radiusd.conf that needs to be changed to do the the same for radacct? Below is the output when Radius starts up. I'm sorry to fill the post with so much info but if you look at the SQL part of the startup it seems OK. Can you spot anything wrong? Again... sending the debug output of an ACCOUNTING packet might help. Since you're not doing that, I assume the accounting packets never arrive at the radius server. Do a tcpdump on your radius server to verify that accounting packets are actually coming in! -- Groeten, Regards, Salutations, Thor Spruyt M: +32 (0)475 67 22 65 E: [EMAIL PROTECTED] W: www.thor-spruyt.com www.salesguide.be www.telenethotspot.be - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html