[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

restricting login times



I know this is the wrong way to solve the underlying problems, but
sometimes brute force is required.

I found this ancient post on using PAM and /etc/security/time.conf to
accomplish this kind of thing on techrepublic (Complete with typos: A1
for Al? What bot edited that?):

http://www.techrepublic.com/article/using-pam-to-restrict-access-based-on-time/1055269

And I've been puzzling through the man pages (time.conf and so forth),
but don't seem to be able to get any effect at all.

Here are some of the rules I've tried, one at a time:

login; tty*; user1; !Al0000-2400

*;*;user1;Al1200-2300

*;*;user1;!Al2300-1200

I've looked around the man pages for a hint on some daemon that might
need to be restarted but haven't seen anything where I've looked so
far.

I always miss something obvious when I start digging into something
like this, anyone care to tell me what I'm missing, before I go off
the deep end and start editing the login source code directly? (Seems
like it shouldn't be too hard to make login fail based on the time.)

--
Joel Rees


Reply to: