1

I'm stuck with Freeradius. Need to run a scripts with radius exec module. Everything works fine in debug mode (radius -X), but when I run it as a service in background it looks like exec service stop to work, nothing is execited, there is a permissions issue or there is a bug. Here is more info on configuration in exec module. Nothing special in raddb/radiusd.conf

modules {
$INCLUDE ${confdir}/modules/
...
$INCLUDE sites-enabled/

raddb/module/exec

exec exe_module {
wait = yes
program = "/bin/bash /var/testscript/test.sh %{User-Name} %{Framed-IP-Address} %{Acct-Status-Type}"
input_pairs = request
output_pairs = reply
shell_escape = yes
output = file
}
exec exe_module_stop {
wait = yes
program = "/bin/sh /var/testscript/test_delete.sh %{User-Name} %{Framed-IP-Address} %{Acct-Status-Type}"
input_pairs = request
output_pairs = reply
}
exec {
wait = yes
input_pairs = request
shell_escape = yes
output = none

}

raddb/sites-available/default

accounting {
detail
unix
radutmp
main_pool
sql
sql_log

if (Acct-Status-Type == Start) {
exe_module
}
if (Acct-Status-Type == Stop) {
exe_module_stop
}
attr_filter.accounting_response
}

Again everything works in debug when I run it as user. Once I start it as a service it doesn't do anything. Please help! Pain 10 of 10

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Neftanic
  • 111

1 Answers1

1

In freeradius/sites-enabled/default, inside authorize{} section, authorize { .. update control { Auth-Type := /etc/freeradius/radiusAuthentication.py %{Connect-Info} %{Filter-Id} } } try this to execute the external scripts in daemon mode.

Barathi
  • 11