
나는 Freeradius에 갇혀 있습니다. Radius Exec 모듈을 사용하여 스크립트를 실행해야 합니다. 디버그 모드(radius -X)에서는 모든 것이 잘 작동하지만 백그라운드에서 서비스로 실행하면 exec 서비스가 작동 중지된 것처럼 보이고 아무 것도 실행되지 않으며 권한 문제가 있거나 버그가 있습니다. exec 모듈의 구성에 대한 자세한 정보는 다음과 같습니다. 특별한 것은 없습니다raddb/radiusd.conf
modules {
$INCLUDE ${confdir}/modules/
...
$INCLUDE sites-enabled/
raddb/모듈/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/사이트-사용 가능/기본
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
}
다시 사용자로 실행하면 모든 것이 디버그에서 작동합니다. 일단 서비스로 시작하면 아무 일도 하지 않습니다. 도와주세요! 고통 10/10
답변1
~ 안에freeradius/사이트 활성화/기본, 승인{} 섹션 내부,
승인 { .. 업데이트 제어 { 인증 유형 := /etc/freeradius/radiusAuthentication.py %{Connect-Info} %{Filter-Id}
} }
데몬 모드에서 외부 스크립트를 실행하려면 이것을 시도하십시오.