<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">And /var/AccountingProcessor.jar is accessible by the FreeRADIUS user, yes?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Check the permissions on the jar and also check that the FreeRADIUS user can launch Java.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US">Stefan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> freeradius-users-bounces+stefan.paetow=ja.net@lists.freeradius.org
 [mailto:freeradius-users-bounces+stefan.paetow=ja.net@lists.freeradius.org] <b>On Behalf Of
</b>Muhammad Usman<br>
<b>Sent:</b> 16 April 2014 14:08<br>
<b>To:</b> FreeRadius users mailing list<br>
<b>Subject:</b> Re: Executing an external program<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi,<o:p></o:p></p>
<div>
<p class="MsoNormal">I have tried to put single quotes, in that case error is<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<p class="MsoNormal">   expand: %{exec:/usr/bin/java -jar '/var/AccountingProcessor.jar' usman test} -> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">++[reply] returns updated<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Sending Accounting-Response of id 23 to 192.168.6.121 port 55006<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Finished request 1.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Cleaning up request 1 ID 23 with timestamp +11<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Going to the next request<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Error: Unable to access jarfile '/var/AccountingProcessor.jar'<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Apr 16, 2014 at 5:42 PM, Matthew Newton <<a href="mailto:mcn4@leicester.ac.uk" target="_blank">mcn4@leicester.ac.uk</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">On Wed, Apr 16, 2014 at 05:33:49PM +0500, Muhammad Usman wrote:<br>
>         update reply {<br>
>                 Tmp-String-0 = "%{exec:/usr/bin/java -jar<br>
> "/var/AccountingProcessor.jar" arg1 arg2 >> /home/user/capture.log}"<br>
>         }<o:p></o:p></p>
</div>
<p class="MsoNormal">Firing up java on each packet is likely to kill your service.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
> ++[exec] returns noop<br>
> [attr_filter.accounting_response]       expand: %{User-Name} -><br>
> <a href="mailto:muhd.usman@hotmail.com">muhd.usman@hotmail.com</a><br>
> attr_filter: Matched entry DEFAULT at line 12<br>
> ++[attr_filter.accounting_response] returns updated<br>
> ERROR: Badly formatted variable: %{exec:/usr/bin/java -jar<o:p></o:p></p>
</div>
<p class="MsoNormal">You've got quoting problems. Either escape the quotes around<br>
/var/AccountingProcessor.jar, remove them, or use ' instead.<br>
<span style="color:#888888"><br>
<span class="hoenzb">Matthew</span><br>
<br>
<br>
<span class="hoenzb">--</span><br>
<span class="hoenzb">Matthew Newton, Ph.D. <<a href="mailto:mcn4@le.ac.uk">mcn4@le.ac.uk</a>></span><br>
<br>
<span class="hoenzb">Systems Specialist, Infrastructure Services,</span><br>
<span class="hoenzb">I.T. Services, University of Leicester, Leicester LE1 7RH, United Kingdom</span><br>
<br>
<span class="hoenzb">For IT help contact helpdesk extn. 2253, <<a href="mailto:ithelp@le.ac.uk">ithelp@le.ac.uk</a>></span><br>
<span class="hoenzb">-</span><br>
<span class="hoenzb">List info/subscribe/unsubscribe? See <a href="http://www.freeradius.org/list/users.html" target="_blank">
http://www.freeradius.org/list/users.html</a></span></span><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<PRE>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
</PRE></body>
</html>