Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: export account from Web Admin Panel

  1. #1
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    33
    Rep Power
    7

    Default export account from Web Admin Panel

    Hi,

    Is there any way to export a specific accounts's list, from the Web Admin Panel?

    For example: if I want to export all accounts "@specificdomain.tld', I can insert the string "specificdomain.tld" on the search FORM on the top of the Panel, so I get all the accounts I want; now I would like to export the founded accounts's list.

    I know that I can use the 'zmprov' command from the CLI, but I don't want to give access to the server, so I need some tool to perform the same task from the Web Admin Panel.

    Can anyone Help me?

    Thanks

    Elisa

  2. #2
    phoenix is offline Zimbra Consultant & Moderator
    Join Date
    Sep 2005
    Location
    Vannes, France
    Posts
    23,587
    Rep Power
    58

    Default

    You'll need to use zmprov at the command line for that function.
    Regards


    Bill


    Acompli: A new adventure for Co-Founder KevinH.

  3. #3
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    33
    Rep Power
    7

    Default

    This is my question:

    If I want to extract all account with a zimbraMailCanonicalAddress like '*@specificdomain.tld', Is there a specific zmprov command?

    I have used zmprov gaa -v, but it is too much verbose.

    Thanks

    Elisa

  4. #4
    Join Date
    Apr 2009
    Location
    Zimbabwe
    Posts
    27
    Rep Power
    6

    Default

    guys i have the same problem, i need to export 500 users from zcs 5.0.14 into a *.csv file, the command zmprov gaa -v is displaying a whole list of info which i don't need right now,

    can any one help me in making the script that will then parse the output into a *.csv file so that i upload it onto another machine.

    i just need the user names only and their passwords.

    regards

  5. #5
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    33
    Rep Power
    7

    Default

    Dear buggz,

    You can't use the CLI zmprov command to extract account password.

    If you need only the user name you can easily use zmprov gaa -v |grep uid:

    Make me know if this help you.

    Elisa

  6. #6
    Join Date
    Apr 2009
    Location
    Zimbabwe
    Posts
    27
    Rep Power
    6

    Default

    wow, quick reply

    what i really need is :
    a file with the following email@mydomain.com,Username Surname into a *.csv file.

    if there is another tool that i might need to get the password its ok, but what i mainly need are the user names and the Distribution lists


    regards
    buggz

  7. #7
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    33
    Rep Power
    7

    Default

    Dear buggz,

    I made a simple python script to do such extraction. I post it here for utility.



    #! /usr/bin/env python
    # this script requires you have extracted the file list with the zimbra CLI: zmprov gaa -v > /opt/zimbra/list. Plus the path in which you save the script has to be the same of the list file.
    elisa_file = open("list","r")
    lista = []
    record = {}
    for row in elisa_file.readlines():
    if row.strip() == '':
    lista.append(record)
    record = {}
    if row[0] == '#':
    pass
    else:
    record.update({row[:row.find(':')]: row[row.find(':')+1:]})

    for x in lista:
    if 'mail' in x: print 'mail: ' + x['mail']
    if 'uid' in x: print 'uid: ' + x['uid']
    if 'sn' in x: print 'sn: ' + x['sn']
    print '--------------------------------------------------------------------------------------------------------------------------------------------------------------'



    This is the procedure you have to follow:

    1. from the zimbra CLI: zmprov gaa -v > /opt/zimbra/list
    2. than you can use my script to extract the folder that you are looking for. The path for the script has to be the same of the extracted list es:

    cp /opt/zimbra/list /path-that-you-want
    cp elisa_parser.py in /path-that-you-want

    than you have to execute the script as follow:
    • cd /path-that-you-want
    • python elisa_parser.py > output_file.csv


    If you want to extract additional folder the only thing you have to do is to add the desired folder in the for instruction.

    I wish this can help you.

    Elisa

  8. #8
    Join Date
    Apr 2009
    Location
    Zimbabwe
    Posts
    27
    Rep Power
    6

    Default

    im not sure where i got it wrong, it had been talkinf of ython Error:IndentationError: expected an indented block. so i edited it to:
    HTML Code:
    #! /usr/bin/env python
    # this script requires you have extracted the file list with the zimbra CLI: zmprov gaa -v > /opt/zimbra/list. Plus the path in which you save the script has to be the same of the list file.
    elisa_file = open("list","r")
    lista = []
    record = {}
    for row in elisa_file.readlines():
     if row.strip() == '':
      lista.append(record)
      record = {}
     if row[0] == '#':
      pass
    else:
     record.update({row[:row.find(':')]: row[row.find(':')+1:]})
    
    for x in lista:
     if 'mail' in x: print 'mail: ' + x['mail']
     if 'uid' in x: print 'uid: ' + x['uid']
     if 'sn' in x: print 'sn: ' + x['sn']
     print '--------------------------------------------------------------------------------------------------------------------------------'
    the Output is like this:
    HTML Code:
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------------------------
    --------------------------------------------------------------------------------------------------------------------------------------------------------------

    i think its something to do with the LAST print statement isnt it?

    buggz

  9. #9
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    33
    Rep Power
    7

    Default

    Hi buggz,

    The else statement at the ninth line have to be aligned with other if instruction inside the for cycle.

    Elisa
    Last edited by elisa; 09-08-2009 at 12:13 AM.

  10. #10
    Join Date
    Apr 2008
    Location
    Italy
    Posts
    33
    Rep Power
    7

    Default

    Make mi know if this help.
    Last edited by elisa; 09-08-2009 at 12:15 AM.

Similar Threads

  1. [SOLVED] my server stopped working???
    By cecil in forum Administrators
    Replies: 4
    Last Post: 04-20-2008, 08:07 AM
  2. installation error during ldap setup
    By ljramos in forum Installation
    Replies: 23
    Last Post: 08-10-2007, 10:48 PM
  3. unable to restart zimbra after reboot
    By droefs in forum Administrators
    Replies: 28
    Last Post: 04-16-2006, 02:33 PM
  4. Replies: 16
    Last Post: 01-05-2006, 08:55 AM
  5. After Succesfull Install, Cannot Start mta
    By bsimzer in forum Installation
    Replies: 26
    Last Post: 12-16-2005, 04:45 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
  •