Results 1 to 6 of 6

Thread: Mass delete list of users - zmprov?

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Location
    Omaha
    Posts
    33
    Rep Power
    8

    Default Mass delete list of users - zmprov?

    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

  2. #2
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    21

  3. #3
    Join Date
    Oct 2007
    Location
    Omaha
    Posts
    33
    Rep Power
    8

    Default

    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.

  4. #4
    Join Date
    Oct 2007
    Location
    Omaha
    Posts
    33
    Rep Power
    8

    Default

    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?

  5. #5
    Join Date
    Dec 2006
    Location
    Minneapolis MN
    Posts
    777
    Rep Power
    9

    Default

    Yep, you will get one prov> for each command.

  6. #6
    Join Date
    Oct 2005
    Location
    Thatcher, AZ
    Posts
    5,606
    Rep Power
    21

    Default

    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.

Similar Threads

  1. [SOLVED] Enabling IMAP for users created with 'zmprov'?
    By deckard in forum Administrators
    Replies: 1
    Last Post: 10-26-2007, 11:42 AM
  2. need advice on configuring zimbra to work with fax server
    By pheonix1t in forum Administrators
    Replies: 0
    Last Post: 07-11-2007, 07:46 PM
  3. Users attributes in commamd zmprov
    By Alex_Saf in forum Administrators
    Replies: 1
    Last Post: 06-14-2007, 01:20 PM
  4. Replies: 9
    Last Post: 04-14-2007, 08:31 AM
  5. Batch adding users via zmprov
    By dhallweb in forum Installation
    Replies: 9
    Last Post: 03-16-2006, 10:20 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
  •