创建一个test用户
[root@master ~]# salt '192.168.11.132' user.add test
192.168.11.132:
True
创建用户时指定shell
[root@master ~]# salt '192.168.11.132' user.add test1 shell=/sbin/nologin
192.168.11.132:
True
创建用户时指定不创建家目录
[root@master ~]# salt '192.168.11.132' user.add test3 createhome=False
192.168.11.132:
True
删除test3用户
[root@master ~]# salt '192.168.11.132' user.delete test3 remove=True
192.168.11.132:
True
查看所有用户
[root@master ~]# salt '192.168.11.132' user.list_users
192.168.11.132:
- test
- test1
- test2
- test4
......
更改用户的shell
[root@master ~]# salt '192.168.11.132' user.chshell test /bin/tj
192.168.11.132:
True
权限管理
*为指定的文件添加或修改FACL
[root@master ~]# salt '192.168.11.132' acl.modfacl user root rwx /opt/tj
192.168.11.132:
True
[root@master ~]# salt '192.168.11.132' acl.modfacl u test 7 /opt/tj
192.168.11.132:
True
[root@minion opt]# ll
总用量 0
-rw-rwxr--+ 1 root root 2 7月 6 12:33 tj
返回指定文件上facl的(极其详细的)映射
[root@master ~]# salt '192.168.11.132' acl.getfacl /opt/tj
192.168.11.132:
----------