Script to run when a user logs in?

Hi guys

I need to run a specific script once a certain user logs in. I could poll the active user list but I’m not sure of the scripting.

Any helpers please?

Thanks.

logs in where? hotspot? ppp?

No into the actual router, either via winbox or ssh.

So for example I would like a end user to be able to login with restricted rights and then once in, the router will automatically reboot.

Is this possible?

Sort of.
http://wiki.mikrotik.com/wiki/Log_Parser_-_Event_Trigger_Script

That wiki article describes how to parse logs and use a log entry as a trigger. It’s a somewhat ugly solution, but you do get a log entry when a user logs in. Parse every 5 minutes and run the reboot command if you find that the right user name has logged in.