I need to change the permissions access based on time in Ubuntu. I have a user called "miguel" and I want miguel not to gain access on Saturdays from 00:00 to 19:00 hours.
I read in web pages that this is simple:
I write this line in
/etc/pam.d/login
:account required pam_time.so
I write this line in
/etc/security/time.conf
:login;*;miguel;!Sa0000-1900
I saved this files with the changes.
But this not working!! I need help!! Thanks a lot!!
time.conf
only governslogin
times. That is, outside the specified window,miguel
cannot login. However, ifmiguel
is already logged in at the beginning of the window, nothing forcesmiguel
to logout.