Problems sending session-timeout

Fajar A. Nugraha list at fajar.net
Fri Feb 3 14:47:59 CET 2012


On Fri, Feb 3, 2012 at 7:54 PM, tonimanel
<antoniofernandez at fabergames.com> wrote:
> I think that I have not explained very well.
>
> I disagree Alan Dekok. Sorry if you think that I'm talking about my
> implementation, but I think that is correct to explain (or at least try)
> what happen in my case. I think that another users could have these
> problems. Or if you configure some service and it works fine, but something
> you don't know how works, what would you do?
>
> I'm using Mikrotik's field names, sorry. So I would like to know why if
> FreeRADIUS reads from radgroupcheck an attribute, it is not compared with
> NAS' attibute. In my case, I have configured in Mikrotik a location name
> that in radgroupcheck is WISPr-Location-Name, why these values were not
> compared? And another problem that I'm having is that when user login seems
> that NAS (Mikrotik in my case) does nor receive session time left
> (Session-Timeout). Why? Have I to configure something? I have added
> dictionary. Any idea?


Back up a bit.

I'm going to be blunt here. At this point I HIGHLY suggest you try to
implement a BASIC freeradius installation, from a FRESH installation
(either source or package is fine). Don't forget to read the
documentation. Create users in sql, then run the server in debug mode.
Test authentication (radtest is fine). Observe what happens.

That would give you an idea how freeradius works, without the
complexity of additional/advanced modules/configuration. You REALLY
need to understand how it works. Cause to tell the truth, you're
bordering annoying right now. I know you don't mean to, but you keep
on using your own terms, and insisting things don't work, when in fact
it might be just a simple configuration problem.

Seriously. Spend some time to learn the basics. It will help you
phrase your questions, and it will help others from giving answers you
can understand.



Now back to your question.
For the question of "why these values were not compared" in sql, you
need to learn about operators and tables. Since you seem to be using
debian or derivaties, start with /usr/share/doc/freeradius/rlm_sql.gz.
Especially read about the flow and operators. Make SURE you understand
them before asking more question.

As for why your sqlcounter not working, I'd start with looking at this
line from the debug log

[unuso]         expand: %{sql:SELECT
UNIX_TIMESTAMP()-UNIX_TIMESTAMP(AcctStartTime)
FROM radacct WHERE UserName='e58ARw' ORDER BY AcctStartTime LIMIT 1} ->
rlm_sqlcounter: No integer found in string ""

Check:
- did you customize the queries? If yes, revert it. Unless you REALLY
know what you're doing. The defaults work fine in most cases, and
often user modification butchered it.
- if it's still the default query, or you've changed it but you REALLY
know what you're doing, look at that query from debug log. Execute it
directly in your db's sql prompt.

A quick glance says you've modified the query (since the default query
all have SUM in the SELECT statement) and the modification made
sqlcounter stop working because your modified query does not return an
integer.

-- 
Fajar



More information about the Freeradius-Users mailing list