external script problem

Alan DeKok aland at deployingradius.com
Thu Sep 20 16:59:57 CEST 2012


Tarık Kabak wrote:
> we are trying to external php script to authenticate user pass.
> radius return access-accept to nas but client ask user pass again ...

  Read scripts/exec-program-wait.

> script;
> 
> <?php                                                                     
>   $user = getenv("USER_NAME");  
>   $password = getenv("USER_PASSWORD");  
>                                                                        
>          
> echo "Access-Accept\n";                                                 

  Huh?  Why is that there?

> ?>
> 
> exec module;
> 
> exec {
>     wait = yes
>     program = "/usr/local/bin/php-5.3 /etc/raddb/php.php %{User-Name}
> %{User-Password}"

  So... you're putting the password on the command line, and also using
getenv() to get it?

  I would suggest clarifying how PHP works.

>     input_pairs = request
>     output_pairs = reply
>     shell_escape = yes
> }

  Alan DeKok.


More information about the Freeradius-Users mailing list