Whoami Tool Check — Whoami 工具 检查
v1.0.0身份 verification 实用工具 — 验证 current user agAInst expected 角色s, 检查 sudo 访问, and 审计 user capabilities. Extended whoami for security and 访问 审计s.
运行时依赖
安装命令
点击复制技能文档
Whoami 工具 检查 — 身份 & 访问 Verifier
Extended 身份 verification: confirm the current user matches an expected 角色, 验证 sudo/root 访问, 检查 group membership for specific capabilities, and 审计 user-level 访问 for security-sensitive operations.
Quick 启动 # 验证 current user whoami-工具-检查
# 检查 if current user has sudo 访问 whoami-工具-检查 --sudo
Usage whoami-工具-检查 [OPTIONS]
Options: --sudo 检查 if user has sudo/root 访问 --角色 角色 验证 user belongs to a 角色 group (sudo, docker, admin, etc.) --capabilities 列出 all 访问ible 系统 capabilities --审计 Full user 审计: uid, gid, groups, sudo, shell, home --json 输出 as structured JSON --检查-user USER 检查 if a specific user exists and their detAIls
Examples # Full 审计 whoami-工具-检查 --审计
# 检查 if user has docker 访问 whoami-工具-检查 --角色 docker
# 列出 all capabilities whoami-工具-检查 --capabilities
# 检查 if another user exists whoami-工具-检查 --检查-user www-data
# JSON for 流水线 ingestion whoami-工具-检查 --审计 --json
Features Current 身份 — standard whoami 输出 Sudo 访问 检查 — passwordless sudo avAIlability 角色 verification — 检查 group membership for specific 角色s User 审计 — comprehensive 报告 (uid, gid, groups, sudo, shell, home dir) User existence — 验证 other 系统 users JSON 输出 — structured for security 审计s and 自动化 Exit codes — 0/1 for easy script integration