Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose that some person is insomniac because of a bad habit of chatting on the IRC every night until 3AM. That completely ruins this person's life because he is unable to wake up on time to attend his exams, because he will be fully exhausted everyday and will feel depressive.

That person is conscious of this bad behaviour, and would accept any help including installing a software on his own computer granting me admin privileges to install it.

Do you know of such a software that ideally would:

  • Would prevent use of the computer at certain time ranges, let's say 11PM — 6AM
  • Would gracefully shutdown the computer at the beginning of that time range (not killing all the applications brutally), and shutdown it if the user attempts to switch it back on
  • Would warn 10 minutes beforehand
  • Could occasionally be disabled if I give a one-time password to that person?

That person uses Linux, and I am curious of knowing what is available for that purpose. It is kind of a parental control, but not for a child.

Thank you for your advice.

share|improve this question
up vote 3 down vote accepted

See Restrict users' access on Linux systems.

The idea is to use Linux-PAM to control timed access for users to services:

Using the pam_time module, we can set access restrictions to a system and/or specific applications at various times of the day as well as on specific days or over various terminal lines. Depending on the configuration, you can use this module to deny access to individual users based on their name, the time of day, the day of week, the service they’re applying for, and their terminal from which they’re making the request.

In the file /etc/security/time.conf, here’s the syntax for a rule:


  1. The first field — services — is a logic list of PAM service names.
  2. The second field — tty — is a logic list of terminal names.
  3. The third field — users — is a logic list of users or a netgroup of users.
  4. The fourth field — times — indicates the applicable times.

Here’s an example of a typical set of rules:

login ; * ; !bobby ; MoTuWeThFr0800-2000
login ; * ; !root ; !Al0000-2400
http ; * ; !bobby ; MoTuWeThFr0800-2000
http ; * ; !root; !Al0000-2400

These rules restrict user bobby from logging on between the hours of 0800 and 2000, and they also restrict Internet access during these hours. Root would be able to logon at any time and browse the Internet during all times as well.

share|improve this answer

The easiest way (I love the KISS Principle) would be to have someone at the house (roomate, family member, etc) unplug the router, and place the power cord in their room at night. (or just put the router in that room, and an 'easy to use with your toe' powerstrip.

There are also other parental controls software (with different levels of success) available for linux. Just make sure to not tell them the password.. (of course, if they have root....)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.