Dear Savers .... First Thank you Alan .. first : I'm new at building exec script by php ... 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 also in php script what is the variable should I use to represent of the %{User-Name} . Second : 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 third : I use radsec for auth , what is the best way to determine the active online NAS that connected to freeradius box fourth : 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 sorry for the long questions . mohammed
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
On Dec 15, 2021, at 8:02 AM, mohamed almeshal <mohammed.almeshal@hotmail.com> wrote:
first : I'm new at building exec script by php ... 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.
also in php script what is the variable should I use to represent of the %{User-Name} .
This is documented. If you read the files I told you to read, the answer is there. There's no reason for me to"cut and paste" the documentation into the mailing list. You should just read the documentation.
Second : 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
External scripts are slow, and will lower the maximum rate of authentication. In many situations, this doesn't matter.
third :
I use radsec for auth , what is the best way to determine the active online NAS that connected to freeradius box
Run the server in debug mode and read the output. The documentation might have mentioned that, at least once.
fourth :
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
If the MAC address is in SQL, in the radacct database, then just write an SQL query. Alan DeKok.
participants (3)
-
Alan DeKok -
Matthew Newton -
mohamed almeshal