Is it possible to know a user logged in on Ubuntu instantly?
- by Mustafa Orkun Acar
In fact, I am trying to restrict access to some websites for different users. I asked the question: Restrict access to some websites for different users.
The given answer is ok; but as the owner of answer says, it works if users are locally logged in. That is; if the user logs out and logs in, restrictions are no more valid.
So, I decided to run a script including the iptables commands for restrictions at every log in event. I want to know whether it is possible to know instantly the user logs in.