Hii All , Please Any one have an idea how to make a PHP code to run Radclient in order to disconnect users , Thanks
try exec() or shell_exec() 2009/4/1 AHMED KHIDR <a.khidr@gmail.com>:
Hii All ,
Please Any one have an idea how to make a PHP code to run Radclient in order to disconnect users ,
Thanks - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Random quote of the week/month/whenever i get to updating it: "Opportunity knocked. My doorman threw him out." - Adrienne Gusoff "At school you don't get parole, good behavior only brings a longer sentence." - The History Boys
Thanks , I tried it but didn't work , I found another method , Here is the code , <? $user="ahmedkhidr"; $nas="1.1.1.2"; $secret="password"; $handle = popen('/bin/echo User-Name='.$user.' | /usr/local/bin/radclient -x '.$nas.':1700 disconnect '.$secret.' 2>&1', 'r'); $read = fread($handle, 2096); echo $read; pclose($handle); ?> Don't forget to chmod the /usr/local/etc/raddb/dictionary to be 644 Regards On Thu, Apr 2, 2009 at 3:14 AM, Paul Bartell <paul.bartell@gmail.com> wrote:
try exec() or shell_exec()
2009/4/1 AHMED KHIDR <a.khidr@gmail.com>:
Hii All ,
Please Any one have an idea how to make a PHP code to run Radclient in order to disconnect users ,
Thanks - List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
-- Random quote of the week/month/whenever i get to updating it: "Opportunity knocked. My doorman threw him out." - Adrienne Gusoff
"At school you don't get parole, good behavior only brings a longer sentence." - The History Boys
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
AHMED KHIDR wrote:
Hii All ,
Please Any one have an idea how to make a PHP code to run Radclient in order to disconnect users ,
Thanks
$Command = 'echo -e "User-Name=\"'.$UserName.'\", Framed-IP-Address = \"'.$FramedIP.'\", NAS-IP-Address = \"'.$NASIP.'\"" | radclient -n 1 -r 3 -x '.$RadiusIP.' disconnect '.$RadiusPassword.' 2>&1'; $CommandResult = shell_exec($Command); $CommandResult will hold the entire result. HTH Patric
I don't know why bot sometimes radclient uses up to 30% of CPU.... radius.log is empty.... On Thu, Apr 2, 2009 at 8:14 AM, Patric <patricrt@gmail.com> wrote:
AHMED KHIDR wrote:
Hii All , Please Any one have an idea how to make a PHP code to run Radclient in order to disconnect users , Thanks
$Command = 'echo -e "User-Name=\"'.$UserName.'\", Framed-IP-Address = \"'.$FramedIP.'\", NAS-IP-Address = \"'.$NASIP.'\"" | radclient -n 1 -r 3 -x '.$RadiusIP.' disconnect '.$RadiusPassword.' 2>&1';
$CommandResult = shell_exec($Command);
$CommandResult will hold the entire result.
HTH Patric
- List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
hello to all; I have a question.. and i hope I'll have a reply or an idea!! If I have to store my files of configuration (eap, keys, randoms, dh..) in a usb device, have you an idea: how can I configure my freeradius? thanks you for your help!
I have a question.. and i hope I'll have a reply or an idea!! If I have to store my files of configuration (eap, keys, randoms, dh..) in a usb device, have you an idea: how can I configure my freeradius?
Best advice - don't do that!!! Certificates are *much* safer on a server than on a USB device - what are you going to do if someone walks off with it? Path to the hard disk or path to the removable device ... Freeradius don't care. Put correct paths to the files in the configuration items. Ivan Kalik Kalik Informatika ISP
new conf wrote:
I have a question.. and i hope I'll have a reply or an idea!!
I'll give you an idea: Dont hijack threads please. Make the effort of creating a new email from scratch. Thank you. -- Chef de projet chez Vectoris Phone: +261 33 11 207 36 System: xUbuntu 8.10 with almost all from package install http://www.google.com/search?q=mihamina+rakotomandimby
to Mihamina Rakotomandimby (R12y) : it was by inattention.. sorry! thank you Ivan Kalik for your replay!! I'll send you in another email!
participants (7)
-
AHMED KHIDR -
Marinko Tarlac -
Mihamina Rakotomandimby (R12y) -
new conf -
Patric -
Paul Bartell -
tnt@kalik.net