Table of Contents
The CLT for createcontext and changecontext contain dynamic attribute setters. A dynamic attribute consists of a namespace, a name and a value. Attributes have to be specified in the form --namespace/name=value or, for removal --remove-namespace/name. For example:
createcontext -i [someid] -A ... -P ... ... --com.openexchange.some.feature/someAttr=someValue or createcontext -i [someid] -A ... -P ... ... --remove-com.openexchange.some.feature/someAttr
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.
-h,--help | Prints a help text |
--environment | Show info about commandline environment |
--nonl | Remove 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 |
--access-denied-portal <on/off> | Denies portal access (Default is off) |
--csv-import <CSV file> | Full path to CSV file with user data to import. This option makes mandatory options obsolete, except credential options (if needed). |
Full path to CSV file with user data to import. This option makes mandatory command line options obsolete, except credential options (if needed). But they have to be set in the CSV file.
With this option you can specify a csv file (a full pathname must be given) with the data which should be imported. The columnnames in the CSV file must be the same as the long-options of the command line tools, without the prefix "--".
This option will normally be used to fill new large installations with the new data. So instead of calling the command line tools in a shell script every time, just a csv file needs to be created, containing the whole data.
Note that the credentials of the masteradmin in the createcontext call must be given on the command line with the -A and -P options nevertheless - if authentication is enabled. If the createuser command line tool is used, the credentials are part of the csv file, and cannot be set as options on the command line itself. The reason for this different behavior is that different contexts have different credentials for the admin user, so they must be set in every line of the csv file. Opposed to this the credentials of the masteradmin are always the same.
-A,--adminuser <string> | Master Admin user name |
-P,--adminpass <string> | Master Admin password |
contextid {adminuser adminpass} quota username displayname givenname surname password email
On success:
context <contextid> created
On failure:
context <contextid> could not be created: <reason from server>