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

Thread: [SOLVED] Generate list of all users on server?

  1. #1
    GoneWestCoast is offline Active Member
    Join Date
    Jan 2008
    Posts
    28
    Rep Power
    7

    Default [SOLVED] Generate list of all users on server?

    I'm looking to generate a flatfile list of all users and aliases on the system for use at the gateway MX-- later in time I'll query LDAP directly, but right now that's unworkable for a couple reasons.

    There a zmprov command or an LDAP query to do this?

  2. #2
    reza225 is offline Advanced Member
    Join Date
    Aug 2006
    Location
    San Diego
    Posts
    193
    Rep Power
    8

    Default

    hey try this as the zimbra user

    zmaccts | grep "@" | awk '{print $1}'

    or just zmaccts for all the information

    or

    zmaccts | mail -s "ZMACCTS Information" user@example.tld

  3. #3
    GoneWestCoast is offline Active Member
    Join Date
    Jan 2008
    Posts
    28
    Rep Power
    7

    Default

    Thanks!

    Will this work on aliases and distribution lists as well?

  4. #4
    mmorse's Avatar
    mmorse is offline Moderator
    Join Date
    May 2006
    Location
    USA
    Posts
    6,242
    Rep Power
    20

    Default

    To get all the lists:
    zmprov gadl

    or just those in a domain:
    zmprov gadl domain.com

    get membership info:
    zmprov gdlm list@domain.com

    to see the members of a particular list:
    zmprov gdl list@domain.com

    to add a member:
    zmprov adlm list@domain.com user@domain.com

    to remove a member:
    zmprov rdlm list@domain.com user@domain.com

    to create a list:
    zmprov cdl newlist@domain.com

    to delete a list:
    zmprov ddl deletethislist@domain.com

    rename list:
    zmprov rdl list@domain.com newlistname@domain.com

    add list alias:
    zmprov adla list@domain.com newalias@domain.com

    remove list alias:
    zmprov rdla list@domain.com aliastoremove@domain.com

  5. #5
    praveen25 is offline Intermediate Member
    Join Date
    Jun 2008
    Posts
    19
    Rep Power
    6

    Default to find all users

    mysql -D zimbra -Be "select comment from mailbox"

  6. #6
    GoneWestCoast is offline Active Member
    Join Date
    Jan 2008
    Posts
    28
    Rep Power
    7

    Default

    Hah, wow-- thanks for the help!

    I didn't expect to see this updated two years later, but it's definitely appreciated!

  7. #7
    sikander is offline Intermediate Member
    Join Date
    Mar 2009
    Posts
    22
    Rep Power
    6

    Default get list of users and print in a file

    Hello All,

    This is a very useful link it solved my 90% problem. I can now get list of all the users. little problem is there any way to get the list of all users and print it in a file or export them to my local pc. I have created the file by touch but don't know how can i redirect or save all the user list in a file.

    zmaccts | grep "@" | awk '{print $1}'

    Thanks in Advance,

    Sikander

  8. #8
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    Code:
    zmaccts | grep "@" | awk '{print $1}' > accounts.txt
    and then copy the resulting file back to your workstation.

  9. #9
    Panchux is offline Senior Member
    Join Date
    Aug 2010
    Posts
    54
    Rep Power
    4

    Default

    Many of these commands work well for listing accounts but I need to export it with name and last name too. How should I do it?

    Thanks in advance,

    Pancho

  10. #10
    sikander is offline Intermediate Member
    Join Date
    Mar 2009
    Posts
    22
    Rep Power
    6

    Default account list

    Hello uxbod,

    Thank you for your great support. I have tried on my testing server it is perfectly ok. But when i tried on production it is giving me permission denied error. Even the permissions are same.

    zmaccts | grep "@" | awk '{print $1}' > accounts.txt

    should i changed the permission If i do then it is not starting postfix correctly. Any other way to generate this account list in a file.

    Thanks in Advance,

    Sikander

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Zimbra and Exchange coexistence.
    By kajetan in forum Migration
    Replies: 10
    Last Post: 10-13-2010, 04:01 AM
  2. 3.0 to 4.5.3 Upgrade failed (mysql error)
    By dealt in forum Installation
    Replies: 35
    Last Post: 03-19-2007, 10:30 PM
  3. copy/migrate users to new server for upgrade testing
    By mrluohua in forum Administrators
    Replies: 0
    Last Post: 03-05-2007, 08:23 PM
  4. Replies: 1
    Last Post: 09-16-2006, 11:02 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
  •