Can I use the zmprov command to put in a file that will delete a block of users? If so can I have an example of how to do this?
thanks
Can I use the zmprov command to put in a file that will delete a block of users? If so can I have an example of how to do this?
thanks
OK thanks, I've created a delete.zmp file with the subcommands of:
da joeuser@mydomain.com
(there are around 11,000 of these) and dropped it in the /opt/zimbra folder ran zmprov < delete.zmp and get prov> Unknown command. Type: 'help commands' for a list.
What am I missing? The command works fine if I just type zmprov da joeuser@mydomain.com.
OK nevermind, I redid the file (apparently I can't cut and paste correctly). It's just reading out prov> prov> prov> over and over. Is it actually deleting the accounts now? Am I going to get 11,000 provs?
Yep, you will get one prov> for each command.
I don't know how you want to filter out which users you want to delete, but you can try this:
Code:su - zimbra zmprov gaa | grep (filter) > /tmp/accounts.txt for a in `cat /tmp/accounts`; do echo "Deleting $a"; zmprov da $a; done;
Last edited by jholder; 01-10-2008 at 02:10 PM.
There are currently 2 users browsing this thread. (1 members and 1 guests)