Freeraadius stale sessions (no SQL scenario)
Roman
romeo.r at gmail.com
Thu Nov 3 13:39:04 CET 2016
Hi all.. Sry for last mail.
So I've ran freeradius -X and have seen that debug said "no nas type or
type set to other" was there. That was due to typo in my clients.conf file.
So I've fixed that and now it works fine. It takes a bit more time to login
for users now, but no stale sessions anymore. Anyway I've got only 1
simultaneous session allowed there, so this workaround works fine.
Sorry.
If someone has a bit more accurate solution for mu issue, don't be shy to
share :)
2016-11-03 13:18 GMT+02:00 Roman <romeo.r at gmail.com>:
> Hi,
>
> Sometimes I do some networking downtimes and during these periods I'm
> getting pretty much stale sessions in radwho output. I understand why it
> happens, but all I want to do is to clear them automatically, when user
> logs in.
>
> So what I've done is added this line:
>
> *exec("/usr/bin/radzap", "-u", $ARGV[3], "127.0.0.1", "secret");*
>
> to this part of checkrad code for mikrotik sub.
>
> #lets return something
> if ($username_seen > 0) {
> return 1;
> } else {
> exec("/usr/bin/radzap", "-u", $ARGV[3], "127.0.0.1", "secret");
> return 0;
> }
> }
>
> If I understand it right, this code works like:
> if there is a username logged in on NAS, then we return 1, which means
> error, I guess?
> if there are none, we return 0, which is OK I guess? So I just want to
> clear (if there any) the stale session for user, if he's not logged in on
> NAS, but for some reason has stale session on freeradius server (visible in
> radwho)
>
> But.. nothing happens. If I execute the command from the shell, it works..
> So as I'm not a programmer, I think, that I must be added this line to the
> wrong place of radcheck script. Any help?
>
>
>
> --
> Best regards,
> Roman.
>
--
Best regards,
Roman.
More information about the Freeradius-Users
mailing list