User Group
add_user_to_usergroup
Add users to usergroups.
Ignores users not in user groups. Users and groups must exist.
Arguments
USERNAMES
Usernames to add. Comma-separated.
Type: text
Required: ✅
USERGROUPS
User groups to add the users to. Comma-separated.
Type: text
Required: ✅
add_usergroup_permissions
Give a user group permissions to host/template groups.
Run show_hostgroups
to get a list of host groups, and
show_templategroups --no-templates
to get a list of template groups.
Arguments
USERGROUP
User group to give permissions to.
Type: text
Required: ✅
Options
--hostgroup
<HOSTGROUPS>
Comma-separated list of host group names.
Type: text
--templategroup
<TEMPLATEGROUPS>
Comma-separated list of template group names.
Type: text
--permission
<PERMISSION>
Permission to give to the user group.
Type: choice
Choices: deny
, ro
, rw
, 0
, 2
, 3
create_usergroup
Create a user group.
Arguments
USERGROUP
Name of the user group to create.
Type: text
Required: ✅
Options
--gui
<GUI_ACCESS>
GUI access for the group.
Type: choice
Choices: default
, internal
, ldap
, disable
, 0
, 1
, 2
, 3
Default: default
--disabled
Create the user group in a disabled state.
Type: boolean
Default: False
remove_user_from_usergroup
Remove users from usergroups.
Ignores users not in user groups. Users and groups must exist.
Arguments
USERNAMES
Usernames to remove. Comma-separated.
Type: text
Required: ✅
USERGROUPS
User groups to remove the users from. Comma-separated.
Type: text
Required: ✅
show_usergroup
Show one or more user groups by name or ID.
Examples
Show user group 'Admins'
Show user groups 'Admins' and 'Operators'
Show all user groups containing 'web' sorted by ID
Arguments
USERGROUP
Name or ID of the user group(s) to show. Comma-separated. Supports wildcards.
Type: text
Required: ✅
Options
--sort
<SORT>
Sort by field.
Type: choice
Choices: name
, id
, users
Default: name
show_usergroup_permissions
Show permissions for one or more user groups.
Examples
Show permissions for user group 'Admins'
Show permissions for user groups 'Admins' and 'Operators'
Show permissions for all user groups sorted by ID
Arguments
USERGROUP
Name of user group. Comma-separated. Supports wildcards.
Type: text
Required: ✅
Options
--sort
<SORT>
Sort by field.
Type: choice
Choices: name
, id
, users
Default: name
show_usergroups
Show all suser groups.
Can be filtered by name or ID.
Examples
Show all user groups
Show user groups 'Admins' and 'Operators'
Show all user groups containing 'web' sorted by ID
Arguments
USERGROUP
Name or ID of the user group(s) to show. Comma-separated. Supports wildcards.
Type: text
Options
--sort
<SORT>
Sort by field.
Type: choice
Choices: name
, id
, users
Default: name
--limit
, -n
<LIMIT>
Limit the number of results. 0 to show all.
Type: integer
Default: 0