<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>Hi ,
</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>I am trying to use
the mod exec command to pass the request list parameters to an external program
when there is a accounting request start is recived.</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>The below
steps i have followed.</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>1) in the Acct_users
files below statement are given.</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006></SPAN><SPAN class=184042708-23082006><FONT
face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>DEFAULT
Acct-Status-Type == Start<BR>
Exec-Program = "/usr/bin/exec-program-wait"</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>2) In the
radiusd.conf file </FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>exec
exec-program-wait
{<BR>
wait = yes</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2>
program = "exec-program-wait %{WaterCove-Bearer-Type}"</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2>
input_pairs = request</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2>
output_pairs = reply</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2> }<BR></FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>3) in the
instantiate section called the below module</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006></SPAN><SPAN class=184042708-23082006><FONT
face=Arial size=2> instantiate
{<BR><BR> exec
exec-program-wait<BR></FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>4) Ensured
the script is available in /usr/bin/exec-program-wait</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>5) Below is the
script definition</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2># For
'acct_users':<BR>#<BR>DEFAULT Acct-Status-Type ==
Start<BR>
Exec-Program="/home/shankarganesh/freeradius-1.1.2/scripts/exec-program-wait"<BR>DEFAULT
Acct-Status-Type == Stop<BR>
Exec-Program="/home/shankarganesh/freeradius-1.1.2/scripts/exec-program-wait"<BR><BR>printenv
> /tmp/exec-program-wait<BR>echo "Reply-Message += \"Hello, %u\","<BR>echo
"Reply-Message += \"PATH=$PATH\","<BR>echo Framed-IP-Address =
255.255.255.255<BR>echo "The prameter list of $* "<BR>WaterCove-Bearer-Type =
WATERCOVE_BEARER_TYPE<BR>exit 0</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>6) When i try to run
the server below error message is logged in the server , which could not
find the environment variables .</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006></SPAN><SPAN class=184042708-23082006><FONT
face=Arial size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>Ready to process
requests.<BR>rad_recv: Accounting-Request packet from host 10.45.2.42:1230,
id=0, length=223<BR> User-Name =
"steve"<BR> Acct-Status-Type =
Start<BR> Acct-Session-Id =
"0"<BR> NAS-IP-Address =
10.45.2.34<BR> Framed-IP-Address =
10.45.2.33<BR> Called-Station-Id =
"1234"<BR> Calling-Station-Id =
"4546"<BR> 3GPP-IMSI =
"12345"<BR> 3GPP-NSAPI =
"asdfgh"<BR> 3GPP-Charging-ID =
123<BR>
3GPP-GPRS-Negotiated-QoS-profile =
"wdefefr"<BR> 3GPP-GGSN-Address =
255.255.255.255<BR> 3GPP-SGSN-Address
= 255.255.255.255<BR>
WaterCove-Bearer-Type = WLAN<BR>
WaterCove-HTTP-URL = "qewweqqwe"<BR>
WaterCove-FlowTemplate-Name =
"23453255"<BR>
WaterCove-ServiceClass-Name =
"sgdfsfgd"<BR>
WaterCove-FlowTemplate-ID = 325454<BR>
WaterCove-ServiceClass-ID = 32534254<BR> Processing the preacct section of
radiusd.conf<BR>modcall: entering group preacct for request 0<BR>
modcall[preacct]: module "preprocess" returns noop for request
0<BR>rlm_acct_unique: WARNING: Attribute NAS-Port was not found in request,
unique ID MAY be inconsistent<BR>rlm_acct_unique: Hashing ',Client-IP-Address =
10.45.2.42,NAS-IP-Address = 10.45.2.34,Acct-Session-Id = "0",User-Name =
"steve"'<BR>rlm_acct_unique: Acct-Unique-Session-ID =
"a488c9e5208ecdb9".<BR> modcall[preacct]: module "acct_unique" returns ok
for request 0<BR> rlm_realm: No <A href="mailto:'@'">'@'</A>
in User-Name = "steve", looking up realm NULL<BR> rlm_realm:
No such realm "NULL"<BR> modcall[preacct]: module "suffix" returns noop
for request 0<BR> acct_users: Matched entry DEFAULT at line
7<BR> modcall[preacct]: module "files" returns ok for request
0<BR>modcall: leaving group preacct (returns ok) for request 0<BR>
Processing the accounting section of radiusd.conf<BR>modcall: entering group
accounting for request 0<BR>radius_xlat:
'/usr/local/radius/var/log/radius/radacct/10.45.2.42/detail-20060823'<BR>rlm_detail:
/usr/local/radius/var/log/radius/radacct/%{Client-IP-Address}/detail-%Y%m%d
expands to
/usr/local/radius/var/log/radius/radacct/10.45.2.42/detail-20060823<BR>
modcall[accounting]: module "detail" returns ok for request 0<BR>
modcall[accounting]: module "unix" returns noop for request
0<BR>radius_xlat:
'/usr/local/radius/var/log/radius/radutmp'<BR>radius_xlat:
'steve'<BR> rlm_radutmp: No NAS-Port seen. Cannot do
anything.<BR> rlm_radumtp: WARNING: checkrad will probably not
work!<BR> modcall[accounting]: module "radutmp" returns noop for request
0<BR>modcall: leaving group accounting (returns ok) for request
0<BR>radius_xlat: '/usr/bin/exec-program-wait'<BR>Exec-Program:
/usr/bin/exec-program-wait<BR>/usr/bin/exec-program-wait: printenv: not
found<BR>Sending Accounting-Response of id 0 to 10.45.2.42 port 1230<BR>Finished
request 0<BR>Going to the next request<BR></DIV></FONT></SPAN>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>Pls let me know
where i am doing wrong.</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>Thanks and
rgds</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2>Shankar
ganesh</FONT></SPAN></DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=184042708-23082006><FONT face=Arial
size=2> </DIV></FONT></SPAN>
<DIV><SPAN class=184042708-23082006><FONT face=Arial size=2> </DIV>
<DIV><BR></DIV></FONT></SPAN></BODY></HTML>