diegolima/ZMAMS
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Zimbra Mass Account Management System
=====================================
This script was written to allow easy management of multiple accounts based on
user lists written as text files. It was written primarily with the intent of
being run from the crontab in order to enable/disable user accounts on certain
times in order to enforce company policies.
Installation
------------
1 - Copy the zmbaccmgt script to /usr/local/sbin and make sure it is executable:
# cp zmbaccmgt /usr/local/sbin
# chmod 755 /usr/local/sbin/zmbaccmgt
2 - Create a /etc/4linux directory
# mkdir /etc/4linux
3 - Create lists containing the email addresses of the accounts that you wish
to block/unblock on /etc/4linux:
# echo "user1@mycompany.com" > /etc/4linux/users.list
# echo "user2@mycompany.com" >> /etc/4linux/users.list
4 - (Optional) Add the script to the server's crontab, adjusting the time as desired.
This example will disable the accounts every day at 7pm and re-enable them at 7am:
# echo "0 19 * * * root /usr/local/sbin/zmbaccmgt disable" >> /etc/crontab
# echo "0 7 * * * root /usr/local/sbin/zmbaccmgt enable" >> /etc/crontab
Usage
-----
The script works by reading email addresses from .list files on its configuration
directory (/etc/4linux by default). It then takes the requested action on the
accounts. Its syntax is the following
zmbaccmgt [enable|disable]