help need with mysql statement in freeradius

Ivan Kalik tnt at kalik.net
Thu May 15 11:19:10 CEST 2008


>But my script is not working. How
>can I assign variables username and callingStationid in my script during
>authentication process. rlm_perl doc show %RAD_REQUEST{'User-name'}
>but it's not helping?
>

That's because you havent mastered even more basic things such as how to
concatenate a string. You also have difficulty distinguishing between
the name of the variable and it's value, ie. you are trying to put
names of the variables into the sql queries instead of their values.

Tips:

- have a look at example.pl and you will see how to log request
attributes (if you suspect that there is something wrong with them)

- use $query to build a query string and then print/log it in order to
find out what queries are you trying to run

- you can't use quotes within quotes if they are of the same type;
actually you can, but the result won't be what you expect - parser
does't know about "these quotes are inside those quotes" - first one
it runs into will be the start of the quote, next one will be the end

Ivan Kalik
Kalik Informatika ISP




More information about the Freeradius-Users mailing list