LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 11-07-2005, 05:24 PM   #1
hichem
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Rep: Reputation: 0
Exclamation 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
 
Old 11-07-2005, 06:27 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
This web site seems to do a good job of explaining the syntax. Hope it helps.
 
Old 11-07-2005, 06:27 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
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
 
Old 11-10-2005, 12:40 PM   #4
hichem
LQ Newbie
 
Registered: Nov 2005
Posts: 2

Original Poster
Rep: Reputation: 0
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
 
Old 11-17-2005, 12:58 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683
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:
If there are entries that overlap, the least permissive (actually, the intersection of all entries) is used
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
pam ldap limit authentication hassan2 SUSE / openSUSE 0 08-01-2005 06:03 PM
Bootloader Time Limit KissDaFeetOfSean Linux - Newbie 3 06-15-2005 11:54 PM
Limit internet access for certain hosts during certain time i16978 Linux - Newbie 2 05-05-2005 12:19 AM
time limit for select jhon Linux - Networking 1 09-08-2004 09:03 AM
Two problem about "using pam to limit user login" coolend Linux - General 3 06-04-2004 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration