Results 1 to 2 of 2

Thread: Limit login certain time

Hybrid View

  1. #1
    Join Date
    Jan 2012
    Posts
    3
    Rep Power
    3

    Default Limit login certain time

    Hello,

    Is there any way to limit login to an account at a certain time?

    For example, email test@zimbra.com can only to login between 09A.M. and 18P.M


    Thank you

  2. #2
    Join Date
    Dec 2009
    Location
    Michigan
    Posts
    454
    Rep Power
    6

    Default

    Yes, this can be done via a shell script and a CRON job. You need to create a COS that you'd use for the restriction, mine is called First Shift, then you need to identify the ID of that COS with:

    Code:
    zmprov gc "First Shift" |grep zimbraId:
    zimbraId: 4023ade6-bfc0-4929-aac4-9588a71fc08c


    My script is:

    Code:
    ######################
    # Initialize variables
    ######################
    
    eval first_shift=4023ade6-bfc0-4929-aac4-9588a71fc08c
    
    #############################
    # Generate email account list
    #############################
    
    su - zimbra -c "zmprov sa zimbraCOSId=$first_shift >/home/doug/account_list.txt"
    
    while read account_list
    do
    
        echo "Locking out" $account_list
    
        su - zimbra -c "zmprov ma $account_list  zimbraAccountStatus locked"
    
    done </home/doug/account_list.txt
    
    exit 0
    zimbraAccountStatus supported are 'active, locked, maintenance or closed'

    I haven't actually put this into place, so there may be bugs.

    Doug
    Ben Franklin quote:

    "Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety."

Similar Threads

  1. Limit web client login to lan
    By digitaltendencies in forum Administrators
    Replies: 2
    Last Post: 11-29-2009, 10:07 PM
  2. [SOLVED] Last Login Time
    By hmmblah in forum Administrators
    Replies: 2
    Last Post: 02-13-2009, 08:30 AM
  3. Last login time
    By mrfileio in forum Administrators
    Replies: 10
    Last Post: 06-23-2008, 10:37 AM
  4. [SOLVED] Last Login Time
    By uxbod in forum Administrators
    Replies: 2
    Last Post: 04-13-2008, 04:14 AM
  5. last login time hasn't changed
    By dhull in forum Installation
    Replies: 2
    Last Post: 02-02-2008, 04:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •