Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-2009, 03:40 AM
Intermediate Member
 
Posts: 23
Default [SOLVED] Printing a list of users and groups

All:

Is there a way within Zimbra to print a list of users, groups and the association of those users in those groups. Our environment is growing and we need to keep track of this.

Any help here would be appreciated.

Cheers
Reply With Quote
  #2 (permalink)  
Old 02-04-2009, 03:45 AM
Moderator
 
Posts: 7,928
Default

When you say groups do you mean distribution lists ?

A good starting point is :- http://www.zimbra.com/forums/etc/199...alias-etc.html
__________________
Reply With Quote
  #3 (permalink)  
Old 02-04-2009, 04:19 AM
Intermediate Member
 
Posts: 23
Default

Yes, I do mean Distribution groups.
Reply With Quote
  #4 (permalink)  
Old 02-04-2009, 04:21 AM
Moderator
 
Posts: 7,928
Default

Also have a read of :- How can I get a list of all "account alias" ?.
__________________
Reply With Quote
  #5 (permalink)  
Old 02-04-2009, 04:27 AM
Intermediate Member
 
Posts: 23
Default

I missed this one. Thanks, this should do it.
Reply With Quote
  #6 (permalink)  
Old 02-04-2009, 06:50 AM
Intermediate Member
 
Posts: 23
Default

I found the link you sent me very helpful, however I found that I could get a list of "Distribution Groups" and I found how to get a list of all members of a group. However, This has to be done one group at a time. I am not a script junky, is there a script that will collect all the groups information and print it out to a one file. You would think that Zimbra would have something like this to make it easier for all.

Thanks for your help

Last edited by mmj1000; 02-04-2009 at 07:10 AM..
Reply With Quote
  #7 (permalink)  
Old 02-04-2009, 09:19 AM
SPF SPF is offline
Active Member
 
Posts: 27
Default

Quote:
...is there a script that will collect all the groups information and print it out to a one file.
I was looking for something exactly like that early this week. I'm awful with scripting, but here's what I kludged together.

It outputs a file named groupslist.txt into the /tmp directory that has first and last names of the people in the groups.


Code:
#!/bin/sh

echo  >  /tmp/groupslist.txt

for LISTNAME in `zmprov gadl`
do
    echo $LISTNAME >> /tmp/groupslist.txt
    echo ------------------------------- >> /tmp/groupslist.txt
    for LISTMEMBER in `zmprov gdl $LISTNAME | grep zimbraMailForwardingAddress | cut -f2 -d " "`
        do
            DISPLAYNAME=`zmprov ga $LISTMEMBER | grep displayName | cut -f2,3 -d " "`
            echo $DISPLAYNAME >> /tmp/groupslist.txt
        done
    echo  >> /tmp/groupslist.txt
done
Reply With Quote
  #8 (permalink)  
Old 02-04-2009, 10:43 AM
Intermediate Member
 
Posts: 23
Default

This works great. The script does however post some errors on some groups and states that they don't exit, but they show up in the text file. Not sure why this is but is not an issue as I can now get what I need.

Thansk Much
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.