Difference between revisions of "Lat-groups"
From SME Server
Jump to navigationJump to search(4 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
===Smecontribs repository for SME Server=== | ===Smecontribs repository for SME Server=== | ||
− | yum install --enablerepo=smecontribs smeserver-lazy_admin_tools | + | yum install --enablerepo=smecontribs smeserver-lazy_admin_tools smeserver-userpanel smeserver-mailsorting |
signal-event post-upgrade; signal-event reboot | signal-event post-upgrade; signal-event reboot | ||
Line 78: | Line 78: | ||
===EXAMPLES=== | ===EXAMPLES=== | ||
− | lat-groups -a -c " | + | lat-groups -a -c "griffindor | School of Witchcraft | | harry |hermione" |
− | + | Creates group 'griffindor' with users 'harry' and 'hermione'. | |
− | Creates group ' | ||
lat-groups -a -i /root/griffindor.list | lat-groups -a -i /root/griffindor.list | ||
Line 101: | Line 100: | ||
lat-groups -a -c "quidditch | Different ball game | 7005" | lat-groups -a -c "quidditch | Different ball game | 7005" | ||
Creates group 'quidditch' with group ID 7005. | Creates group 'quidditch' with group ID 7005. | ||
+ | |||
+ | === Bugs === | ||
+ | Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] | ||
+ | and select the e-smith-lazy_admin_tools component or use {{BugzillaFileBug|product=SME%20Contribs|component=e-smith-lazy_admin_tools|title=this link}}. | ||
[[Category:Howto]] [[Category:Administration]] | [[Category:Howto]] [[Category:Administration]] |
Latest revision as of 22:35, 26 June 2013
lat-groups
The lazy administrator's tool to create groups and to add members to it.
DESCRIPTION
Creates or deletes groups on Mitel's SME servers (5.x/6.x/7.x/8.x). This tool is functionally equivalent to the 'groups' option in the server-man- ager, but can be run from the command line or called from an other script. It allows you, for example, to add a large number of accounts to a group, or delete groups on a remote machine via an ssh console.
See /usr/doc/lazy-admin-tools/example.groups for the format of the input file.
Smecontribs repository for SME Server
yum install --enablerepo=smecontribs smeserver-lazy_admin_tools smeserver-userpanel smeserver-mailsorting signal-event post-upgrade; signal-event reboot
SYNOPSIS
lat-groups -a [-n] -c "group | descr. | gid | user1| user2"
lat-groups -a [-n] -i /path/to/groups.list
lat-groups -r [-f] -c "group | user1 | user2"
lat-groups -d [-f] -c "group"
lat-groups -d [-f] -i /path/to/groups.list
OPTIONS
The following options are supported:
-a, --add Add a group to the server, or add users to an existing group.
-c ""Arguments"", --command-line=""Aruments"" Take arguments from the command line. See the 'Arguments' section below for the various arguments that are accepted.
-d, --delete Delete a group from the server. Wildcards (* and ?) are accepted.
-f, --force Don't prompt before deleting.
-h, --help Extended help for this tool
-i FILE, --input-file=FILE Use the information from FILE to create or delete the group(s). See /usr/doc/lazy-admin-tools for an example of an input file.
-n, --no-admin Do not add 'admin' and 'www' as users to this group. Remove them if they are already member of this group.
Default behaviour on SME is to add both users to any group, thus limiting the number of groups on the server to 28. Note, however, that SME is very persistent with this 'feature'. Each time you add or remove a user via the server-manager, both 'admin' and 'www' are added again.
-r, --remove-users Remove users from this group. Wildcards (* and ?) are accepted for the groupname.
Arguments:
group* : Must contain only lower-case letters, numbers, hyphens, periods and underscores, and should start with a lower-case letter. Wildcards (* and ?) can only be used to delete groups. descr. : Free-text description of the group gid : Group ID. If omitted, a suitable gid will be generated. member(s) : Username of a member of the group. Must be an existing account on the server.
* mandatory field
EXAMPLES
lat-groups -a -c "griffindor | School of Witchcraft | | harry |hermione" Creates group 'griffindor' with users 'harry' and 'hermione'.
lat-groups -a -i /root/griffindor.list Creates the groups defined in /root/griffindor.list. Refer to /usr/doc/lazy-admin-tools/example.groups for an example of an input file.
lat-groups -a -n -i /root/griffindor.list Creates the groups defined in /root/griffindor.list. The users 'admin' and 'www' are *not* added to the group.
lat-groups -d -f -c "class*" Deletes all groups whose name start with 'class'. All groups are deleted without prompting (-f).
lat-groups -r -f -c " * | admin | www" Removes users 'admin' and 'www' from all groups on the system. Don't prompt before removing.
lat-groups -a -c "quidditch | Different ball game | 7005" Creates group 'quidditch' with group ID 7005.
Bugs
Please raise bugs under the SME-Contribs section in bugzilla and select the e-smith-lazy_admin_tools component or use this link .