0

I am building a basic captive portal script, with support for idle timeout. I managed to create iptables rules on authentication in the browser.

However, I'm not sure how to detect users that are active, and users that are idle for a certain amount of time. e.g When a user is not active for 30 minutes, he needs to be logged out.

What could be a good way to know if a user is idle?

1 Answer 1

-2

You can check out the inactivity time (idle time) with command w -hfs along with a bunch of other info.

1
  • This command shows the activity of users logged in on the local system, however captive portals don't use local logins. A user is just connected by the network. Jan 2, 2012 at 11:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .