Exec-Program and length of arguments

Anton Maksimenkov anton200 at gmail.com
Wed Jun 7 07:50:23 CEST 2006


Hi.

If I add to "users" file this:
"bob"   Auth-Type := Local, User-Password == "bob"
        Reply-Message = "Hello, %u",
        Exec-Program = "/home/engineer/acrad.pl User-Name=%{User-Name}
Service-Type=%{Service-Type} Acct-Status-Type=%{Acct-Status-Type}
Acct-Session-Id=%{Acct-Session-Id} Framed-Protocol=%{Framed-Protocol}
NAS-Identifier=%{NAS-Identifier} NAS-Port-Id=%{NAS-Port-Id}"

it work. But I need to pass more arguments to my program, but as far
as I can see there is some limit. If I add this:
Exec-Program = "/home/engineer/acrad.sh User-Name=%{User-Name}
Service-Type=%{Service-Type} Acct-Status-Type=%{Acct-Status-Type}
Acct-Session-Id=%{Acct-Session-Id} Framed-Protocol=%{Framed-Protocol}
NAS-Identifier=%{NAS-Identifier} NAS-Port-Id=%{NAS-Port-Id}
NAS-IP-Address=%{NAS-IP-Address}
Calling-Station-Id=%{Calling-Station-Id}
Called-Station-Id=%{Called-Station-Id}
Framed-IP-Address=%{Framed-IP-Address}
Acct-Input-Octets=%{Acct-Input-Octets}
Acct-Output-Octets=%{Acct-Output-Octets}
Acct-Input-Packets=%{Acct-Input-Packets}
Acct-Output-Packets=%{Acct-Output-Packets}
Acct-Session-Time=%{Acct-Session-Time}
Acct-Terminate-Cause=%{Acct-Terminate-Cause}"

# radiusd -sfxxyz -l stdout 2>&1
...
Module: Loaded files
 files: usersfile = "/etc/raddb/users"
 files: acctusersfile = "/etc/raddb/acct_users"
 files: preproxy_usersfile = "/etc/raddb/preproxy_users"
 files: compat = "no"
/etc/raddb/users[220]: Parse error (reply) for entry bob: Expected end
of line or comma
Errors reading /etc/raddb/users
radiusd.conf[1047]: files: Module instantiation failed.
radiusd.conf[1791] Unknown module "files".
radiusd.conf[1727] Failed to parse authorize section.

and same with "hints" file.

 The main goal is that I need to do some accounting by my script. I
saw at experimental.conf (at "perl" section), but for now I not
understand can I utilize it for my needs somehow.
 What can I do?
-- 
engineer



More information about the Freeradius-Users mailing list