Manage groups on FreeBSD
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.pw_group.
add
(name, gid=None, **kwargs)¶Changed in version 3006.0.
Add the specified group
Name of the new group
Use GID for the new group
CLI Example:
salt '*' group.add foo 3456
salt.modules.pw_group.
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.pw_group.
chgid
(name, gid)¶Change the gid for a named group
CLI Example:
salt '*' group.chgid foo 4376
salt.modules.pw_group.
delete
(name)¶Remove the named group
CLI Example:
salt '*' group.delete foo
salt.modules.pw_group.
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.pw_group.
getent
(refresh=False)¶Return info on all groups
CLI Example:
salt '*' group.getent
salt.modules.pw_group.
info
(name)¶Return information about a group
CLI Example:
salt '*' group.info foo
salt.modules.pw_group.
members
(name, members_list)¶Replaces members of the group with a provided list.
New in version 2015.5.4.
CLI Example:
salt '*' group.members foo 'user1,user2,user3,...'
foo:x:1234:user1,user2,user3,...
Generated on May 09, 2023 at 04:03:50 UTC.
You are viewing docs for the latest stable release, 3006.1. Switch to docs for the previous stable release, 3005.1, or to a recent doc build from the master branch.
© 2023 SaltStack. All Rights Reserved, SaltStack Inc. | Privacy Policy