How to kick a logged user

Eduardo Bejar wonka at
Tue Feb 7 23:58:57 CET 2006


Thanks for the answers. Well after testing a while and checking the dusty
radkill script, I´d like to comment, for the mailing list archive, about
what I tested/found:

- For the record: Freeradius can´t kick a logged user. There's no
configuration option on radiusd.conf or something to kick a connected user.
- To kick a user you should access the NAS and reset the port where the user
is connected to.
- To create a script for this task, you can:
	1.- Get the port where the user is logged with the radwho command.
			radwho | grep 'username' | awk '{print $3 $6}'
			(this should give you a string with the port and the
			where username is connected)
	2.- Telnet to the NAS and reset the port.
		you can use the PHPTelnet.php class 
		Then you can do something like this:
			require_once "PHPTelnet.php";
			$telnet = new PHPTelnet();
			$result =
			$command_to_send="reset ".$port;
		or adjust it with the commands that your NAS uses.

HTH someone in the future.


More information about the Freeradius-Users mailing list