Automatically create users for MAC authentication

Hi

We’re looking to set up a hotspot solution but it will be free and simply require users to agree to terms & conditions.
I have this working currently by having login.html pass a pre-determined value for username and password:

<label class="control-label">To proceed, please read and accept the Terms of Use below.</label>
<input style="width: 80px" name="username" type="hidden" value="open_net"/> 
<input style="width: 80px" name="password" type="hidden" value="open_net"/>
<input type="submit" value="OK"

What I want to do is have the Mikrotik (or User-Manager) automatically create user based on their MAC address.
Is this possible?

The challenge is to execute a CGI program or script from an external web server that does not expose
API controls to the user.

I would almost say write a program in C++ C# .NET etc that acts as a web server.

Once the user posts the Accepted terms, issue API or telnet commands to add a local user.
Username, could use the date/time to make it easier to remove users at the end of the day.

Perhaps use a Raspberry Pi platform to host the program.

Do you really need create a username/password? If you only want user aceept term to access hotspot service you can try create a local username/password without shared users limit and edit form to user this username/password.

I am thinking the name cannot be empty when adding a mac entry in the hotspot user list.
Password is not used if method (login-by) is mac.
Name could be generated from the current date time by the client php code.

So the user only needs to accept terms. The two important fields (mac and name) are generated by client code and then posted to the server.

The server being a separate machine that has been wall gardened.
The server sends out the accept page. The server receives the mac and name fields then opens a separate connection to the Mikrotik.
Through the API it issues a command to add a new user. The server then sends a redirect page back to the user.
The Mikrotik now sees the mac is in the authorized user list allows the user through.

Using a date in the user name allows a nightly script to clean out users if desired.

Yes, the original poster is using “open_net” for both the username and password with unlimited use.
Using MAC is nice as you can restrict someone if they abuse the free WiFi or if you later want them to pay for additional time.