how I can send Username,password,.... to exec program, and in php script, how return access-accept back to freeradius. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
Pezhman Lali wrote:
how I can send Username,password,.... to exec program, and in php script, how return access-accept back to freeradius.
Each of the attributes in the request will be available in an environment variable. You could look at the following example: http://freeradius.org/radiusd/scripts/exec-program-wait FreeRADIUS is using the exit status of the script. If the script returns a non-zero exit status, access will be denied to the user. With a zero-exit status, access is granted. -- Nicolas Baradakis
On Tue, 14 Feb 2006, Pezhman Lali wrote:
how I can send Username,password,.... to exec program, and in php script, how return access-accept back to freeradius.
$_ENV contains everything in the packet. Try this. $ touch /somedirectory/php.log $ chown whateveruser:whatevergroup /somedirectory/php.log $ vi yourphpfile.php #!/usr/local/bin/php <? $f = fopen('/somedirectory/php.log','a'); fwrite($f,print_r($_ENV,TRUE)); fclose($f); ?> Then send a radius packet You can fail with exit(1); and that will send an access-reject. Or, you can send back request items or reply items and use those within freeradius (such as the users file).
participants (3)
-
Dusty Doris -
Nicolas Baradakis -
Pezhman Lali