Listing domains and users

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
Post Reply
bennhana
Posts: 22
Joined: Thu Jan 12, 2017 7:00 am

Listing domains and users

Post by bennhana »

Hi

I am looking for a way to list and export all domains and users. We have thousands of users and several domains. What I am looking for is to list all the domains and users and export to a CSV file. I have tried this "zmprov -l gaa" but this is only for listing users. Some users are active, some are locked, etc and I want all listed. Can someone please, help on how I can do this.

Thanks in advance
phoenix
Ambassador
Ambassador
Posts: 27278
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Listing domains and users

Post by phoenix »

Have you tried an internet search? Use the following terms and try some of the results you'll find:

Code: Select all

"how to" zimbra  list all accounts domains
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
koichi.kato
Zimbra Employee
Zimbra Employee
Posts: 31
Joined: Tue Aug 09, 2022 12:30 am

Re: Listing domains and users

Post by koichi.kato »

You can search all accounts using ldapsearch like this

Code: Select all

(run as zimbra on ldap server)
$ ldapsearch -LL -x -h `zmhostname` -p 389 -D 'uid=zimbra,cn=admins,cn=zimbra' "(objectClass=zimbraAccount)" -w `zmlocalconfig -m nokey -s zimbra_ldap_password` mail zimbraAccountStatus
For domains,

Code: Select all

$ zmprov -l gad
or
$ $ ldapsearch -LL -x -h `zmhostname` -p 389 -D 'uid=zimbra,cn=admins,cn=zimbra' "(objectClass=zimbraDomain)" -w `zmlocalconfig -m nokey -s zimbra_ldap_password`
bennhana
Posts: 22
Joined: Thu Jan 12, 2017 7:00 am

Re: Listing domains and users

Post by bennhana »

Thanks koichi.kato

It has worked.
Post Reply