sudo_config
Manage Linux sudo passwordless configurations by generating, installing, testing, and maintaining sudoers files with dry-run verification.
Instructions
Linux Sudo无密码配置管理:生成、安装、测试和管理sudoers配置。支持dry-run演练模式。
示例:检查sudo状态 { "action": "status" } 示例:生成配置 { "action": "generate", "username": "user", "scope": "limited", "dry_run": true }
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | 操作:status(状态)、generate(生成)、install(安装)、remove(移除)、list(列表)、test(测试)、recommendations(建议) | |
| username | No | 用户名 | |
| scope | No | sudo配置范围:limited(有限)、extended(扩展)、full(完全) | |
| commands | No | 允许无密码执行的命令列表 | |
| config_name | No | 配置文件名称 | |
| dry_run | No | 演练模式,只显示操作而不实际执行 | |
| output_format | No | 输出格式:text(纯文本)、json(结构化JSON)、both(两者兼有) |