how can I limit time access with pam
I want to limit access time for a user so it can't login between friday 19:00 to Monday 05:00
I tried to use the file /etc/security/time.conf but I don' know exactly how to configure it; I tied this: *;*;Mohamed;!Mo0000-0500&!Fr1900-2400&!SaSu0000-2400 His dosn't work exactly so I tried this *;*;Mohamed;!Mo0000-0500|!Fr1900-2400|!SaSu0000-2400 And I thik it dosn't work so Kan you explain to me if we must use | (or) or & (and) thaks |
This web site seems to do a good job of explaining the syntax. Hope it helps.
|
This web site seems to do a good job of explaining the syntax. Hope it helps.
http://www.phptr.com/articles/articl...65226&seqNum=9 |
thanks for this link it's very good
but I don't know where is the problem : if I write this !Mo0000-0500&!Fr1900-2400 it works correctly (the user can't access on monday between 0000 and 0500 and have no access on friday between 1900 and 2400) but if I add an other condition : !Mo0000-0500&!Fr1900-2400&!SaSu0000-2400 it dosn't work |
I don't know why more than two time ranges doesn't work. Perhaps you can split it into two entries. From that link:
Quote:
|
All times are GMT -5. The time now is 04:55 AM. |