-   Linux - Newbie (
-   -   denying login based on time (

shaps 05-01-2010 09:20 AM

denying login based on time
i want to deny certain users based on time to login to my machine i am using CentOs 5.0 any sugestions?

smoker 05-01-2010 09:40 AM

Use /etc/security/time.conf to make rules.

For example :


login ; * ; !bobby ; MoTuWeThFr0800-2000
http ; * ; !bobby ; MoTuWeThFr0800-2000

means that all users except for bobby can login between 0800 and 2000.

The manpage is accurate -

EricTRA 05-01-2010 09:43 AM


If I'm not mistaking, CentOS uses PAM and you should have a file called time.conf in /etc/security. Have a look at that file, it's pretty well documented if I remember well. Also you can have a look at this site which explains the basics of PAM.

Kind regards,


All times are GMT -5. The time now is 07:12 PM.