Saltstack module group 详解

group.delete

Remove the named group

name
    Name group to delete

root
    Directory to chroot into

CLI Example:

    salt '*' group.delete foo

group.members

Replaces members of the group with a provided list.

name
    Name of the group to modify

members_list
    Username list to set into the group

root
    Directory to chroot into

CLI Example:

    salt '*' group.members foo 'user1,user2,user3,...'

Replaces a membership list for a local group 'foo'.
    foo:x:1234:user1,user2,user3,...

group.getent

Return info on all groups

refresh
    Force a refresh of group information

root
    Directory to chroot into

CLI Example:

    salt '*' group.getent

group.add

Add the specified group

name
    Name of the new group

gid
    Use GID for the new group

system
    Create a system account

root
    Directory to chroot into

CLI Example:

    salt '*' group.add foo 3456

group.deluser

Remove a user from the group.

name
    Name of the group to modify

username
    Username to delete from the group

root
    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.

group.chgid

Change the gid for a named group

name
    Name of the group to modify

gid
    Change the group ID to GID

root
    Directory to chroot into

CLI Example:

    salt '*' group.chgid foo 4376

group.adduser

Add a user in the group.

name
    Name of the group to modify

username
    Username to add to the group

root
    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.

group.info

Return information about a group

name
    Name of the group

root
    Directory to chroot into

CLI Example:

    salt '*' group.info foo
posted @   random_lee  阅读(168)  评论(0编辑  收藏  举报
编辑推荐:
· dotnet 源代码生成器分析器入门
· ASP.NET Core 模型验证消息的本地化新姿势
· 对象命名为何需要避免'-er'和'-or'后缀
· SQL Server如何跟踪自动统计信息更新?
· AI与.NET技术实操系列:使用Catalyst进行自然语言处理
阅读排行:
· dotnet 源代码生成器分析器入门
· 官方的 MCP C# SDK:csharp-sdk
· 一款 .NET 开源、功能强大的远程连接管理工具,支持 RDP、VNC、SSH 等多种主流协议!
· 一文搞懂MCP协议与Function Call的区别
· 一次Java后端服务间歇性响应慢的问题排查记录
点击右上角即可分享
微信分享提示