problem with $radius<id>

hi, how can I use $radius to show some information on status.html page (for example)
when I use other variables from this list http://www.mikrotik.com/testdocs/ros/2.9/ip/hotspot.php everything is ok
when I put $radius<1> into status.html → “$radius1” on the web page
when I put $radius into status.html → “$radius” on the web page
I also try to put $radius-Mikrotik-Recv-Limit or $radius.Mikrotik-Recv-Limit but still nothing hapens
it looks like MT doesn’t know this variable - $radius or I don’t know how to use it :slight_smile:

I have the same question!

So many smart people here and nobody knows? :open_mouth: Neither guys from Mikrotik? At least could somebody confirm that these variables really work?

are using the format $(variable) ?

Yes, of course, but without any success. Radius variables are not working, see first message from magister2000. I have the same problem and after many experiments I have doubt that radius variables are not implemented (yet?) as they are described in the manual (if any). So I need confirm it by someone or explain, what I’m doing wrong. It’s very important for me, because I need these variables in my project.

Does anyone know how to use these variables? I can’t find any way to print them on a status page.

<html>
<head>
<title>My status page</title>
</head>
<body>
Username: $(username)<br/>
Timeout: $(radius<User-Name>)<br/>
</body>
</html>

Doesn’t work. Neither does

$(radiusUser-Name)

, or any attributes from the ACCESS-ACCEPT.

Contacted support, the following does the trick for Session-Timeout:

$(session-timeout)

Has anyone figured out how to use RADIUS variables in Hotspot pages?

Referenced here: http://www.mikrotik.com/testdocs/ros/3.0/pnp/hotspot.php

RADIUS-related variables

    * radius<id> - show the attribute identified with <id> in text string form (in case RADIUS authentication was used; "" otherwise)
    * radius<id>u - show the attribute identified with <id> in unsigned integer form (in case RADIUS authentication was used; "0" otherwise)
    * radius<id>-<vnd-id> - show the attribute identified with <id> and vendor ID <vnd-id> in text string form (in case RADIUS authentication was used; "" otherwise)
    * radius<id>-<vnd-id>u - show the attribute identified with <id> and vendor ID <vnd-id> in unsigned integer form (in case RADIUS authentication was used; "0" otherwise)

Note: I’ve tried putting using them in status.html and alogin.html, no go on either.

The only radius variable I can get to work on the status.html page is $(radius). It is set to “true” if the login was allowed by the radius server, and an empty string (“”) if not (if a local account). I wanted to display Mikrotik-Group (id=3 vendor=14988?) on the status.html page, but have been unable to do so.

Same exact thing here too!

The reason I want Mikrotik Group from Radius (aka User Profile for local users) is to display content per group (admins get some links, users got others, maintenance get others, etc…)
Ex.

$(if mikrotik-group == 'admins')
Admin content
$(elif mikrotik-group == 'maint')
Maint content
$(endif)

Does anyone know a workaround? I’m going to email support today and see what they say.

Hi dssmiktik. Same here for same reason. By the looks of it, the format to retrieve Mikrotik-Group should be
$(radius3-14988). I also tried $(radius 3-14988). Maybe my format is incorrect. If you get an answer from support, please post here for others. We can’t be the only ones who want to use this feature.

Awaiting a response from Mikrotik.

We have found the problem, why radius attributes were not displayed in login page.
The problem will be fixed in version 4.4.

Thank you very much for the report. It would great if you will report the problem to support@mikrotik.com So we can act more quickly.

Thanks, sergejs! I always try to report bugs, once I find it isn’t my fault because of a bad format or something.

I just got the email today, and was going to report back here.

As far as reporting problems quicker, I find that if it’s documented, I must be doing something wrong, so I posted here first. After a few other reports of the same problem by other users, I sent an email. I just don’t want to flood Mikrotik support with questions until I know others experience the same problems.

Thanks again Sergejs.