Executing an external program
Stefan Paetow
Stefan.Paetow at ja.net
Wed Apr 16 15:21:12 CEST 2014
And /var/AccountingProcessor.jar is accessible by the FreeRADIUS user, yes?
Check the permissions on the jar and also check that the FreeRADIUS user can launch Java.
Stefan
From: freeradius-users-bounces+stefan.paetow=ja.net at lists.freeradius.org [mailto:freeradius-users-bounces+stefan.paetow=ja.net at lists.freeradius.org] On Behalf Of Muhammad Usman
Sent: 16 April 2014 14:08
To: FreeRadius users mailing list
Subject: Re: Executing an external program
Hi,
I have tried to put single quotes, in that case error is
expand: %{exec:/usr/bin/java -jar '/var/AccountingProcessor.jar' usman test} ->
++[reply] returns updated
Sending Accounting-Response of id 23 to 192.168.6.121 port 55006
Finished request 1.
Cleaning up request 1 ID 23 with timestamp +11
Going to the next request
Error: Unable to access jarfile '/var/AccountingProcessor.jar'
On Wed, Apr 16, 2014 at 5:42 PM, Matthew Newton <mcn4 at leicester.ac.uk<mailto:mcn4 at leicester.ac.uk>> wrote:
On Wed, Apr 16, 2014 at 05:33:49PM +0500, Muhammad Usman wrote:
> update reply {
> Tmp-String-0 = "%{exec:/usr/bin/java -jar
> "/var/AccountingProcessor.jar" arg1 arg2 >> /home/user/capture.log}"
> }
Firing up java on each packet is likely to kill your service.
> ++[exec] returns noop
> [attr_filter.accounting_response] expand: %{User-Name} ->
> muhd.usman at hotmail.com<mailto:muhd.usman at hotmail.com>
> attr_filter: Matched entry DEFAULT at line 12
> ++[attr_filter.accounting_response] returns updated
> ERROR: Badly formatted variable: %{exec:/usr/bin/java -jar
You've got quoting problems. Either escape the quotes around
/var/AccountingProcessor.jar, remove them, or use ' instead.
Matthew
--
Matthew Newton, Ph.D. <mcn4 at le.ac.uk<mailto:mcn4 at 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 at le.ac.uk<mailto:ithelp at le.ac.uk>>
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
Janet(UK) is a trading name of Jisc Collections and Janet Limited, a
not-for-profit company which is registered in England under No. 2881024
and whose Registered Office is at Lumen House, Library Avenue,
Harwell Oxford, Didcot, Oxfordshire. OX11 0SG. VAT No. 614944238
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20140416/a95c26cd/attachment.html>
More information about the Freeradius-Users
mailing list