SOLVED Re: pseudo-newbie exec scripts and session-time

Alan DeKok aland at deployingradius.com
Fri Jun 12 22:51:55 CEST 2009


Charles Gregory wrote:
> I did try to follow the oft-quoted (almost shoved down my throat)
> example, right from the comments within the config file....
> 
> postauth {
>    Session-Timeout := `%{exec:/usr/local/etc/timecalc %{User-Name}}`
> }

  No... that won't work.  The examples given to you weren't like that.
In 2.x, the "unlang" system can update attributes.  The proper format is
given in the documentation (lots of it), and in the examples distributed
with the server (lots of it).

> .... but I kept getting this:
> ERROR: Cannot find a configuration entry for module "Session-Timeout".

  Because that's a 2.x feature, and isn't available in 1.x.  And it's
formatted incorrectly.

> So I'm not sure why this syntax is offered up as "what to use". At the
> very least, perhaps the instruction is missing on WHERE to put that code.
> I would think a module should somehow be called in the appropriate section
> of the config file, as I've finally done it, but maybe the above syntax
> belongs somewhere else, like in the users file?

  No.  The 2.x documentation describes how it's used, and where it's
used.  See "man unlang".  That reference is also given at the top of
"radiusd.conf" in the 2.x configuration files.

> So there you have it. And I thank the people who were doing there best
> to help me out, but really, if someone had just posted "try this" and
> the two sections of code at the top of this post, I would have *known*
> that was what was *supposed* to work, and would have looked for whatever
> permission bug was obviously the true culprit.

  Even in 1.x, the radiusd.conf file contained an example module "echo"
that did this.

  While the documentation isn't perfect, a lot of this *is* documented.
 And a lot of the unhelpful answers on this list are instructing people
to read the documentation.

  Alan DeKok.



More information about the Freeradius-Users mailing list