i have a internal debug in sendsms.sh and shows nothing radiusd log shows nothing and freeradius -xxx shows only ue Jan 12 15:53:24 2016 : Debug: # Instantiating module "sendwelsms" from file /etc/freeradius/mods-enabled/exec Tue Jan 12 15:53:24 2016 : Debug: exec sendwelsms { Tue Jan 12 15:53:24 2016 : Debug: sendwelsms /bin/sh -c not works and still exec module failed .
Date: Tue, 12 Jan 2016 11:54:59 +0000 From: mcn4@leicester.ac.uk To: freeradius-users@lists.freeradius.org Subject: Re: FreeRadius exec module not working
On Tue, Jan 12, 2016 at 11:30:08AM +0000, Arash Shams wrote:
exec sendwelsms { wait = no program = "/root/sendsms.sh '%{User-Name} %{Huntgroup-Name}'" input_pairs = request shell_escape = yes output = file }
i passed %{User-Name} as $1 and %{Huntgroup-Name} as $2 to that script .
From the above quoting it looks like you passed "%{User-Name} %{Huntgroup-Name}" as $1 into the script.
now its not working any suggestion ?
What does the debug log say?
I suspect your program setting needs to be something more like
program = "/bin/sh -c '/root/sendsms.sh %{User-Name} %{Huntgroup-Name}'"
untested - you probably want correctly escaped quotes around the parameters.
Matthew
-- Matthew Newton, Ph.D. <mcn4@le.ac.uk>
Systems Specialist, Infrastructure Services, I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom
For IT help contact helpdesk extn. 2253, <ithelp@le.ac.uk> - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html