After installation, to make the system work, you need to do the following:
Add a line to /etc/pam.d/common_account. Above the "account ... pam_unix.so"
line, add the following line:
account required pam_duration.so
Add a file called /etc/security/duration.conf. There is a sample configuration
file in the package, called sample_duration.conf. The syntax of the file is
simple. Each line describes access limitations for a single user, in the
following format:
username:Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday
The username is the username for the user as it appears in /etc/passwd. Each of
the other fields is the duration in minutes that the user is allowed to be
logged in on that day. Take the line below as an example:
bob:10:1441:120:120:30:1200:1441
The user bob is allowed to log in for 10 minutes on Sunday, all day on Monday,
for two hours on Tuesday and Wednesday, twenty hours on Friday, and all day
Saturday. Any value over 1440 [not inclusive] will prevent the process watcher
from killing the user's process.)
Assuming that the user names of the kids described in the Background are mary,
david, and chris, a complete configuration file would be:
mary:120:120:120:120:120:120:120
david:45:60:60:60:60:60:45
chris:30:30:30:30:30:30:30
If a username does not appear in the configuration file, it is assumed that the
user has no time limits.
It is a bad idea to put the root user or system accounts in this file. You
have been warned.