PDA

View Full Version : [ubuntu] using pam.d to restrict login time


imaca
January 27th, 2009, 05:29 AM
Hi,
I would like to restrict the time users can be logged in.

I have un commented:
account requisite pam_time.so
in file etc/pam.d/login

and added
login ; * ; bob ; Al1500-2100
to file etc/security/time.conf

From what I have read I was expecting this would restrict user "bob" from logging in after 2100 or before 1500. Was also hoping it would force "bob" to logout at 2100.
In fact there seems to no effect whatsoever.
What have I done wrong?

daevski
September 30th, 2009, 03:31 PM
I'm doing almost exactly what you are, and it's not working for me either.

My time.conf:
*;*;testuser;SuMoTuWeTh2000-2300

Sunday-Thursday, user shouldn't be able to login anytime except 8pm-11pm... no?

Any help would be appreciated.