How to remove user in mikrotik??

Model RB951G-2HnD
Routine users of HotSpot. How to remove via SSH? Or that they were removed as soon as the time will come?
July 9th 19 at 13:36
3 answers
July 9th 19 at 13:38
Lift RADIUS... or write a script and run the schedule...
It can be an example of the script? - mckenna44 commented on July 9th 19 at 13:41 - eleanore.McCullough commented on July 9th 19 at 13:44
July 9th 19 at 13:40
Not quite clear what you need:
- delete all users after some period of time?
- delete a specific user after a certain time after creation?

Try to clarify the question.

As an option:

1. Ssh: ssh admin@ '/ip hotspot user remove 1'

2. The idea for a script: when you create a user in a comment specify the time after which user you want to delete. Periodically run a script to check the time all users and delete those who have already arrived.

Dynamically steer the user is still using RADIUS.
Once the user has wound up, immediately it can use wifi. In the end, I times a day need to remove the existing users that have accumulated during the day. - mckenna44 commented on July 9th 19 at 13:43
Create a script that deletes all users except the default:
/system script
add name=scr-flush-hs-users source="/ip hotspot user remove [find where name !=default-trial]"

Adding the script to the scheduler:
/system scheduler
add name=sch-flush-hs-users, start-time=00:00:00 interval=1d on-event=scr-flush-hs-users

In the end, all users except the default will be deleted every night at midnight. I have not tested, but it seems to work. Try. - eleanore.McCullough commented on July 9th 19 at 13:46
July 9th 19 at 13:42

Find more questions by tags MikrotikSSH