Skip to main content

Module sudoers

Module sudoers 

Source
Expand description

Scoped sudoers.d management.

GetSudoGrants lists the SysKnife-managed drop-ins (read-only). GrantSudoAccess and RevokeSudoAccess create/remove a drop-in under /etc/sudoers.d/ via the root-owned helper /usr/lib/sysknife/sudoers-edit, which validates the rule with visudo -cf on a temp file BEFORE installing it — so a malformed rule can never land in /etc/sudoers.d/ and break sudo. This is the highest-privilege action family (it configures privilege escalation itself), hence Admin/High with exact-approval previews.

Functions§

get_sudo_grants
List SysKnife-managed sudoers drop-ins (sudoers-edit --op list). Read-only.
grant_sudo_access
Grant a scoped sudo rule via the visudo-validated helper.
revoke_sudo_access
Remove a SysKnife-managed sudoers drop-in (sudoers-edit --op revoke).
specs