Freeradius 2.0.5 - configure to use mysql radacct table instead of file

Alan DeKok aland at deployingradius.com
Tue Jul 22 21:33:34 CEST 2008


Vidar Hatlemark wrote:
> After a long week of reading every config file, how-to's (old, outdated,
> new, faulty and what not) and reading this mailing list archive and
> tried many test installs of freeradius I now ask for some help.
>
> Short version:
> How to configure freeradius to populate the radacct mysql table. (need
> help)

  I'm in the process of writing some more howto's on my web site.  Check
back in a week or so.

> Am I supposed to send extra parameters to the server when logging in to
> get it to populate this table?

  You're supposed to send accounting packets.  They're not the same as
authentication packets.


> But in 2.0.5 I can't find the next two steps,   cd
> /usr/share/doc/packages/freeradius/doc/examples/
> mysql -uroot -p radius < mysql.sql

  Which document says to do that?

> In fact I can't find either the mysql.sql or the db_mysql.sql stated in
> the schema.sql header.

  That's left over from it's previous name.  You're supposed to import
the "schema.sql" file.

> So I imported the schema.sql from /usr/local/etc/raddb/sql/mysql/ folder.
> This gives me the radius tables that I need so far I guess. (or is this
> wrong?)

  That's right.

> Next up was sql.conf, added mysql credentials.
> Followed by editing the /usr/local/etc/raddb/sites-available/default,
> adding sql to the authorize and accounting.

  It's there already.  It's just commented out.

> What's not - is understanding how the radacct table gets populated.

  The client has to send accounting packets.

> All I get is new entries in the
> /usr/local/var/log/radius/radacct/192.168.1.1/auth-detail-yyymmdd
> As shown here :
> 
> Tue Jul 22 14:06:55 2008
>        Packet-Type = Access-Request

  Which are not accounting packets.

> How do I redirect this (and more info) to populate the radacct table?

  You don't.  You use a client that sends accounting packets.

  If your client doesn't send accounting packets, then you can't
populate the radacct table.

  Alan DeKok.



More information about the Freeradius-Users mailing list