Manage groups on Linux, OpenBSD and NetBSD
Important
If you feel that Salt should be using this module to manage groups on a minion, and it is using a different module (or gives an error similar to 'group.info' is not available), see here.
Changed in version 3006.0.
Add the specified group
Name of the new group
Use GID for the new group
Create a system account
Directory to chroot into
Allow creating groups with duplicate (non-unique) GIDs
New in version 3006.0.
Specifically add the group locally rather than through remote providers (e.g. LDAP)
New in version 3007.0.
CLI Example:
salt '*' group.add foo 3456
Add a user in the group.
Name of the group to modify
Username to add to the group
Directory to chroot into
CLI Example:
salt '*' group.adduser foo bar
Verifies if a valid username 'bar' as a member of an existing group 'foo', if not then adds it.
Changed in version 3006.0.
Change the gid for a named group
Name of the group to modify
Change the group ID to GID
Directory to chroot into
Allow modifying groups with duplicate (non-unique) GIDs
New in version 3006.0.
CLI Example:
salt '*' group.chgid foo 4376
Remove the named group
Name group to delete
Directory to chroot into
Ensure the group account is removed locally ignoring global account management (default is False).
New in version 3007.0.
CLI Example:
salt '*' group.delete foo
Remove a user from the group.
Name of the group to modify
Username to delete from the group
Directory to chroot into
CLI Example:
salt '*' group.deluser foo bar
Removes a member user 'bar' from a group 'foo'. If group is not present then returns True.
Return info on all groups
Force a refresh of group information
Directory to chroot into
CLI Example:
salt '*' group.getent
Return information about a group
Name of the group
Directory to chroot into
CLI Example:
salt '*' group.info foo
Replaces members of the group with a provided list.
Name of the group to modify
Username list to set into the group
Directory to chroot into
CLI Example:
salt '*' group.members foo 'user1,user2,user3,...'
foo:x:1234:user1,user2,user3,...