<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<a class="moz-txt-link-abbreviated" href="mailto:A.L.M.Buxey@lboro.ac.uk">A.L.M.Buxey@lboro.ac.uk</a> a écrit :
<blockquote cite="mid:20090105121357.GA24843@lboro.ac.uk" type="cite">
  <pre wrap="">Hi,

  </pre>
  <blockquote type="cite">
    <pre wrap="">Ok, now i think's that this script are started but i don't understand  
hit, he have a lot of sub but
sub are not launched.

if i understand, i put all of my perl script into the sub test_call no ?
    </pre>
  </blockquote>
  <pre wrap=""><!---->
its quite easy. in the experimental.conf file you state
which routines you would like to be called....and then when the PERL
script is run, it will call the relevant subroutine for the
method wanted..... or, if its an auth thent he auth subroutine gets
called. if its a post-auth, then the post-auth routine gets called.
no other routine gets called unless you specifically code the
routing in the code to call another routine (basic PERL here) 

if all you want is to use PERL to do an authentication test (eg a DB call
rather than using the built-in DB support), then ensure the authentication
routine is enabled in experimental.conf, that experimental.conf is
pulled in by the FreeRADIUS config and that 'perl' is listed
in the authentication section of the FreeRADIUS config. (be that radiusd.conf
or sites-enabled/whatever-file)

its quite easy to test/debug by uncommenting all the test/debug routines
in the example.pl  and maybe by even opening your own file, writing
junk to it...and then closing it.  tail that file as you test.

alan
-
  </pre>
</blockquote>
<br>
Very thanks for your help Alan ;=)<br>
<br>
I start a new test with:<br>
<br>
in radiusd.conf:<br>
<br>
modules {<br>
        perl {<br>
                #<br>
                #  The Perl script to execute on authorize,
authenticate,<br>
                #  accounting, xlat, etc.  This is very similar to using<br>
                #  Exec-Program-Wait = "/path/foo.pl", but it is
persistent,<br>
                #  and therefore faster.<br>
                #<br>
                module = "/etc/raddb/Test-Auth.pl"<br>
                func_accounting = accounting<br>
                func_authenticate = authenticate<br>
                func_authorize = authorize<br>
                func_preacct = preacct<br>
                func_checksimul = checksimul<br>
                func_xlat = xlat<br>
        }<br>
}<br>
<br>
authorize {<br>
}<br>
<br>
authenticate {<br>
        Auth-Type Perl {<br>
                perl<br>
        }<br>
}<br>
<br>
in users.conf:<br>
<br>
DEFAULT Auth-Type = Perl<br>
        Fall-Through = 1<br>
<br>
<br>
<br>
<br>
If i understand, when he receive a authentification request of my
cisco, he start the script<br>
(Test-Auth.pl are a copy of example.pl)<br>
<br>
it's correct ?<br>
<br>
<br>
</body>
</html>