kick the frozen session

Kirk Wallace kwallace at wallacecompany.com
Thu Sep 11 17:26:08 CEST 2008


On Thu, 2008-09-11 at 17:01 +0200, Przemysław Backiel wrote:
... snip
> 
> how to kick/shut down stalle session (I know the username)
> 
> 
> -- 
> Z powazaniem
> Przemyslaw Backiel

This is just a shot in the dark, but...

Do you mean something like radkill? Here is a link, then search for
"kill":
http://wiki.freeradius.org/FAQ

and try in a terminal "man radkill".

I found an old script I used to clean out stale user logins:

root at ls:~# cat accounting/radius_clean
#!/bin/sh

RM=/usr/bin/rm
TOUCH=/usr/bin/touch
CAT=/usr/bin/cat
GREP=/usr/bin/grep
ECHO=/usr/bin/echo
WC=/usr/bin/wc
CUT=/usr/bin/cut
DATE=/usr/bin/date
CP=/usr/bin/cp

IFCONFIG_CURRENT=/root/accounting/ifconfig.current
RADWHO_CURRENT=/root/accounting/radwho.current
LINK_SNAP_CURRENT=/root/accounting/link_snap.current
LINK_INFO_PREV=/root/accounting/link_info.prev

# Get snapshot of current context
timestamp=$( date "+%Y%m%d %H:%M" )
/sbin/ifconfig > $IFCONFIG_CURRENT
/usr/local/bin/radwho -R > $RADWHO_CURRENT

# Clean radius data, delete radwho sessions with no ppp connction
radius_users=$( $CAT $RADWHO_CURRENT | $GREP "User-Name" | $CUT -d"\""
-f2 )
for username in $radius_users
do
  radius_ip=$( $CAT $RADWHO_CURRENT | $GREP -A6 $username | $GREP
Framed-IP-Address | $CUT -d" " -f3 )
# Should be if ppp_ip does not exists then ...
  ppp_ip=$( $CAT $IFCONFIG_CURRENT | $GREP $radius_ip | $CUT -d":" -f3 |
$CUT -d" " -f1 )
  if [ "$radius_ip" != "$ppp_ip" ]; then
    nas_port=$( $CAT $RADWHO_CURRENT | $GREP -A6 $username | $GREP
NAS-Port | $CUT -d" " -f3 )
# todo - centralize server, password for related programs?
    /usr/local/bin/radzap -x -P $nas_port localhost 9904ginger
    /usr/local/bin/radwho -R > $RADWHO_CURRENT
  fi
done

exit 0
root at ls:~#
 




More information about the Freeradius-Users mailing list