1

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:

  1. I write this line in /etc/pam.d/login:

    account required pam_time.so
    
  2. 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!!

2
  • what is the behaviour your seeing? Feb 11, 2017 at 14:18
  • 1
    Remember that time.conf only governs login times. That is, outside the specified window, miguel cannot login. However, if miguel is already logged in at the beginning of the window, nothing forces miguel to logout.
    – waltinator
    Feb 11, 2017 at 14:46

0

Browse other questions tagged .