It looks like you can implement this through the standard Linux authentication system (called
pam - Pluggable Authentication Modules). This (amongst other things) is responsible for checking if users can log in.
Within the pam system, there's a module called
pam_time, which allows you to set restrictions for logins based on the time of day. This is controlled by the file
Something like this could work:
- to prevent everyone except the
kjo user from logging-in (ie, using the
login service, on any
tty* terminal) from 3pm to 8pm on weekdays. Be careful though, I haven't tested this!
There is quite a bit of documentation about the configuration format in the
/etc/security/time.conf file, and check the
time.conf manual pages for more information:
Once you've configured time.conf to your liking, you'll need to uncomment the following line in your
account requisite pam_time.so