Community discussions

MikroTik App
 
ilero
newbie
Topic Author
Posts: 49
Joined: Fri Jun 04, 2004 3:51 pm

Add domain to Hotspot Username

Tue May 23, 2006 6:03 am

I am currently using v2.8...

I need our clients to be able to just type in "username" instead of "username@domain". I tried to do this by using the following in the login.html file: <input type="hidden" name="domain" value="domain">

By looking at the log, it successfully added the domain, but I get the error of "Wrong username or password" no matter whether I use "username" as the username or "username@domain".

Is there anyway to modify the following in the login.html to add "@domain" to the username? <input type="text" class="textbox" %input-user% size="18">
 
savage
Forum Guru
Forum Guru
Posts: 1265
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Tue May 23, 2006 7:32 am

why can't they just type it in? You won't be able to add it by using HTML
 
ilero
newbie
Topic Author
Posts: 49
Joined: Fri Jun 04, 2004 3:51 pm

Tue May 23, 2006 8:31 pm

We have a few other locations that we use an external hotspot page along with radius. None of these users (250+) have to type in "@domain" at the other sites since the external hotspot page adds it to their username.

At this location, we already have a number of local users (not via radius) that do not use a domain name. We want to continue to use the local hotspot page so the existing users will be authenticated via the local database, but for users not in the local database, they will be authenticated via radius.

Basically, we would have to re-train approx 300 users to start using "@domain". Please note that we only have one domain so that is why I would like to automate it.

Any suggestions???
 
User avatar
jp
Long time Member
Long time Member
Posts: 611
Joined: Wed Mar 02, 2005 5:06 am
Location: Maine
Contact:

Wed May 24, 2006 5:06 am

I havent tried this with MT, but usually the handling of @domain is a feature of the radius server. Done this a lot with dialup and the modem servers are dumb to the process. Domains are called realms in radius.
 
savage
Forum Guru
Forum Guru
Posts: 1265
Joined: Mon Oct 18, 2004 12:07 am
Location: Cape Town, South Africa
Contact:

Wed May 24, 2006 9:08 am

If you use radius, you can add the @domain through a pre-proxy section in radius...

Without radius, MT would simply authenticate what the client typed in...
 
kenk
Frequent Visitor
Frequent Visitor
Posts: 62
Joined: Sat Jun 05, 2004 7:22 am
Location: Tumbi Umbi, Australia

Wed May 24, 2006 10:19 am

Not sure the capabilities of other radiuses but we use Radiator, in which
you can assign a client identifier to the client Id, for example Big Mountain-AP, then Authenticate By a rule which includes the client AP id with the user name ie username, Big Mountain-AP. In that authby you can add
a custom domain specific to that accesspoint, after previously stripping off
any domain that might be there.

ie
<Client 202.x.x.1>
Identifier BigMountainAP
Secret guesswhatitis
IgnoreAcctSignature
SNMPCommunity public
NasType none
</Client>
<Handler User-Name = /^\d.../, Client-Identifier=BigMountainAP>
RewriteUsername tr/A-Z/a-f/
# Chop domain
RewriteUsername s/^([^@]+).*/$1/
then add domain
RewriteUsername s/^([^@]*)$/$1\@BigMountainDomain.com/

etc.