Chapter 1. Context management

Table of Contents

createcontext
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
deletecontext
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
listcontext
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
disablecontext
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
disableallcontexts
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
enablecontext
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
enableallcontexts
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example
changecontext
Parameters
Extra parameters when authentication is enabled
Return value
Mandatory parameters
Command output
Example

createcontext

createcontext is the tool to create new contexts. A context is an independent instance within the createcontext Open-Xchange system and holds users, groups and resources and all their objects. Data from one context is not visible to other contexts. Module access (calendar,tasks,email)can be set via predefined "access combination names". These names can be configured on the server side. All users which are created during later use of the "createuser" tool will inherit the module access rights from the context. If you do not specify any access rights on createcontext minimal access rights will be granted. Currently, these are Webmail and Contacts access rights.

Parameters

-h,--helpPrints a help text
--environmentShow info about commandline environment
--nonlRemove all newlines (\n) from output
-c,--contextid <integer>The id of the context, when starting with 0, 0 is deleted
-q,--quota <integer>Context wide filestore quota in MB
-u,--username <string>Username for the new context Admin user
-d,--displayname <string>Displayname for the new context Admin user
-g,--givenname <string>Given name for the new context Admin user
-s,--surname <string>Surname/last name for the new context Admin user
-p,--password <string>Password for the new context Admin user
-e,--email <string>Primary E-Mail address for the new context Admin user
-l,--lang <lang>Language for the new context Admin user
-t,--timezone <timezone>Timezone for the new context Amin user
-N,--contextname <string>Context name
-L,--addmapping <string>Add login mappings separated by ","
--access-combination-name <access-combination-name>Access combination name

Extra parameters when authentication is enabled

-A,--adminuser <string>Master Admin user name
-P,--adminpass <string>Master Admin password

Return value

0 on success

>0 on failure

Mandatory parameters

contextid {adminuser adminpass} quota username displayname givenname surname password email

Command output

On success:

context <contextid> created

On failure:

context <contextid> could not be created: <reason from server>

Example

root@oxhe~# /opt/open-xchange/sbin/createcontext -c 123 -q 1000 -N CompanyA -u "admin" -d "Admin of CompanyA" -g John -s Example -p newpw -e john@example.com

context 123 created