rlm_sql error, can't expand User-Password and Chap-Password, help me !

VU VAN HUNG vanhung2205 at gmail.com
Thu Apr 22 12:38:04 CEST 2010


szymon roczniak wrote:
> On Thu, Apr 22, 2010 at 04:50:50PM +0700, VU VAN HUNG wrote:
>
> It looks like you have a problem with this INSERT query:
>
> [..]
>   
>> [sql]     expand: INSERT INTO radpostauth                           
>> (username, pass, reply, authdate)                           VALUES 
>> (                           '%{User-Name}',                           
>> '%{%{User-Password}:-%{Chap-Password}}',                           
>> '%{reply:Packet-Type}', '%S') -> INSERT INTO 
>> radpostauth                           (username, pass, reply, 
>> authdate)                           VALUES (                           
>> 'hung',                           '',                           
>> 'Access-Accept', '2010-04-21 20:22:27')
>> rlm_sql (sql) in sql_postauth: query is INSERT INTO 
>> radpostauth                           (username, pass, reply, 
>> authdate)                           VALUES (                           
>> 'hung',                           '',                           
>> 'Access-Accept', '2010-04-21 20:22:27')
>> *rlm_sql (sql): Reserving sql socket id: 2
>> rlm_sql_mysql: MYSQL check_error: 1054 received
>> rlm_sql (sql) in sql_postauth: Database query error - Unknown column 
>> 'username' in 'field list'*
>>     
>
> Everything seems to be fine until you get to this postauth stage so I guess
> fixing the query should solve your problem.
>
>
>   
I know, but in the output,  I see the following lines:

*sql]     expand: %{User-Password} ->
[sql]     expand: %{Chap-Password} -> *

no information about User-Password and Chap-Password, and the query, 
which insert into radpostauth, is error. I dont know why.  Do you have 
any suggests about this problem ?



More information about the Freeradius-Users mailing list