Zmprov: Difference between revisions

(→‎Description: Adding commands to table -- not complete yet)
(→‎Description: adding to table - not complete)
Line 234: Line 234:


'''zmprov sp joe@domain.com test321'''
'''zmprov sp joe@domain.com test321'''
|-
! colspan="3" align="left" bgcolor="wheat" |Calendar Resource Provisioning Commands
|-
|<nowiki>createCalendarResource</nowiki>
|<nowiki>ccr</nowiki>
|<nowiki>{name@domain} [attr1 value1 [attr2 value2...]]</nowiki>
|-
|<nowiki>deleteCalendarResource</nowiki>
|<nowiki>dcr</nowiki>
|<nowiki>{name@domain|id}</nowiki>
|-
|<nowiki>getAllCalendarResources</nowiki>
|<nowiki>gacr</nowiki>
|<nowiki>[-v] [{domain}]</nowiki>
|-
|<nowiki>getCalendarResource</nowiki>
|<nowiki>gcr</nowiki>
|<nowiki>{name@domain|id}</nowiki>
|-
|<nowiki>modifyCalendarResource</nowiki>
|<nowiki>mcr</nowiki>
|<nowiki>{name@domain|id} [attr1 value1 {attr2 value2...]]</nowiki>
|-
|<nowiki>renameCalendarResource</nowiki>
|<nowiki>rcr</nowiki>
|<nowiki>{name@domain|id} {newName@domain}</nowiki>
|-
|<nowiki>searchCalendarResources</nowiki>
|<nowiki>scr</nowiki>
|<nowiki>[-v] domain attr op value {attr op value...]</nowiki>


|}
|}

Revision as of 23:53, 21 December 2009

For the most recent information on this CLI, including syntax and description, see ZCS Administrator's Guide Network Edition > Appendix A Command-Line Utilities.

ZCS 6.0.x

  • Bug 23920 - a new CLI command, zmprov desc, prints all attribute names.

zmprov (Provisioning)

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

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.

Syntax

zmprov [cmd] [argument]

The following objects use this syntax:

  • ModifyAccount
  • ModifyDomain
  • ModifyCos
  • ModifyServer
  • ModifyConfig
  • ModifyDistributionList
  • ModifyCalendarResource

The following example would add the attribute zimbraZimletUserProperties with the value “blue” to user 1 and would not change the value of any other instances of that attribute.

zmprov ma user1 +zimbraZimletUserProperties "com_company_testing:favoriteColor:blue"

Description

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

Long Name Short Name Description
General Options
--help -h display usage
--file -f use file as input stream
--server -s {host}[:{port}] server hostname and optional port
--ldap -l provision via LDAP instead of SOAP
--log property file -L log 4j property file, valid only with -l
--account {name} -a account name to auth as
--password {pass} -p password for account
--passfile {file} -P read password from file
--zadmin -z use Zimbra admin name/password from localconfig for admin/password
--authtoken (authtoken) -y use auth token string (has to be in JSON format) from command line
--authtoken (authtoken file) -Y use auth token string (has to be in JSON format) from command line
--verbose -v verbose mode (dumps full exception stack trace)
--debug -d/ debug mode (dumps SOAP messages)
--master -m use LDAP master. This only valid with -l
Account Provisioning Commands
addAccountAlias aaa {name@domain|id|adminName} {alias@domain}

zmprov aaa joe@domain.com joe.smith@engr.domain.com

checkPasswordStrength cps Syntax: {name@domain|id} {password}

Note: This command does not check the password age or history.

zmprov cps joe@domain.com test123

createAccount ca Syntax:{name@domain} {password} [attribute1 value1 etc]

Type on one line.

zmprov ca joe@domain.com test123 displayName JSmith

createDataSource cds {name@domain} {ds-type} {ds-name} [attr1 value1 [attr2 value2...]]
createIdentity cid {name@domain} {identity-name} [attr1 value1 [attr2 value2...]]
createSignature csig {name@domain} {signature-name} [attr1 value1 [attr2 value2...]]
deleteAccount csig Syntax:{name@domain|id|adminName}

zmprov da joe@domain.com

deleteDataSource dds {name@domain|id} {ds-name|ds-id}
deleteIdentity did {name@domain|id} {identity-name}
deleteIdentity did {name@domain|id} {identity-name}
deleteSignature dsig {name@domain|id} {signature-name}
getAccount ga Syntax:{name@domain|id|adminName}

zmprov ga joe@domain.com

getAccountMembership gam {name@domain|id}
getAllAccounts gaa Syntax: [-v] [{domain}]

zmprov -l gaa

zmprov gaa -v domain.com

getAllAdminAccounts gaaa Syntax: gaaa

zmprov gaaa

getDataSources gds {name@domain | id} [arg 1 [arg 2...]]
getIdentities gid {name@domain | id} [arg 1 [arg 2...]]
getSignatures gsig {name@domain | id} [arg 1 [arg 2...]]
modifyAccount ma {name@domain|id|adminName} [attribute1 value1 etc]

zmprov ma joe@domain.com zimbraAccountStatus maintenance

modifyDataSource mds {name@domain | id} {ds-name |ds-id} [attr 1 value 1 [attr2 value 2...]]
modifyIdentity mid {name@domain |id} {identity-name} [attr 1 value 1 [attr 2 value 2...]]
modifySignature msig {name@domain |id} {signature-name | signature-id} [attr 1 value 1 [attr 2 value 2...]]
removeAccountAlias raa {name@domain|id|adminName} {alias@domain}

zmprov raa joe@domain.com joe.smith@engr.domain.com

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>

setAccountCOS sac {name@domain|id|adminName} {cos-name|cos-id}

zmprov sac joe@domain.com FieldTechnician

setPassword sp {name@domain|id|adminName} {password}

Note: Passwords cannot included accented characters in the string. Example of accented characters that cannot be used: ã, é, í, ú, ü, ñ.

zmprov sp joe@domain.com test321

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...]


Examples

  • Create one account with a password that is assigned to the default COS.
zmprov ca name@domain.com password
  • Create one account with a password that is assigned to a specified COS. You must know the COS ID number. To find a COS ID, type zmprov gc <COSname>.
zmprov ca name@domain.com password zimbraCOS cosIDnumberstring
  • Create one account when the password is not authenticated internally.
zmprov ca name@domain.com ‘’
Note: The empty single quote is required and indicates that there is no local password.
  • Using a batch process to create accounts, see the Managing the Zimbra Collaboration Suite chapter in the Zimbra Administration Guide for the procedure.
  • Add an alias to an account.
zmprov aaa accountname@domain.com aliasname@domain.com
  • Create distribution list. The ID of the distribution list is returned.
zmprov cdl listname@domain.com
  • Add a member to a distribution list.
Tip: You can add multiple members to a list from the administration console.
zmprov adlm listname@domain.com member@domain.com
  • Change the administrator’s password. Use this command to change any password. Enter the address of the password to be changed.
zmprov sp admin@domain.com password
  • Create a domain that authenticates against zimbra OpenLDAP.
zmprov cd marketing.domain.com zimbraAuthMech zimbra
  • Set the default domain.
zmprov mcf zimbraDefaultDomain domain1.com
  • To list all COSs and their attribute values.
zmprov gac -v
  • To list all user accounts in a domain (domain.com)
zmprov gaa domain.com
  • To list all user accounts and their configurations
zmprov gaa -v domain.com
  • To enable logger on a single server
zmprov +zimbraServiceEnabled logger

Then type zmloggerctl start, to start the logger.

  • To modify the purge interval, set zimbraMailPurgeSleepInterval to the duration of time that the server should “sleep” between every two mailboxes. Type:
zmprov ModifyServer <server-name> zimbraMailPurgeSleepInterval <Xm>

X is the duration of time between mailbox purges; m represents minutes. You could also set <xh> for hours.

  • Modify zimbraNewMailNotification to customize the notification email template. A default email is sent from Postmaster notifying users that they have received mail in another mailbox. To change the template, you modify the receiving mailbox account. The variables are:
    • ${SENDER_ADDRESS}
    • ${RECIPIENT_ADDRESS}
    • ${RECIPIENT_DOMAIN}
    • ${NOTIFICATION_ADDRESSS}
    • ${SUBJECT}
    • ${NEWLINE}

You can specify which of the above variables appear in the Subject, From, or Body of the email. The following example is changing the appearance of the message in the body of the notification email that is received at name@domain.com. You can also change the template in a class of service, use zmprov mc. The command is written on one line.

zmprov ma name@domain.com zimbraNewMailNotificationBody ‘Important message from ${SENDER_ADDRESS}.${NEWLINE}Subject:${SUBJECT}’

ZCS 5.0

ZCS 4.5

Related Articles

Verified Against: ZCS 6.0.x Date Created: 4/5/2006
Article ID: https://wiki.zimbra.com/index.php?title=Zmprov Date Modified: 2009-12-21



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search