Hello, I want freeradius calls an external script and send to it the User-Name it gets from the NAS in an access-request radius packet. So I am using the echo module, I configure as: # # The name of the program to execute, and it's # arguments. Dynamic translation is done on this # field, so things like the following example will # work. # #program = "/bin/echo %{User-Name}" program = "/etc/raddb/xxxx.pl %{User-Name}" # # The attributes which are placed into the # environment variables for the program. And I add this module into the authorize section after the pap module. But it does not call the script. Another thing, if I call the script like the following, then the script is executed and takes myusername as an argument. With freeradius it should to automatically the same? # ./xxxx.pl %myusername Thanks a lot -- View this message in context: http://www.nabble.com/how-to-call-an-external-script-tp25961979p25961979.htm... Sent from the FreeRadius - User mailing list archive at Nabble.com.
I want freeradius calls an external script and send to it the User-Name it gets from the NAS in an access-request radius packet.
So I am using the echo module, I configure as:
# # The name of the program to execute, and it's # arguments. Dynamic translation is done on this # field, so things like the following example will # work. # #program = "/bin/echo %{User-Name}" program = "/etc/raddb/xxxx.pl %{User-Name}" # # The attributes which are placed into the # environment variables for the program.
Why not use perl module for perl scripts?
And I add this module into the authorize section after the pap module. But it does not call the script.
pap should be listed last - put it before. So what does it do? Post the debug.
Another thing, if I call the script like the following, then the script is executed and takes myusername as an argument. With freeradius it should to automatically the same?
Yes. But perl module already makes all request attributes available in $RAD_REQUEST and it should run perl scripts faster than exec module. Ivan Kalik Kalik Informatika ISP
participants (2)
-
aangles -
Ivan Kalik