360 Secure SkillHub
360 安全技能中心

Groups Tool

该技能显示当前用户或指定系统用户的全部组归属,支持可选数字组 ID 输出,便于检查类 Unix 系统上的文件访问权限与 sudo 权限。组信息读取自 /etc/group,仅做查询展示,不修改组关系。

dinghaibin
dinghaibin
热度 30.61
最近更新 2026-05-11 17:46:29
分类:安全依赖:代码执行 / 读写文件应用场景:DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add groups-tool
Metadata
name
groups-tool
description
Display user group memberships on the system. Shows all groups a user belongs to for permission auditing and access control verification.

Groups - User Group Membership Checker

Display all group memberships for the current user or a specified system user. Group membership determines file access permissions and sudo privileges on Unix-like systems.

Usage

groups-tool [options] [username]

When called without arguments, shows groups for the current user. Specify a username to check another user's memberships.

Examples

# Show groups for current user
groups-tool

# Show groups for a specific user
groups-tool www-data

# Show numeric group IDs
groups-tool -id

Notes

Groups are read from /etc/group and can include both primary and supplementary group memberships. Changes to group membership take effect on next login.