Community discussions

MikroTik App
 
User avatar
RedHat
newbie
Topic Author
Posts: 42
Joined: Wed Mar 14, 2007 3:23 pm
Location: Earth Planet
Contact:

Sync. user profile activity

Sat Apr 07, 2007 8:05 am

RedHat
Last edited by RedHat on Sat Apr 28, 2007 2:53 pm, edited 1 time in total.
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Sat Apr 07, 2007 3:35 pm

What do you really want to disconnect? Is it Server Profile, User Profile or user? Disabling a user profile will not disable the users. How are you authenticating your users? Is it by usermananager, PPPoE, Hotspot or external radius server? Please paint a clearer picture of your setup to get quality reply.
 
User avatar
RedHat
newbie
Topic Author
Posts: 42
Joined: Wed Mar 14, 2007 3:23 pm
Location: Earth Planet
Contact:

Sun Apr 08, 2007 2:12 pm

dear skillfull


i want to create sperated profile for spicific users which that make users able to login at 12:00 am and logout theme at 8:00 AM - TOLARENCE TIME FOR USING INTERNET - .. i dont want disable the profile .. i want prevent spicific user login out of the time i told above .
what is the script that make this operation ?

by the way .. i have another profiles work 24/24 in same hotspot
 
User avatar
skillful
Trainer
Trainer
Posts: 552
Joined: Wed Sep 06, 2006 1:42 pm
Location: Abuja, Nigeria
Contact:

Mon Apr 09, 2007 2:43 pm

1. Place all the 12.00am to 8.00am users in same profile. For the purpose of this write, I will call the profile "12-8".

2. Make a scheduler to run at "00:00:00" and interval "1d 00:00:00", the copy and paste this codes into the "On Event":

/ip hotspot user en [find \
profile="12-8"]


3. Make another scheduler to run at "08:00:00" and interval "1d 00:00:00", the copy and paste this codes into the "On Event":

/ip hotspot user disable [find \
profile="12-8"]
:delay 5
:foreach i in=[/ip hotspot user find disabled=yes] do={/ip hotspot active remove [find user=[/ip hotspot user get $i name]]}


You can now go to sleep while the router does all the work!