Acct-Type and MySQL
Luca Corti
cortez at tiscali.it
Wed Apr 12 12:59:12 CEST 2006
On Tue, 2006-04-11 at 18:46 +0200, Nicolas Baradakis wrote:
> You need to specify Acct-Type during "preacct". It's doable if you
> can write an acct_users file to set the Acct-Type.
>
> If you need to do it with MySQL, I've seen a patch on the bugzilla.
> http://bugs.freeradius.org/show_bug.cgi?id=264
Thanks a lot for the pointer. I've patched and installed FR 1.1.1.
Now I have set preaccounting query in my sql.conf file to
sql sql_generic {
...
preaccounting_query = "SELECT Value FROM ${groupcheck_table} WHERE
Attribute = 'Acct-Type' LIMIT 1"
}
and also set in radiusd.conf
preacct {
...
sql_generic
...
}
accounting {
Acct-Type DIALUP {
sql_dialup
}
sql_generic
}
Now my group in MySQL has
+----+-----------+-----------+----+--------+
| id | GroupName | Attribute | op | Value |
+----+-----------+-----------+----+--------+
| 25 | MYGROUP | Acct-Type | := | DIALUP |
+----+-----------+-----------+----+--------+
is this supposed to be correct? Unfortunately I get a segfault.
modcall[preacct]: module "acct_unique" returns ok for request 0
rlm_realm: No '@' in User-Name = "gi-na-napoli-a", looking up realm
NULL
rlm_realm: No such realm "NULL"
modcall[preacct]: module "suffix" returns noop for request 0
radius_xlat: 'SELECT Value FROM radgroupcheck WHERE Attribute =
'Acct-Type' LIMIT 1'
rlm_sql (sql_generic): Reserving sql socket id: 3
Segmentation fault
thanks
--
Luca Corti
PGP Key ID 1F38C091
BOFH excuse of the moment:
..disk or the processor is on fire.
More information about the Freeradius-Users
mailing list