AppSuite:Context management: Difference between revisions

From Open-Xchange
(bug 24840 doc)
(html to wiki (WIP))
Line 1: Line 1:
<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">createcontext</h2></div></div></div><p><strong
 
class="userinput"><code>createcontext</code></strong> is the tool to create new contexts. A context is an independent instance within the createcontext Open-Xchange system and holds users, groups
== createcontext ==
 
'''<code>createcontext</code>''' 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
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
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.</p><div class="sect2" lang="en-EN"><div
access rights on createcontext minimal access rights will be granted. Currently, these are Webmail and Contacts access rights.
class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help
 
text</td></tr><tr><td align="left"> --environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left"> --nonl</td><td align="left">Remove all newlines (\n)
=== Parameters ===
from output</td></tr><tr><td align="left">-c,--contextid &lt;integer&gt;</td><td align="left">The id of the context, when starting with 0, 0 is deleted</td></tr><tr><td align="left">-q,--quota
 
&lt;integer&gt;</td><td align="left">Context wide filestore quota in MB</td></tr><tr><td align="left">-u,--username &lt;string&gt;</td><td align="left">Username for the new context admin
{| border="1"
user</td></tr><tr><td align="left">-d,--displayname &lt;string&gt;</td><td align="left">Displayname for the new context admin user</td></tr><tr><td align="left">-g,--givenname
|-
&lt;string&gt;</td><td align="left">Given name for the new context admin user</td></tr><tr><td align="left">-s,--surname &lt;string&gt;</td><td align="left">Surname/last name for the new context
| -h,--help
Admin user</td></tr><tr><td align="left">-p,--password &lt;string&gt;</td><td align="left">Password for the new context Admin user</td></tr><tr><td align="left">-e,--email &lt;string&gt;</td><td
|Prints a help text
align="left">Primary E-Mail address for the new context Admin user</td></tr><tr><td align="left">-l,--lang &lt;lang&gt;</td><td align="left">Language for the new context Admin
|-
user</td></tr><tr><td align="left">-t,--timezone &lt;timezone&gt;</td><td align="left">Timezone for the new context Amin user</td></tr><tr><td align="left">-N,--contextname &lt;string&gt;</td><td
| --environment
align="left">Context name</td></tr><tr><td align="left">-L,--addmapping &lt;string&gt;</td><td align="left">Add login mappings separated by ","</td></tr><tr><td
|Show info about commandline environment
align="left">--access-combination-name &lt;access-combination-name&gt;</td><td align="left">Access combination name</td></tr><tr><td align="left">--access-denied-portal &lt;on/off&gt;</td><td
|-
align="left">Denies portal access (Default is off)</td></tr><tr><td align="left"> --csv-import &lt;CSV file&gt; </td><td align="left"> Full path to CSV file with user data to import. This option
| --nonl
makes mandatory options obsolete, except credential options (if needed). </td></tr></table></div><div class="sect3" lang="en-EN"><div class="titlepage"><div><div><h4 class="title">--csv-import
|Remove all newlines (\n) from output
&lt;CSV file&gt;</h4></div></div></div><p>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.</p><p>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
| -c,--contextid &lt;integer&gt;
the same as the long-options of the command line tools, without the prefix "--".</p><p>This option will normally be used to fill new large installations with the new data. So instead of calling
|The id of the context, when starting with 0, 0 is deleted
the command line tools in a shell script every time, just a csv file needs to be created, containing the whole data.</p><p>Note that the credentials of the masteradmin in the createcontext call
|-
| -q,--quota &lt;integer&gt;
|Context wide filestore quota in MB
|-
| -u,--username &lt;string&gt;
|Username for the new context admin user
|-
| -d,--displayname &lt;string&gt;
|Displayname for the new context admin user
|-
| -g,--givenname &lt;string&gt;
|Given name for the new context admin user
|-
| -s,--surname &lt;string&gt;
|Surname/last name for the new context Admin user
|-
| -p,--password &lt;string&gt;
|Password for the new context Admin user
|-
| -e,--email &lt;string&gt;
|Primary E-Mail address for the new context Admin user
|-
| -l,--lang &lt;lang&gt;
|Language for the new context Admin user
|-
| -t,--timezone &lt;timezone&gt;
|Timezone for the new context Amin user
|-
| -N,--contextname &lt;string&gt;
|Context name
|-
| -L,--addmapping &lt;string&gt;
|Add login mappings separated by ","
|-
| --access-combination-name &lt;access-combination-name&gt;
|Access combination name
|-
| --access-denied-portal &lt;on/off&gt;
|Denies portal access (Default is off)
|-
| --csv-import &lt;CSV file&gt;  
| Full path to CSV file with user data to import. This option
makes mandatory options obsolete, except credential options (if needed).  
|}
 
==== --csv-import <CSV file> ====
 
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
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
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.</p></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
line of the csv file. Opposed to this the credentials of the masteradmin are always the same.
class="title">Extra parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td
 
align="left">Master Admin user name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div class="sect2"
=== Extra parameters when authentication is enabled ===
lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code
 
class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong
{| border="1"
class="userinput"><code>contextid {adminuser adminpass} quota username displayname givenname surname password email</code></strong></p></div><div class="sect2" lang="en-EN"><div
|-
class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On success:</p><p><code class="computeroutput">context &lt;contextid&gt; created</code></p><p>On
| -A,--adminuser &lt;string&gt;
failure:</p><p><code class="computeroutput">context &lt;contextid&gt; could not be created: &lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div
|Master Admin user name
class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/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</code></strong></p><p><code class="computeroutput">context 123
| -P,--adminpass &lt;string&gt;
created</code></p></div></div>
|Master Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on failure
 
=== Mandatory parameters ===
 
'''<code>contextid {adminuser adminpass} quota username displayname givenname surname password email</code>'''
 
=== Command output ===
 
On success:
 
<code>context &lt;contextid&gt; created</code>
 
On
failure:
 
<code>context &lt;contextid&gt; could not be created: &lt;reason from server&gt;</code>
 
=== Example ===
 
<code>root@oxhe~# </code>'''<code>/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</code>'''
 
<code>context 123
created</code>
 
== deletecontext ==
 
'''<code>deletecontext</code>''' is the tool to delete contexts and all data stored that belong to it. This includes all database entries and files in the infostore but no
E-Mail components.
 
=== Parameters ===
 
{| border="1"
|-
| -h,--help
|Prints a help text
|-
| --environment
|Show info about commandline environment
|-
| --nonl
|Remove all newlines (\n) from output
|-
| -c,--contextid &lt;contextid&gt;
|The id of the
context
|-
| -N,--contextname &lt;contextname&gt;
|Context name
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A,--adminuser
&lt;string&gt;
|Master Admin user name
|-
| -P,--adminpass &lt;string&gt;
|Master Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on failure
 
=== Mandatory parameters ===
 
'''<code>(contextid or contexname) {adminuser adminpass}</code>'''
 
=== Command output ===
 
On success:
 
<code>context &lt;contextid&gt; deleted</code>
 
On failure:
 
<code>context
&lt;contextid&gt; could not be deleted: &lt;reason from server&gt;</code>
 
=== Example ===
 
<code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/deletecontext -c
123</code>'''
 
<code>context 123 deleted</code>
 
== listcontext ==
 
'''<code>listcontext</code>''' is the tool to list and search for contexts.
 
=== Parameters ===
 
{| border="1"
|-
| -h,--help
|Prints a help text
|-
| --environment
|Show info about commandline environment
|-
| --nonl
|Remove all newlines (\n) from output
|-
| -s,--searchpattern &lt;string&gt;
|Search/List pattern, default “*”
|-
| --csv
|Command output as csv
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A,--adminuser &lt;adminuser&gt;
|Master Admin user name
|-
| -P,--adminpass &lt;string&gt;
|Master Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on failure
 
=== Mandatory parameters ===
 
'''<code>{adminuser adminpass}</code>'''
 
=== Command output ===
 
Standard output:
 
<pre>cid fid fname enabled qmax qused name
lmappings . . ... ... ... ... ... ...
</pre>
 
csv output:
 
<code>id,filestore_id,filestore_name,enabled,max_quota,used_quota,name,lmappings</code>
 
=== Example ===
 
<pre>root@oxhe:/opt/open-xchange/sbin# ./listcontexts cid fid fname
enabled qmax qused name lmappings 6 3 6_ctx_store true 1000 0 customerA 6,customerA,secondlogin
</pre>
== disablecontext ==
 
'''<code>disablecontext</code>''' is the tool to disable contexts. Whenever a customer tries to log in to a disabled context, the login is denied.
 
=== Parameters ===
 
{| border="1"
|-
| -h,--help
|Prints a help text
|-
| --environment
|Show info about commandline environment
|-
| --nonl
|Remove all newlines (\n) from output
|-
| -c,--contextid &lt;integer&gt;
|The id of the context
|-
| -N,--contextname &lt;string&gt;
|Context name
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A,--adminuser &lt;string&gt;
|Master Admin user name
|-
| -P,--adminpass &lt;string&gt;
|Master Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on
failure
 
=== Mandatory parameters ===
 
'''<code>(contextid or
contextname) {adminuser adminpass}</code>'''
 
=== Command output ===
 
On
success:
 
<code>context &lt;contextid&gt; disabled</code>
 
On failure:
 
<code>context &lt;contextid&gt; could not be disabled:
&lt;reason from server&gt;</code>
 
=== Example ===
 
<code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/disablecontext -c 123</code>'''
 
<code>context 123
disabled</code>
 
== disableallcontexts ==
 
'''<code>disableallcontexts</code>''' is the tool to disable all contexts. Whenever a customer tries to log in to a disabled context, the login is denied.
 
=== Parameters ===
 
{| border="1"
|-
| -h,--help
|Prints a help text
|-
| --environment
|Show info about commandline environment
|-
| --nonl
|Remove all newlines (\n) from output
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A,--adminuser &lt;string&gt;
|Master Admin user
name
|-
| -P,--adminpass &lt;string&gt;
|Master Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on
failure
 
=== Mandatory parameters ===
 
'''<code>{adminuser
adminpass}</code>'''
 
=== Command output ===
 
On success:
 
<code>all contexts disabled</code>
 
On failure:
 
<code>all contexts could not be disabled: &lt;reason from server&gt;</code>
 
=== Example ===
 
<code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/disableallcontexts</code>'''
 
<code>all contexts disabled</code>
 
== enablecontext ==
 
'''<code>enablecontext</code>''' is the tool to enable a disabled context.
 
=== Parameters ===
 
{| border="1"
|-
| -h,--help
|Prints a help text
|-
| --environment
|Show info about commandline environment
|-
| --nonl
|Remove all newlines (\n) from
output
|-
| -c,--contextid &lt;integer&gt;
|The id of the context
|-
| -N,--contextname &lt;string&gt;
|Context name
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A,--adminuser &lt;adminuser&gt;
|Master Admin user name
|-
| -P,--adminpass &lt;string&gt;
|Master Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on failure
 
=== Mandatory parameters ===
 
'''<code>(contextid or contextname) {adminuser adminpass}</code>'''
 
=== Command output ===
 
On success:
 
<code>context &lt;contextid&gt; enabled</code>
 
On failure:
 
<code>context &lt;contextid&gt; could not be enabled: &lt;reason from server&gt;</code>
 
=== Example ===
 
<code>root@oxhe~#
</code>'''<code>/opt/open-xchange/sbin/enablecontext -c 123</code>'''
 
<code>context &lt;contextid&gt; enabled</code>


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">deletecontext</h2></div></div></div><p><strong
class="userinput"><code>deletecontext</code></strong> is the tool to delete contexts and all data stored that belong to it. This includes all database entries and files in the infostore but no
== enableallcontexts ==
E-Mail components.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td
align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td align="left">--environment</td><td align="left">Show info about commandline environment</td></tr><tr><td
align="left">--nonl</td><td align="left">Remove all newlines (\n) from output</td></tr><tr><td align="left">-c,--contextid &lt;contextid&gt;</td><td align="left">The id of the
context</td></tr><tr><td align="left">-N,--contextname &lt;contextname&gt;</td><td align="left">Context name</td></tr></table></div></div><div class="sect2" lang="en-EN"><div
class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser
&lt;string&gt;</td><td align="left">Master Admin user name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div
class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code
class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong
class="userinput"><code>(contextid or contexname) {adminuser adminpass}</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command
output</h3></div></div></div><p>On success:</p><p><code class="computeroutput">context &lt;contextid&gt; deleted</code></p><p>On failure:</p><p><code class="computeroutput">context
&lt;contextid&gt; could not be deleted: &lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/deletecontext -c
123</code></strong></p><p><code class="computeroutput">context 123 deleted</code></p></div></div>


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">listcontext</h2></div></div></div><p><strong
'''<code>enableallcontexts</code>''' is the tool to enable all disabled contexts.
class="userinput"><code>listcontext</code></strong> is the tool to list and search for contexts.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td
align="left">--environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">--nonl</td><td align="left">Remove all newlines (\n) from
output</td></tr><tr><td align="left">-s,--searchpattern &lt;string&gt;</td><td align="left">Search/List pattern, default “<span class="quote">*</span>”</td></tr><tr><td align="left"> --csv</td><td
align="left">Command output as csv</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is
enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;adminuser&gt;</td><td align="left">Master Admin user name</td></tr><tr><td
align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2"
lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>{adminuser adminpass}</code></strong></p></div><div
class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>Standard output:</p><pre class="screen">cid fid fname enabled qmax qused name
lmappings . . ... ... ... ... ... ...</pre><p>csv output:</p><p><code class="computeroutput">id,filestore_id,filestore_name,enabled,max_quota,used_quota,name,lmappings</code></p></div><div
class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><pre class="screen">root@oxhe:/opt/open-xchange/sbin# ./listcontexts cid fid fname
enabled qmax qused name lmappings 6 3 6_ctx_store true 1000 0 customerA 6,customerA,secondlogin</pre></div></div>


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">disablecontext</h2></div></div></div><p><strong
=== Parameters ===
class="userinput"><code>disablecontext</code></strong> is the tool to disable contexts. Whenever a customer tries to log in to a disabled context, the login is denied.</p><div class="sect2"
lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td
align="left">Prints a help text</td></tr><tr><td align="left">--environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">--nonl</td><td
align="left">Remove all newlines (\n) from output</td></tr><tr><td align="left">-c,--contextid &lt;integer&gt;</td><td align="left">The id of the context</td></tr><tr><td
align="left">-N,--contextname &lt;string&gt;</td><td align="left">Context name</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra
parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td align="left">Master Admin
user name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div
class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on
failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>(contextid or
contextname) {adminuser adminpass}</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On
success:</p><p><code class="computeroutput">context &lt;contextid&gt; disabled</code></p><p>On failure:</p><p><code class="computeroutput">context &lt;contextid&gt; could not be disabled:
&lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code
class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/disablecontext -c 123</code></strong></p><p><code class="computeroutput">context 123
disabled</code></p></div></div>


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">disableallcontexts</h2></div></div></div><p><strong
{| border="1"
class="userinput"><code>disableallcontexts</code></strong> is the tool to disable all contexts. Whenever a customer tries to log in to a disabled context, the login is denied.</p><div
|-
class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td
| -h,--help
align="left">Prints a help text</td></tr><tr><td align="left">--environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">--nonl</td><td
|Prints a help text
align="left">Remove all newlines (\n) from output</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when
|-
authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td align="left">Master Admin user
| --environment
name</td></tr><tr><td align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div
|Show info about commandline environment
class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on
|-
failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>{adminuser
| --nonl
adminpass}</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On success:</p><p><code
|Remove all newlines (\n) from
class="computeroutput">all contexts disabled</code></p><p>On failure:</p><p><code class="computeroutput">all contexts could not be disabled: &lt;reason from server&gt;</code></p></div><div
output
class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong
|}
class="userinput"><code>/opt/open-xchange/sbin/disableallcontexts</code></strong></p><p><code class="computeroutput">all contexts disabled</code></p></div></div>


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">enablecontext</h2></div></div></div><p><strong
=== Extra parameters when authentication is enabled ===
class="userinput"><code>enablecontext</code></strong> is the tool to enable a disabled context.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td
align="left">--environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">--nonl</td><td align="left">Remove all newlines (\n) from
output</td></tr><tr><td align="left">-c,--contextid &lt;integer&gt;</td><td align="left">The id of the context</td></tr><tr><td align="left">-N,--contextname &lt;string&gt;</td><td
align="left">Context name</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is
enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;adminuser&gt;</td><td align="left">Master Admin user name</td></tr><tr><td
align="left">-P,--adminpass &lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2"
lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>(contextid or contextname) {adminuser
adminpass}</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On success:</p><p><code
class="computeroutput">context &lt;contextid&gt; enabled</code></p><p>On failure:</p><p><code class="computeroutput">context &lt;contextid&gt; could not be enabled: &lt;reason from
server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~#
</code><strong class="userinput"><code>/opt/open-xchange/sbin/enablecontext -c 123</code></strong></p><p><code class="computeroutput">context &lt;contextid&gt; enabled</code></p></div></div>


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">enableallcontexts</h2></div></div></div><p><strong
{| border="1"
class="userinput"><code>enableallcontexts</code></strong> is the tool to enable all disabled contexts.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
|-
class="title">Parameters</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-h,--help</td><td align="left">Prints a help text</td></tr><tr><td
| -A,--adminuser &lt;string&gt;
align="left">--environment</td><td align="left">Show info about commandline environment</td></tr><tr><td align="left">--nonl</td><td align="left">Remove all newlines (\n) from
|Master Admin user name
output</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra parameters when authentication is enabled</h3></div></div></div><div
|-
class="informaltable"><table border="0"><tr><td align="left">-A,--adminuser &lt;string&gt;</td><td align="left">Master Admin user name</td></tr><tr><td align="left">-P,--adminpass
| -P,--adminpass
&lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Return
&lt;string&gt;
value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on failure</p></div><div class="sect2" lang="en-EN"><div
|Master Admin password
class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>{adminuser adminpass}</code></strong></p></div><div class="sect2"
|}
lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command output</h3></div></div></div><p>On success:</p><p><code class="computeroutput">all contexts enabled</code></p><p>On
failure:</p><p><code class="computeroutput">all contexts could not be enabled: &lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/enableallcontexts</code></strong></p><p><code
class="computeroutput">all contexts enabled</code></p></div></div>


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">changecontext</h2></div></div></div><p><strong
=== Return value ===
class="userinput"><code>changecontext</code></strong> makes context-wide changes.<br />


If you specify module access options; e.g. "--access-edit-password on"; then please be aware that basic module access set is the one from context's administrator. Meaning any option not explicitly specified as CLI argument will fall-back to context administrator setting for _every_ user in associated context.<br />
<code>0</code> on success
 
<code>&gt;0</code> on failure
 
=== Mandatory parameters ===
 
'''<code>{adminuser adminpass}</code>'''
 
=== Command output ===
 
On success:
 
<code>all contexts enabled</code>
 
On
failure:
 
<code>all contexts could not be enabled: &lt;reason from server&gt;</code>
 
=== Example ===
 
<code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/enableallcontexts</code>'''
 
<code>all contexts enabled</code>
 
== changecontext ==
 
'''<code>changecontext</code>''' makes context-wide changes.<br>
 
If you specify module access options; e.g. "--access-edit-password on"; then please be aware that basic module access set is the one from context's administrator. Meaning any option not explicitly specified as CLI argument will fall-back to context administrator setting for _every_ user in associated context.<br>


You can use changecontext to change the current quota for a given context. When the context has more changecontext space in use than the new quota allows,
You can use changecontext to change the current quota for a given context. When the context has more changecontext space in use than the new quota allows,
the customer is only able to delete files until the usage is below quota. Module access (calendar,tasks,email) can be set via predefined "access combination names". These names can be configured on
the customer is only able to delete files until the usage is below quota. 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
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.</p><p>There are some default combinations in the ModuleAccessDefinitions.properties
createcontext minimal access rights will be granted. Currently, these are Webmail and Contacts access rights.
 
There are some default combinations in the ModuleAccessDefinitions.properties
file on the admin server, like:
file on the admin server, like:


</p><table class="simplelist" border="0" summary="Simple list"><tr><td><span class="phrase.bold">webmail</span>=webmail, contacts, globaladdressbookdisabled,
{| border="1"
collectemailaddresses,editpassword</td></tr><tr><td><span class="phrase.bold">pim</span>=webmail, calendar, contacts, tasks, globaladdressbookdisabled, collectemailaddresses, multiplemailaccounts,
|-
subscription, publication,editpassword</td></tr><tr><td><span class="phrase.bold">pim_infostore</span>=webmail, calendar, contacts, tasks, infostore, webdav, globaladdressbookdisabled,
|webmail=webmail, contacts, globaladdressbookdisabled, collectemailaddresses,editpassword
collectemailaddresses, multiplemailaccounts, subscription, publication</td></tr><tr><td><span class="phrase.bold">pim_mobility</span>=webmail,calendar,contacts,tasks,syncml,usm,
|-
activesync,globaladdressbookdisabled,collectemailaddresses,multiplemailaccounts,subscription,publication, editpassword</td></tr><tr><td><span
|pim=webmail, calendar, contacts, tasks, globaladdressbookdisabled, collectemailaddresses, multiplemailaccounts, subscription, publication,editpassword
class="phrase.bold">groupware_standard</span>=webmail,calendar,contacts,infostore,tasks,webdav,ical,vcard,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication
|-
(Groupware Standard always gets new features except mobility and OXtender. ) </td></tr><tr><td><span
|pim_infostore=webmail, calendar, contacts, tasks, infostore, webdav, globaladdressbookdisabled, collectemailaddresses, multiplemailaccounts, subscription, publication
class="phrase.bold">groupware_premium</span>=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication</td></tr><tr><td><span
|-
class="phrase.bold">all</span>=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,publicfoldereditable,collectemailaddresses,multiplemailaccounts,subscription,publication</td></tr></table><p>
|pim_mobility=webmail,calendar,contacts,tasks,syncml,usm,activesync,globaladdressbookdisabled,collectemailaddresses,multiplemailaccounts,subscription,publication, editpassword
</p><p>When having changed the access rights of the context and its users with "changecontext" the "downgrade" command should be called on the admin server. All unnecessary data are removed from
|-
|groupware_standard=webmail,calendar,contacts,infostore,tasks,webdav,ical,vcard,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication (Groupware Standard always gets new features except mobility and OXtender. )  
|-
|groupware_premium=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication
|-
|all=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,publicfoldereditable,collectemailaddresses,multiplemailaccounts,subscription,publication
|}
 
When having changed the access rights of the context and its users with "changecontext" the "downgrade" command should be called on the admin server. All unnecessary data are removed from
the data base via "groupware api". If e. g. the context 1 is changed from "pim_infostore" to "webmail", the "downgrade" command has to be called for this context then. Then, all unnecessary
the data base via "groupware api". If e. g. the context 1 is changed from "pim_infostore" to "webmail", the "downgrade" command has to be called for this context then. Then, all unnecessary
folders for this context are removed from the data base.</p><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Parameters</h3></div></div></div><div
folders for this context are removed from the data base.
class="informaltable"><table border="0"><tr><td align="left">-h,- -help</td><td align="left">Prints a help text</td></tr><tr><td align="left">--environment</td><td align="left">Show info about
 
commandline environment</td></tr><tr><td align="left">--nonl</td><td align="left">Remove all newlines (\n) from output</td></tr><tr><td align="left">-c,- -contextid &lt;integer&gt;</td><td
=== Parameters ===
align="left">The id of the context</td></tr><tr><td align="left">-N,- -contextname &lt;string&gt;</td><td align="left">The name of the context</td></tr><tr><td align="left">-L,- -addmapping
 
&lt;string(s)&gt;</td><td align="left">Add login mappings. Separated by ","</td></tr><tr><td align="left">-R,- -removemapping &lt;stirng(s)&gt;</td><td align="left">Remove login mappings.
{| border="1"
Separated by ","</td></tr><tr><td align="left">-q,- -quota &lt;integer&gt;</td><td align="left">Quota for the context filestore in MB</td></tr><tr><td align="left">--access-combination-name
|-
&lt;access-combination-name&gt;</td><td align="left">Access combination name</td></tr></table></div></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Extra
| -h,- -help
parameters when authentication is enabled</h3></div></div></div><div class="informaltable"><table border="0"><tr><td align="left">-A,- -adminuser &lt;string&gt;</td><td align="left">Master Admin
|Prints a help text
user name</td></tr><tr><td align="left">-P,- -adminpass &lt;string&gt;</td><td align="left">Master Admin password</td></tr></table></div></div><div class="sect2" lang="en-EN"><div
|-
class="titlepage"><div><div><h3 class="title">Return value</h3></div></div></div><p><code class="computeroutput">0</code> on success</p><p><code class="computeroutput">&gt;0</code> on
| --environment
failure</p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Mandatory parameters</h3></div></div></div><p><strong class="userinput"><code>(contextid or
|Show info about commandline environment
contextname) {adminuser adminpass} and at minimum one attribute to change</code></strong></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3 class="title">Command
|-
output</h3></div></div></div><p>On success:</p><p><code class="computeroutput">context &lt;contextid&gt; changed</code></p><p>On failure:</p><p><code class="computeroutput">context
| --nonl
&lt;contextid&gt; could not be changed: &lt;reason from server&gt;</code></p></div><div class="sect2" lang="en-EN"><div class="titlepage"><div><div><h3
|Remove all newlines (\n) from output
class="title">Example</h3></div></div></div><p><code class="computeroutput">root@oxhe~# </code><strong class="userinput"><code>/opt/open-xchange/sbin/changecontext -c 123 -q
|-
500</code></strong></p><p><code class="computeroutput">context 123 changed</code></p></div></div>
| -c,- -contextid &lt;integer&gt;
|The id of the context
|-
| -N,- -contextname &lt;string&gt;
|The name of the context
|-
| -L,- -addmapping &lt;string(s)&gt;
|Add login mappings. Separated by ","
|-
| -R,- -removemapping &lt;stirng(s)&gt;
|Remove login mappings. Separated by ","
|-
| -q,- -quota &lt;integer&gt;
|Quota for the context filestore in MB
|-
| --access-combination-name &lt;access-combination-name&gt;
|Access combination name
|}
 
=== Extra parameters when authentication is enabled ===
 
{| border="1"
|-
| -A,- -adminuser &lt;string&gt;
|Master Admin user name
|-
| -P,- -adminpass &lt;string&gt;
|Master Admin password
|}
 
=== Return value ===
 
<code>0</code> on success
 
<code>&gt;0</code> on
failure
 
=== Mandatory parameters ===
 
'''<code>(contextid or
contextname) {adminuser adminpass} and at minimum one attribute to change</code>'''
 
=== Command output ===
 
On success:
 
<code>context &lt;contextid&gt; changed</code>
 
On failure:
 
<code>context
&lt;contextid&gt; could not be changed: &lt;reason from server&gt;</code>
 
=== Example ===


<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">getAdminId</h2></div></div></div><p>Returns the ID of the context administrator.</p></div>
<code>root@oxhe~# </code>'''<code>/opt/open-xchange/sbin/changecontext -c 123 -q
500</code>'''


<code>context 123 changed</code>


== getAdminId ==


Returns the ID of the context administrator.


[[Category: OX7]]
[[Category: OX7]]
[[Category: AppSuite]]
[[Category: AppSuite]]
[[Category: AdminGuide]]
[[Category: AdminGuide]]

Revision as of 14:22, 30 August 2013

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,--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).

--csv-import <CSV file>

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.

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


deletecontext

deletecontext is the tool to delete contexts and all data stored that belong to it. This includes all database entries and files in the infostore but no E-Mail components.

Parameters

-h,--help Prints a help text
--environment Show info about commandline environment
--nonl Remove all newlines (\n) from output
-c,--contextid <contextid> The id of the

context

-N,--contextname <contextname> Context 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 or contexname) {adminuser adminpass}

Command output

On success:

context <contextid> deleted

On failure:

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

Example

root@oxhe~# /opt/open-xchange/sbin/deletecontext -c 123

context 123 deleted


listcontext

listcontext is the tool to list and search for contexts.

Parameters

-h,--help Prints a help text
--environment Show info about commandline environment
--nonl Remove all newlines (\n) from output
-s,--searchpattern <string> Search/List pattern, default “*”
--csv Command output as csv

Extra parameters when authentication is enabled

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

Return value

0 on success

>0 on failure

Mandatory parameters

{adminuser adminpass}

Command output

Standard output:

cid fid fname enabled qmax qused name
lmappings . . ... ... ... ... ... ...

csv output:

id,filestore_id,filestore_name,enabled,max_quota,used_quota,name,lmappings

Example

root@oxhe:/opt/open-xchange/sbin# ./listcontexts cid fid fname
enabled qmax qused name lmappings 6 3 6_ctx_store true 1000 0 customerA 6,customerA,secondlogin

disablecontext

disablecontext is the tool to disable contexts. Whenever a customer tries to log in to a disabled context, the login is denied.

Parameters

-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
-N,--contextname <string> Context 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 or contextname) {adminuser adminpass}

Command output

On success:

context <contextid> disabled

On failure:

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

Example

root@oxhe~# /opt/open-xchange/sbin/disablecontext -c 123

context 123 disabled


disableallcontexts

disableallcontexts is the tool to disable all contexts. Whenever a customer tries to log in to a disabled context, the login is denied.

Parameters

-h,--help Prints a help text
--environment Show info about commandline environment
--nonl Remove all newlines (\n) from output

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

{adminuser adminpass}

Command output

On success:

all contexts disabled

On failure:

all contexts could not be disabled: <reason from server>

Example

root@oxhe~# /opt/open-xchange/sbin/disableallcontexts

all contexts disabled


enablecontext

enablecontext is the tool to enable a disabled context.

Parameters

-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
-N,--contextname <string> Context name

Extra parameters when authentication is enabled

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

Return value

0 on success

>0 on failure

Mandatory parameters

(contextid or contextname) {adminuser adminpass}

Command output

On success:

context <contextid> enabled

On failure:

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

Example

root@oxhe~# /opt/open-xchange/sbin/enablecontext -c 123

context <contextid> enabled


enableallcontexts

enableallcontexts is the tool to enable all disabled contexts.

Parameters

-h,--help Prints a help text
--environment Show info about commandline environment
--nonl Remove all newlines (\n) from

output

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

{adminuser adminpass}

Command output

On success:

all contexts enabled

On failure:

all contexts could not be enabled: <reason from server>

Example

root@oxhe~# /opt/open-xchange/sbin/enableallcontexts

all contexts enabled


changecontext

changecontext makes context-wide changes.

If you specify module access options; e.g. "--access-edit-password on"; then please be aware that basic module access set is the one from context's administrator. Meaning any option not explicitly specified as CLI argument will fall-back to context administrator setting for _every_ user in associated context.

You can use changecontext to change the current quota for a given context. When the context has more changecontext space in use than the new quota allows, the customer is only able to delete files until the usage is below quota. 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.

There are some default combinations in the ModuleAccessDefinitions.properties file on the admin server, like:

webmail=webmail, contacts, globaladdressbookdisabled, collectemailaddresses,editpassword
pim=webmail, calendar, contacts, tasks, globaladdressbookdisabled, collectemailaddresses, multiplemailaccounts, subscription, publication,editpassword
pim_infostore=webmail, calendar, contacts, tasks, infostore, webdav, globaladdressbookdisabled, collectemailaddresses, multiplemailaccounts, subscription, publication
pim_mobility=webmail,calendar,contacts,tasks,syncml,usm,activesync,globaladdressbookdisabled,collectemailaddresses,multiplemailaccounts,subscription,publication, editpassword
groupware_standard=webmail,calendar,contacts,infostore,tasks,webdav,ical,vcard,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication (Groupware Standard always gets new features except mobility and OXtender. )
groupware_premium=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,collectemailaddresses,multiplemailaccounts,subscription,publication
all=webmail,calendar,contacts,infostore,tasks,webdav,webdavxml,ical,vcard,syncml,usm,olox20,activesync,readcreatesharedfolders,delegatetask,editpublicfolders,editgroup,editresource,editpassword,publicfoldereditable,collectemailaddresses,multiplemailaccounts,subscription,publication

When having changed the access rights of the context and its users with "changecontext" the "downgrade" command should be called on the admin server. All unnecessary data are removed from the data base via "groupware api". If e. g. the context 1 is changed from "pim_infostore" to "webmail", the "downgrade" command has to be called for this context then. Then, all unnecessary folders for this context are removed from the data base.

Parameters

-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
-N,- -contextname <string> The name of the context
-L,- -addmapping <string(s)> Add login mappings. Separated by ","
-R,- -removemapping <stirng(s)> Remove login mappings. Separated by ","
-q,- -quota <integer> Quota for the context filestore in MB
--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 or contextname) {adminuser adminpass} and at minimum one attribute to change

Command output

On success:

context <contextid> changed

On failure:

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

Example

root@oxhe~# /opt/open-xchange/sbin/changecontext -c 123 -q 500

context 123 changed


getAdminId

Returns the ID of the context administrator.