[mysql+freeradius]add attribute for freeradius
Fajar A. Nugraha
list at fajar.net
Thu Jul 28 09:45:34 CEST 2011
2011/7/28 gary <gary.yang at browan.com>:
> Hi All
> I would like to create radcheck table and new attribute as below.
> How do I configure the freeradius server to recognize and send the attribute
> value?
> ------------------------------------------------------------------------------
> id | username | attribute | op | value
> |
> ------------------------------------------------------------------------------
> 10000 | gary | Expiration | := | 30 Aug 2012 12:00:00|
> -------------------------------------------------------------------------------
> 10001 | gary | Cleartext-Password | := | 12345678 |
> ------------------------------------------------------------------------------
> 10002 | gary | Download-Stream | := | 1000000 |
> ------------------------------------------------------------------------------
> 10003 | gary | Upload-Stream | := | 512000 |
> ------------------------------------------------------------------------------
Let'see.
First, FR must recognize the attribute. Look at where dictionary files
are installed (usually /usr/share/freeradius or
/usr/local/share/freeradius), make sure the attribute is listed there.
If it's not, you need to get the right dictionary file (usually from
your NAS vendor). First look says Upload-Stream and Download-Stream is
not a valid radius attribute (or at least you need an additional
dictionary file).
Second, about attributes in SQL. See doc/rlm_sql. You need to
understand the difference between check items and reply items.
Third, about expiration, see raddb/modules/expiration. It should be
self-explanatory.
--
Fajar
More information about the Freeradius-Users
mailing list