> Hello,
>
> I need to perform a quick test to check the authentication mechanisms
> against a simple script written in Perl. Please, could you suggest a
> quick config lines to set-up Radius to authenticate against "script.pl"?
> Script.pl takes 3 input parameters (user, passwd and nas-ip) and upon
> execution it set error code to 0 if successful or 255 if any error is
> found (besides this, it also outputs some debug messages). I can modify
> the script if necessary.
>
> I'm new to freeradius (currently using 1.0.2 on Linux) and although I've
> read some documentation (for instance, "variables.txt" is interesting),
> it's not so easy to get the whole idea for a beginner trying to perform
> only some preliminary tests.
>
> Any help would be appreciated. TIA.
>
> Regards,
> -Román
>

If you are going to be using an external perl script, I'd recommend using
rlm_perl.  You need to build with experimental modules.  Read
experimental.conf and look for the perl section.  Then read example.pl in
src/modules/rlm_perl/example.pl

eg:

radiusd.conf

       perl {
                module = ${raddbdir}/script.pl
                func_accounting = accounting
                func_authorize = authorize
                func_authenticate = authenticate
        }


authenticate {
  perl
}


script.pl (read example.pl)

sub authenticate {
 do your authentication stuff here
 if good {
  $RAD_REPLY{"Some-Attribute"} = "Some Value";
  return RLM_MODULE_OK;
 } else {
  &radiusd::radlog(0,"Error is your error");
  return RLM_MODULE_REJECT;
 }
}

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to