AppSuite:Group management

From Open-Xchange
Revision as of 17:50, 16 December 2012 by Tierlieb (talk | contribs) (Created page with "<div class="sect1" lang="en-EN"><div class="titlepage"><div><div><h2 class="title" style="clear: both">creategroup</h2></div></div></div><p><strong class="userinput"><code>cre...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

creategroup is the tool to create a new group in a given context. Groups are created with no group members when no userid(s) are supplied with the parameter -a.

Parameters

-h,--helpPrints a help text
--environmentShow info about commandline environment
--nonlRemove all newlines (\n) from output
-c,--contextid <integer>The id of the contex
-n,--name <string>The group name
-d,--displayname <stringe>The displayname for the group
-a,--addmembers <userid(s)>List of members to add to the group separated by ","

Extra parameters when authentication is enabled

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

Return value

0 on success

>0 on failure

Mandatory parameters

contextid {adminuser adminpass} name displayname

Command output

On success:

group <groupid> in context <contextid> created

On failure:

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

Example

root@oxhe~# /opt/open-xchange/sbin/creategroup -c 123 -n "sales" -d "Sales Department"

group 4 in context 123 created

deletegroup

deletegroup is the tool to delete a group in a given context. There is no need to remove the group members before.

Parameters

-h,--helpPrints a help text
--environmentShow info about commandline environment
--nonlRemove all newlines (\n) from output
-i,--groupid <groupid>The id or the name of the group
-n,--name <name>The group name

Extra parameters when authentication is enabled

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

Return value

0 on success

>0 on failure

Mandatory parameters

contextid {adminuser adminpass} (groupid or name)

Command output

On success:

group <groupid> in context <contextid> deleted

On failure:

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

Example

root@oxhe~# /opt/open-xchange/sbin/deletegroup -c 123 -n sales

group 4 in context 123 deleted


listgroup

listgroup is the tool to list and search for groups in a given context

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
-s,--searchpattern <string>Search/List pattern, default “*
--csvcommand output as csv

Extra parameters when authentication is enabled

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

Return value

0 on success

>0 on failure

Mandatory parameters

contextid {adminuser adminpass}

Command output

Standard output:

<colgroup><col><col><col><col><col></colgroup>
idnamedisplaynamemembers 
3users"all users""2,4,5,8" 

csv output:

id,name,displayname,email,members

Example

root@oxhe~# listgroup -c 123

idnamedisplaynamemembers   
3users"all users""2,4,5,8"   


changegroup

changegroup is the tool to change a group in a given context.

Parameters

-h,--helpPrints a help text
--environmentShow info about commandline environment
--nonlRemove all newlines (\n) from output
-c,--contextid <contextid>The id of the context
-i,--groupid <groupid>The id or the name of the group
-n,--name <string>The group name
-d,--displayname <string>The displayname for the Group
-a,--addmembers <userid(s)>List of members to add to group, separated by ","
-r,--removemembers <userid(s)>List of members to be removed from group, separated by ","

Extra parameters when authentication is enabled

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

Return value

0 on success

>0 on failure

Mandatory parameters

contextid {adminuser adminpass} (groupid or name) and at minimum one parameter for an attribute to change

Command output

On success:

group <groupid> in context <contextid> changed

On failure:

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

Example

root@oxhe~# /opt/open-xchange/sbin/changegroup -c 123 -i 5 -d "new groupname"

group 5 in context 123 changed