Zmprov

Revision as of 18:09, 29 December 2008 by CAH (talk | contribs) (referenced the administrator's guide for most up to date information)

The zmprovtool performs all provisioning tasks in Zimbra LDAP, including creating accounts, aliases, domains, distribution lists, and calendar resources. Each operation is invoked through command-line options, each of which has a long name and a short name.

Note: For the most up-to-date information about zmprov see the ZCS Administrator's Guide posted on the Zimbra website, www.zimbra.com.

The syntax for modify can include the prefix "+" or "-" so that you can make changes to the attributes affected and do not need to reenter attributes that are not changing. Use + to add a new instance of the specified attribute name without changing any existing attributes. Use - to remove a particular instance of an attribute. The syntax is zmprov [cmd] [argument].

The following objects use this syntax:

  • ModifyAccount
  • ModifyDomain
  • ModifyCos
  • ModifyServer
  • ModifyConfig
  • ModifyDistributionList
  • ModifycalendarResource

The following example could add the attribute zimbraZimlet UserProperties with the value 'testing" to user 1 and would not change the value of any other instance of that attribute.

zmprov ma user1 +zimbraZimletUserProperties testing

Short Name

Long Name

Syntax, Example, and Notes

-h

--help

display usage

-f

--file

use file as input stream

-s

--server

{host}[:{port}] server hostname and optional port

-l

--ldap

provision via LDAP instead of SOAP

-a

--account {name}

account name to auth as

-p

--password {pass}

password for account

-P

--passfile {file}

read password from file

-z

--zadmin

use zimbra admin name/password from localconfig for admin/password

-v

--verbose

verbose mode (dumps full exception stack trace)

-d

--debug

debug mode (dumps SOAP messages)

The commands in the following table are divided into the following tasks types - Account, Calendar Resources, Config, COS, Distribution List, Documents, Domain, Server, and Miscellaneous. For usage examples, see Zmprov_Examples.

Long Name
Short Name
Syntax, Example, and Notes
Account Provisioning Commands
CreateAccount
ca
Syntax:{name@domain} {password} [attribute1 value1 etc]
Type on one line.
zmprov ca joe@domain.com test123 displayName JSmith
DeleteAccount
da
Syntax:{name@domain|id|adminName}
zmprov da joe@domain.com
GetAccountMembership
gam
{name@domain|id}
GetAccount
ga
Syntax:{name@domain|id|adminName}
zmprov ga joe@domain.com
GetAllAccounts
gaa
Syntax: [-v] [{domain}]
zmprov gaa
zmprov gaa -v domain.com
GetAllAdminAccounts
gaaa
Syntax: gaaa
zmprov gaaa
ModifyAccount
ma
{name@domain|id|adminName} [attribute1 value1 etc]
zmprov ma joe@domain.com zimbraAccountStatus maintenance
SetPassword
sp
{name@domain|id|adminName} {password}
zmprov sp joe@domain.com test321
AddAccountAlias
aaa
{name@domain|id|adminName} {alias@domain}
zmprov aaa joe@domain.com joe.smith@engr.domain.com
RemoveAccountAlias
raa
{name@domain|id|adminName} {alias@domain}
zmprov raa joe@domain.com joe.smith@engr.domain.com
SetAccountCOS
sac
{name@domain|id|adminName} {cos-name|cos-id}
zmprov sac joe@domain.com FieldTechnician
SearchAccounts
sa
[-v] {ldap-query} [limit] [offset] [sortBy {attribute}
RenameAccount
ra
{name@domain|id} {newname@domain}
zmprov ra joe@domain.com joe23@domain.com
Note: After you rename an account, you should run a full backup for that account. zmbackup -f - <servername.com> -a <newaccountname@servername.com>
Calendar Resource Provisioning Commands
CreateCalendarResource
ccr
{name@domain} [attr1 value1 [attr2 value2...]]
DeleteCalendarResource
dcr
{name@domain|id}
GetAllCalendarResources
gacr
[-v] [{domain}]
GetCalendarResource
gcr
{name@domain|id}
ModifyCalendarResource
mcr
{name@domain|id} [attr1 value1 {attr2 value2...]]
RenameCalendarResource
rcr
{name@domain|id} {newName@domain}
SearchCalendarResources
scr
[-v] domain attr op value {attr op value...]
Domain Provisioning Commands
CreateDomain
cd
{domain} [attribute1 value1 etc]
zmprov cd mktng.domain.com zimbraAuthMech zimbra
DeleteDomain
dd
{domain|id}
zmprov dd mktng.domain.com
GetDomain
gd
{domain|id}
zmprov gd mktng.domain.com
GetAllDomains
gad
[-v]
ModifyDomain
md
{domain|id} [attribute1 value1 etc]
zmprov md domain.com zimbraGalMaxResults 50
COS Provisioning Commands
CreateCos
cc
{name} [attribute1 value1 etc]
zmprov cc Executive zimbraAttachmentsBlocked FALSE zimbraAuthTokenLifetime 60m zimbraMailQuota 100M zimbraMailMessageLifetime 0
DeleteCos
dc
{name|id}
zmprov dc Executive
GetCos
gc
{name|id}
zmprov gc Executive
GetAllCos
gac
[-v]
zmprov gac -v
ModifyCos
mc
{name|id} [attribute1 value1 etc]
zmprov mc Executive zimbraAttachmentsBlocked TRUE
RenameCos
rc
{name|id} {newName}
zmprov rc Executive Business
Server Provisioning Commands
CreateServer
cs
{name} [attribute1 value1 etc]
DeleteServer
ds
{name|id}
zmprov ds domain.com
GetServer
gs
{name|id}
zmprov gs domain.com
GetAllServers
gas
[-v]
zmprov gas
ModifyServer
ms
{name|id} [attribute1 value1 etc]
zmprov ms domain.com zimbraVirusDefinitionsUpdateFrequency 2h
Config Provisioning Commands
GetAllConfig
gacf
[-v]
All LDAP settings are displayed
GetConfig
gcf
{name}
ModifyConfig
mcf
attr1 value1
Modifies the LDAP settings.
Distribution List Provisioning Commands
CreateDistributionList
cdl
{list@domain}
zmprov cdl needlepoint-list@domain.com
AddDistributionListMember
adlm
{list@domain|id} {member@domain}
zmprov adlm needlepoint-list@domain.com singer23@mail.free.net
RemoveDistributionListMember
rdlm
{list@domain|id}
zmprov rdlm needlepoint-list@domain.com singer23@mail.free.net
GetAlldistributionLists
gadl
[-v]
Get DistributionListmembership
gdlm
{name@domain|id}
GetDistributionList
gdl
{list@domain|id}
zmprov gdl list@domain.com
ModifyDistributionList
mdl
{list@domain|id} attr1 value1 {attr2 value2...}
zmprov md list@domain.com
DeleteDistributionList
ddl
(list@domain|id}
AddDistributionListAlias
adla
{list@domain|id} {alias@domain}
RemoveDistributionListAlias
rdla
{list@domain|id} {alias@domain}
RenameDistributionList
rdl
{list@domain|id} {newName@domain}
RemoveDistributionListMember
rdlm
{list@domain|id) {member@doman}
Zimbra Documents Provisioning Commands
ImportNotebook
impn
{username} {password} {from dir}{to folder} Before importing files, any file that will become a Documents page (wiki-style page), must be renamed to include the extension “.wiki”. If not it is imported as a file, accessed either as an attachment or an image.
impn domainwiki@company.com test123 /tmp notebook
InitNotebook
in
{username}{password}{from dir}{to folder}
in globalwiki@company.com test123 /opt/zimbra/wiki/template template
initDomainNotebook
idn
{username}{password} {domain} {directory} {folder} Creates the domain Documents account
idn domainwiki@company.com test123 zimbra.com /opt/zimbra/wiki/template template
Miscellaneous Provisioning Commands
SearchGAL
sg
{domain} {name}
zmprov sg joe
AutoCompleteGal
acg
{domain} {name}
GenerateDomainPreAuthKey
gdpak
{domain|id}
Generates a pre-authentication key to enable a trusted third party to authenticate to allow for single-sign on. Used in conjunction with GenerateDomainPreAuth.
GenerateDomainPreAuth
gdpa
{domain|id} {name} {name|id|foreighPrincipal} {timestamp|0} {expires|0}
Generates preAuth values for comparison.
GetMailboxInfo
gmi
{account}
GetQuotaUsage
gqu
{server}
Jump to: navigation, search