NAS list with MySQL

fibie roosadhy fibie.roosadhy at gmail.com
Wed Sep 17 10:50:51 CEST 2008


i don't know what the effect of this row in rlm_sql.c

DEBUG("rlm_sql (%s): Read entry
nasname=%s,shortname=%s,secret=%s",inst->config->xlat_name,
*row[1],row[2],row[5]*);


2008/9/17 fibie roosadhy <fibie.roosadhy at gmail.com>

> i have solved the problem....this is my sql-hotspot.conf
>     # Set to 'yes' to read radius clients from the database ('nas' table)
>     readclients = yes
>     ## Table to keep radius client info
>     nas_table = "nas_10"
>     #######################################################################
>     #  NAS Query
>     #######################################################################
>     #  This query retrieves the radius clients
>     #
>     #  0. Row ID (currently unused)
>     #  1. Name (or IP address)
>     #  2. Shortname
>     #  3. Type
>     #  4. Secret
>     #######################################################################
>     nas_query = "SELECT id, nasip, shortname, secret FROM ${nas_table}"
>
> i just do the stupid trial and error....avrakadavra.....
> mysql> desc nas_10;
>
> +-------------+--------------+------+-----+---------------+----------------+
> | Field       | Type         | Null | Key | Default       | Extra
> |
>
> +-------------+--------------+------+-----+---------------+----------------+
> | id          | int(10)      | NO   | PRI | NULL          | auto_increment
> |
> | nasip       | varchar(128) | NO   | MUL | NULL          |
> |
> | shortname   | varchar(32)  | YES  |     | NULL          |
> |
> | community   | varchar(50)  | YES  |     | NULL          |
> |
> | description | varchar(200) | YES  |     | RADIUS Client |
> |
> | *secret*      | varchar(60)  | NO   |     | secret
> |                |
> | tgl_pasang  | date         | NO   |     | NULL          |
> |
>
> +-------------+--------------+------+-----+---------------+----------------+
> 7 rows in set (0.00 sec)
> i place 'secret' on 6th field. and the query works......
> but i still confuse .......WHY ???
>
>
>
> 2008/9/17 Alan DeKok <aland at deployingradius.com>
>
> fibie roosadhy wrote:
>> > dear all,
>> > i use command 'radiusd -X' to debug.i found this :
>> > rlm_sql (hotspot): - generate_sql_clients
>> > rlm_sql (hotspot): Query: SELECT * FROM nas_10
>>
>>   You edited the default queries, and broke the server.
>>
>>  Don't do that unless you understand the queries, and understand what
>> they're doing.
>>
>>  Alan DeKok.
>> -
>> List info/subscribe/unsubscribe? See
>> http://www.freeradius.org/list/users.html
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20080917/8945951e/attachment.html>


More information about the Freeradius-Users mailing list