Last active
May 27, 2021 13:40
-
-
Save filippo/7573086 to your computer and use it in GitHub Desktop.
Zimbra remove all accounts TODO: find a better way to automate this
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# as zimbra user | |
$ zmprov -l gaa |grep -v admin-domain.com >/tmp/accounts.zmp | |
$ zmprov -l gad |grep -v admin-domain.com >/tmp/domains.zmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# edit /tmp/accounts.zmp adding at the beginning of each line deleteAccount | |
# edit /tmp/domains.zmp adding at the beginning of each line deleteDomain | |
# than as zimbra user run | |
$ zmprov < /tmp/accounts.zmp | |
$ zmprov < /tmp/domains.zmp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment