[HELP] FreeRadius and External Script

Phibee Network Operation Center noc at phibee.net
Mon Jan 5 13:37:42 CET 2009


A.L.M.Buxey at lboro.ac.uk a écrit :
> Hi,
>
>   
>> 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 ?
>>     
>
> 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
> -
>   

Very thanks for your help Alan ;=)

I start a new test with:

in radiusd.conf:

modules {
        perl {
                #
                #  The Perl script to execute on authorize, authenticate,
                #  accounting, xlat, etc.  This is very similar to using
                #  Exec-Program-Wait = "/path/foo.pl", but it is persistent,
                #  and therefore faster.
                #
                module = "/etc/raddb/Test-Auth.pl"
                func_accounting = accounting
                func_authenticate = authenticate
                func_authorize = authorize
                func_preacct = preacct
                func_checksimul = checksimul
                func_xlat = xlat
        }
}

authorize {
}

authenticate {
        Auth-Type Perl {
                perl
        }
}

in users.conf:

DEFAULT Auth-Type = Perl
        Fall-Through = 1




If i understand, when he receive a authentification request of my cisco, 
he start the script
(Test-Auth.pl are a copy of example.pl)

it's correct ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeradius.org/pipermail/freeradius-users/attachments/20090105/8fa5d562/attachment.html>


More information about the Freeradius-Users mailing list