How to Manage Zimbra User Accounts Using ZMPROV Commands

To Manage Zimbra User Accounts Using ZMPROV Commands

In this tutorial, the basic concepts involved with the management of Zmbra User Accounts are covered. Here it is done by using zmprov command via command line interface.

To list all mail accounts

In order to list all mail accounts which are registered in Zimbra, use the following command.

[zimbra@mail ~]$ zmprov -l gaa
susan@testdomain.io
harry@testdomain.io
marsh@testdomain.io
.
.
.
logan@testdomain.io
Clarke@testdomain.io

Options:

-l --> list

In the above command, gaa represents ' group all account' which displays the complete list of user accounts present in Zimbra.

To create a new user

Use the following command to create a new user in zimbra. Here the user mail id, the password and the display name are entered.

[zimbra@mail ~]$  zmprov ca test1@ testdomain.com  test123 displayName test1
769493a4-21f8-41c6-9a52-8f82465671ee

In the above command, ca denotes ' create account' which is used for creating a new user account.

' displayName' in the command is a part of the syntax.

To create alias name
Run the following command to create alias name for a newly created zimbra user.

[zimbra@mail ~]$  zmprov aaa test1@testdomain.com  xyz@testdomain.com  

In the above command, aaa denotes ' add alias account' which creates an alias name for the said user.

To view the configuration parameters
You can view the complete information related to the configuration parameters of Zimbra user account by invoking the following command.

[zimbra@mail ~]$  zmprov -l gaa -v testdomain.com
zimbraAuthTokenLifetime: 2d
zimbraAuthTokenValidityValue: 0
zimbraAuthTokens: 408365004|1486050230489|8.7.0_GA_1659
.
.
.
zimbraZimletAvailableZimlets: !com_zimbra_attachcontacts
zimbraZimletAvailableZimlets: !com_zimbra_date
zimbraZimletLoadSynchronously: FALSE
zimbraZimletUserPropertiesMaxNumEntries: 15

options:

In the above command the option -v (which denotes verbose) displays the configuration details in a detailed manner.

If you want to check the complete configuration parameters of a specific user, run the following command.

[zimbra@mail~]$ zmprov  ga  test1@testdomain.com
# name test1@testdomain.com
cn: test1
displayName: test1
mail: test1@ testdomain.com
 objectClass: inetOrgPerson
objectClass: zimbraAccount
objectClass: amavisAccount
sn: test1
uid: test1
.
.
.
AvailableZimlets: !com_zimbra_attachcontacts
zimbraZimletAvailableZimlets: !com_zimbra_date
zimbraZimletLoadSynchronously: FALSE
zimbraZimletUserPropertiesMaxNumEntries: 150

To check the list of admin acounts
You can also check the list of admin accounts present in Zimbra. Use the following command for the same purpose.

[zimbra@mail~]$  zmprov gaaa
admin@testdomain.com

In the above command, gaaa represents ' group all admin account.'

To set a password
You can set the password for a Zimbra user with the help of the following command.

[zimbra@mail~]$ zmprov sp test1@testdomain.com test@123

In the above command, sp represents ' set password.'

To remove the alias name

If you want to remove the alias name of a zimbra user, run the following command.

[zimbra@mail~]$ zmprov raa test1@testdomain.com  xyz@testdomain.com

In the above command, raa represents ' remove alias account'

To rename a user

You can rename a Zimbra user by invoking the following command.

[zimbra@mail~]$ zmprov ra test1@testdomain.com  test2@testdomain.com

To remove an account
If you want to remove a user account from Zimbra, run the following command.

[zimbra@mail~]$ zmprov  da test1@testdomain.com  test2@testdomain.com

In the above command, da denotes delete account

Tag : Zimbra
FAQ
Q
how to check the complete configuration parameters of a specific user?
A
check the complete configuration parameters of a specific user run the following command
$ zmprov ga test1@testdomain.com
Q
which command To view the configuration parameters?
A
use the following command To view the configuration parameters
# zmprov -l gaa -v testdomain.com
Q
What does gaa stands for in zimbra?
A
gaa represents 'group all account' which displays the complete list of user accounts present in Zimbra.
Q
How to add alias user for zimbra?
A
the sysntax with example would be zmprov aaa "test1@testdomain.com xyz@testdomain.com"
Q
how To remove an account for user zimbra?
A
use the following command to remove account for zimbra user
# zmprov da test1@testdomain.com test2@testdomain.com