The Local Groups tab lets you manage a Linux device's local user groups from the Swif console, without signing in to the device. You can:
see every group on the device, and who's in it
create and rename groups
add and remove members
delete groups you no longer need
Groups control access on Linux. For example, members of docker can run containers, and members of a group that owns a folder can use the files in it.
Changes apply to the device you're viewing.
Requirements
Item | Details |
Devices | Linux devices enrolled in Swif |
Online | Changes are sent to the device, and applied when it next checks in. The device needs to be online. |
Open Local Groups
In Swif, go to Devices, and open a Linux device.
Open the Local Groups tab, between Accounts and Commands.
The table lists every group on the device, sorted by group ID (GID). There are two types:
Type | What it includes | What you can do |
System | Groups the operating system and its packages create, such as | View them, and manage their members. You can't rename or delete them. |
Custom | Groups created for each user, and groups you or other admins create | View, rename, delete, and manage their members |
Use the Type filter to show System, Custom, or All groups. Click the refresh button to get the latest groups from the device.
How changes are applied
Every change you make is sent to the device as a command, and applied when the device checks in. A notification confirms the command is queued. The table updates once the device reports back. If you don't see your change yet, check that the device is online, then refresh.
Create a group
In Local Groups, click Create Group.
In Create group, enter a Group Name:
lowercase letters (
a–z), numbers (0–9), and hyphens (-)starting with a letter
up to 32 characters
no capital letters, spaces, or other symbols
not the name of a group already on the device
For example:
developers,ops-team,qa2.Click Create Group.
You don't choose the group ID. The device assigns the next one that's free, so it can't clash with an existing group or user.
Rename a group
You can rename custom groups only.
Click ⋯ on the group's row, and select Edit.
In Edit group details, change the Group Name, using the same rules as when creating a group.
Click Save Changes.
The group ID doesn't change.
Manage members
Click a group to open its details, and see its members. Each member is shown as:
Role | Meaning |
Primary | This is the user's main group. On Linux, every user has exactly one. It's usually a group with the user's own name. |
Secondary | The user is also in this group, in addition to their primary group |
Use the role filter to show Primary or Secondary members.
Add members
In the group's details, click Add Members.
Select local user accounts on the device.
Click Add Members (n), where n is how many you selected.
Users are added as Secondary members. Their primary group and other groups don't change.
Remove members
Secondary members: click ⋯ on the member's row, select Remove Member, and click Remove Member to confirm. Their other groups don't change.
Primary members can't be removed. Remove Member is turned off for them, since every Linux user needs a primary group.
Delete a group
You can delete custom groups only. System groups can't be deleted, since the operating system and its packages depend on them.
Click ⋯ on the group's row, and select Delete Group. What happens next depends on the group's members:
Members | What happens |
None | Swif asks you to confirm, then deletes the group |
Secondary members only | Swif shows how many members will be removed from the group, and asks you to confirm. They stay on the device, and keep their other groups. |
Any primary member | You can't delete the group, since it's still a user's primary group. Click View Members to see which users. |
Deleting a group is permanent. Files the group owned on the device keep its group ID, without a name. Check that nothing depends on the group first.
Coming later
These aren't available yet:
Changing a user's primary group. It's held back for now, because moving a user's primary group to a group such as
sudo,docker, orshadowcan give them administrator-level access.Group descriptions, and when a group was created or last changed. Linux doesn't store these, so Swif will keep them.
Troubleshooting
My change doesn't appear
Changes are applied when the device next checks in. Check that the device is online, wait a few minutes, then click refresh.
I can't rename or delete a group
It's a System group. System groups can't be renamed or deleted, to protect the operating system.
I can't delete a custom group
It's still at least one user's primary group. Click View Members to see which users.
I can't remove a member
They're a Primary member. Every Linux user needs a primary group, so they can't be removed from it.
Create Group won't accept a name
Use only lowercase letters, numbers, and hyphens, starting with a letter, up to 32 characters. For example, Dev Team isn't allowed, but dev-team is. The name also can't match a group already on the device.
I need the same group on many devices
The Local Groups tab manages one device at a time. To create a group on many devices at once, run a custom command on a device group, in Commands:
sudo groupadd <group_name>
Replace <group_name> with the group's name, following the same rules as in Create a group. The group appears in each device's Local Groups tab after it checks in. You can then manage its members there.
Related resources
