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.
salt.modules.groupadd.
add
(name, gid=None, system=False)Add the specified group
CLI Example:
salt '*' group.add foo 3456
salt.modules.groupadd.
adduser
(name, username)Add a user in the group.
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.
salt.modules.groupadd.
chgid
(name, gid)Change the gid for a named group
CLI Example:
salt '*' group.chgid foo 4376
salt.modules.groupadd.
deluser
(name, username)Remove a user from the group.
CLI Example:
salt '*' group.deluser foo bar
Removes a member user 'bar' from a group 'foo'. If group is not present then returns True.
salt.modules.groupadd.
getent
(refresh=False)Return info on all groups
CLI Example:
salt '*' group.getent