Community discussions

MikroTik App
 
nepal
newbie
Topic Author
Posts: 28
Joined: Thu Apr 11, 2013 10:42 am

Create disclaimer page like hotspot page to authenticate ?

Mon Jul 01, 2013 8:36 pm

Instead of using username and password can we create hotspot page so that user can login just clicking yes or no button???

Just like one in Fortigate Firewall disclaimer page.

Rdgs,
 
kgninfos
Member
Member
Posts: 387
Joined: Thu Jun 21, 2012 7:34 pm
Location: Earth
Contact:

Re: Create disclaimer page like hotspot page to authenticate

Mon Jul 01, 2013 8:51 pm

yes can be done
make the user name field hidden and set the default value of it to a valid user on system
same goes for password
then change the value of login to Accept

that's it

don't forget to give karma if this helped you
 
nepal
newbie
Topic Author
Posts: 28
Joined: Thu Apr 11, 2013 10:42 am

Re: Create disclaimer page like hotspot page to authenticate

Mon Jul 01, 2013 9:05 pm

Thank you kgninfos.

I did understand what you explained but I and not sure where and how to do that?
 
nepal
newbie
Topic Author
Posts: 28
Joined: Thu Apr 11, 2013 10:42 am

Re: Create disclaimer page like hotspot page to authenticate

Mon Jul 01, 2013 9:32 pm

Its working. Now I just need to design the page. Only concern now is that people can see username and password in developer view mode.

Thank you
 
kgninfos
Member
Member
Posts: 387
Joined: Thu Jun 21, 2012 7:34 pm
Location: Earth
Contact:

Re: Create disclaimer page like hotspot page to authenticate

Tue Jul 02, 2013 8:08 pm

just for a bit protection
you use some javascript code to disable right click
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26289
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Create disclaimer page like hotspot page to authenticate

Wed Jul 03, 2013 10:30 am

It is not any risk, if they see user "test" and password "test". all they could do with this, is log into the hotspot, which you already allow anyway.
 
nepal
newbie
Topic Author
Posts: 28
Joined: Thu Apr 11, 2013 10:42 am

Re: Create disclaimer page like hotspot page to authenticate

Wed Jul 03, 2013 9:23 pm

there is no use of hiding usr and pwd if I allow connection without any authentication but just in case if it is possible.

And, instead of disabling right click I use button disable/enable script like [tick] I agree the terms and conditions. i should try right click too
 
sdrenner
Member Candidate
Member Candidate
Posts: 138
Joined: Wed Mar 02, 2005 10:03 pm
Contact:

Re: Create disclaimer page like hotspot page to authenticate

Thu Jun 05, 2014 6:09 pm

I am working on hotspot terms page have changed "OK" with Accept Terms.
Hid us and pw
I have this working but it only allows 1 login with the hidden Username.
How do i allow multiple login's with only 1 username in the system?
 
jaykay2342
Member
Member
Posts: 336
Joined: Tue Dec 04, 2012 2:49 pm
Location: /Vigor/LocalGroup/Milky Way/Earth/Europe/Germany

Re: Create disclaimer page like hotspot page to authenticate

Thu Jun 05, 2014 6:45 pm

Why not use the trial account feature for that? just have a something like 24h trial per day. Just make a login page with a trial link but without showing the usual login fields.
 
kupfistanton
just joined
Posts: 11
Joined: Wed Apr 10, 2013 8:39 pm

Re: Create disclaimer page like hotspot page to authenticate ?

Wed Nov 30, 2016 12:58 pm

Hi to all of you!
I just found this topic in Mikrotik Forum, and I exactly need what nepal was asking.
Unfortunately I have no clue about javascript at all. Could anyone of you tell me how I
can put the username and the password predefined into the fields?
Would be a great help!!!

Thanks in advance!
kupfistanton
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26289
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Create disclaimer page like hotspot page to authenticate ?

Wed Nov 30, 2016 1:01 pm

You will have to find somebody with basic HTML knowledge. You don't need any JavaScript knowledge to do this. Just change input field type to hidden
 
kupfistanton
just joined
Posts: 11
Joined: Wed Apr 10, 2013 8:39 pm

Re: Create disclaimer page like hotspot page to authenticate ?

Wed Nov 30, 2016 1:06 pm

Thanks fro your fast answer.
I asume that I have to change something here?
What do I have to change if I want to have the username: test and the password: test
already in the fields?

</head>
<body>
$(if chap-id)
<form name="sendin" action="$(link-login-only)"
method="post"> <input name="username"
type="hidden" /> <input name="password"
type="hidden" /> <input name="dst"
value="$(link-orig)" type="hidden" /> <input
name="popup" value="true" type="hidden" /> </form>
<script type="text/javascript" src="/md5.js"></script>
<script type="text/javascript">
<!--
function doLogin() {
document.sendin.username.value = document.login.username.value;
document.sendin.password.value = hexMD5('$(chap-id)' + document.login.password.value + '$(chap-challenge)');
document.sendin.submit();
return false;
}
//-->
</script>$(endif)
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26289
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: Create disclaimer page like hotspot page to authenticate ?

Wed Nov 30, 2016 1:08 pm

To have a pre-filled and hidden input field, do it like this:
<input type="hidden" name="username" value="test">
 
 
PackElend
Member Candidate
Member Candidate
Posts: 268
Joined: Tue Sep 29, 2020 6:05 pm

Re: Create disclaimer page like hotspot page to authenticate ?

Mon May 16, 2022 10:04 pm

in case someone is still alive here :)
can I have a separate page for the disclaimer hotspot user logion --> redirect to disclaimer --> allow internet if accepted?

Who is online

Users browsing this forum: coreshock, Google [Bot], GoogleOther [Bot], Qalderu, Railander and 72 guests