Questions
Matthew Newton
mcn at freeradius.org
Wed Dec 15 14:58:20 CET 2021
On 15/12/2021 13:02, mohamed almeshal wrote:
> I'm new at building exec script by php ...
Running external scripts with exec is nearly always a bad idea.
Especially in PHP.
A lot of people pick a language to use just because they already know it
- but it's very likely there's a much better way.
> I do read some docs about exec and I found that to build my script for update some values and telegram messages I have to build modules .
> but the doc's always refer to raddb/modules but I have freeradius 3.0.25 and it's on etc I think the alternative is mod-enabled is that ok
Yes, mods-enabled in v3.
> also in php script what is the variable should I use to represent of the %{User-Name} .
Whatever you want. The attributes with rlm_exec are passed on stdin, so
you need to read them, parse them, and output any reply attributes on
stdout.
> is the use of exec script not for auth just for some additional function will affect the speed of auth in present of unlag statments in defult config
Yes, running an external script will slow things down. Use unlang
wherever possible (and it's nearly always possible).
> I read tons of doc about MAC Auth but I need the script to check that against last mac in radacct what is the best way to do that
Use the sql module and unlang, rather than an external script.
--
Matthew
More information about the Freeradius-Users
mailing list