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 rlm_sql (hotspot): Reserving sql socket id: 7 rlm_sql_mysql: query: SELECT * FROM nas_10 rlm_sql (hotspot): Read entry nasname=10.11.12.0/24,shortname=gsd-lt7,*secret=gsd** lantai 7* rlm_sql (hotspot): Adding client 10.11.12.0/24 (gsd-lt7) to clients list rlm_sql (hotspot): Read entry nasname=10.11.21.0/24,shortname=gsd-lt14,*secret=**untuk** training* rlm_sql (hotspot): Adding client 10.11.21.0/24 (gsd-lt14) to clients list rlm_sql (hotspot): Released sql socket id: 7 fact,in my nas_10 table are : mysql> select * from nas_10 \G; *************************** 1. row *************************** id: 1 nasip: 10.11.12.0/24 shortname: gsd-lt7 secret: telkom community: mabes description: gsd lantai 7 tgl_pasang: 2008-09-11 *************************** 2. row *************************** id: 2 nasip: 10.11.21.0/24 shortname: gsd-lt14 secret: telkom community: lt14 description: untuk training tgl_pasang: 2008-09-11 2 rows in set (0.00 sec) can you help me please, thanks. fibie roosadhy indonesia
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.
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@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
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@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@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
fibie roosadhy wrote:
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]*);
That is *not* what's in the current version of the code. You're running a version that's over 4 years old. Upgrade. Alan DeKok.
participants (2)
-
Alan DeKok -
fibie roosadhy