简体   繁体   中英

PHP Radius or radtest simple radius authinication

I'm currently shelling out to the radtest command line tool for authenticating users against a radius server:

$response = exec("radtest $user $pass $server $port $secret | grep Access-Accept")

if($response!= "") {
  echo "access granted";
}

Is there a more integrated approach, perhaps utilising a class or other such component in PHP for this, that might be more efficient or secure (somebody could replace the radtest executable with one that collects the credentials)?

Have you tried the Auth_Radius PEAR package class?

It looks like it might be the simplest integrated solution for authenticating against a Radius server. It may require you to install the PECL radius package , you might have better luck installing it than me!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM