Send Attribute Using Script
Dear, i am just planning to upgrade Freeradius to v2 , but i got my perl didnt send any atrribute , it worked fine in v1, is there any idea what wrong with my script in freeradius2 ? #!/usr/bin/perl # if ($lefttime <= 0) { print "Reply-Message=\"Your account has expired\""; exit 1; } else { print "Session-Timeout=" . $lefttime . ", "; }
Maybe try it like this if ( $lefttime le 0 ) { $RAD_REPLY{'Reply-Message'} = "Your account has expired"; return RLM_MODULE_REJECT; }else { $RAD_REPLY{'Session-Timeout'} = "$lefttime"; return RLM_MODULE_OK; On Tue, Feb 22, 2011 at 6:55 AM, christian@wanxp.com <christian@wanxp.com>wrote:
Dear,
i am just planning to upgrade Freeradius to v2 , but i got my perl didnt send any atrribute , it worked fine in v1, is there any idea what wrong with my script in freeradius2 ?
#!/usr/bin/perl #
if ($lefttime <= 0) { print "Reply-Message=\"Your account has expired\""; exit 1; } else { print "Session-Timeout=" . $lefttime . ", "; }
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
how to define $RAD_REPLY ? or no need to define ? On 2/22/2011 1:29 PM, Tyller D wrote:
Maybe try it like this
if ( $lefttime le 0 ) { $RAD_REPLY{'Reply-Message'} = "Your account has expired"; return RLM_MODULE_REJECT;
}else {
$RAD_REPLY{'Session-Timeout'} = "$lefttime"; return RLM_MODULE_OK;
On Tue, Feb 22, 2011 at 6:55 AM, christian@wanxp.com <mailto:christian@wanxp.com> <christian@wanxp.com <mailto:christian@wanxp.com>> wrote:
Dear,
i am just planning to upgrade Freeradius to v2 , but i got my perl didnt send any atrribute , it worked fine in v1, is there any idea what wrong with my script in freeradius2 ?
#!/usr/bin/perl #
if ($lefttime <= 0) { print "Reply-Message=\"Your account has expired\""; exit 1; } else { print "Session-Timeout=" . $lefttime . ", "; }
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- This message has been scanned for viruses and dangerous content by *MailScanner* <http://www.mailscanner.info/>, and is believed to be clean.
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
christian@wanxp.com wrote:
i am just planning to upgrade Freeradius to v2 , but i got my perl didnt send any atrribute , it worked fine in v1, is there any idea what wrong with my script in freeradius2 ?
You probably need to list "exec" in the "post-auth" section of raddb/sites-enabled/default Alan DeKok.
already listed , the script is working fine , the problem are the script didnt send any attribute. in v1 , script can send using print "attribute=string"; in v2 it didnt work anymore any idea how to send attribute in perl script ? On 2/22/2011 3:31 PM, Alan DeKok wrote:
christian@wanxp.com wrote:
i am just planning to upgrade Freeradius to v2 , but i got my perl didnt send any atrribute , it worked fine in v1, is there any idea what wrong with my script in freeradius2 ? You probably need to list "exec" in the "post-auth" section of raddb/sites-enabled/default
Alan DeKok. - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
christian@wanxp.com wrote:
already listed , the script is working fine , the problem are the script didnt send any attribute.
in v1 , script can send using print "attribute=string"; in v2 it didnt work anymore
As always, run it in debugging mode, and compare the outputs. It's not hard.
any idea how to send attribute in perl script ?
It works. See scripts/exec-program-wait for an example. Alan DeKok.
participants (3)
-
Alan DeKok -
christian@wanxp.com -
Tyller D