Skip to content

sudo-toggle

Usage
sudo-toggle

Toggles the sudo NOPASSWD rule on and off via /etc/sudoers.d/nofail-toggle. Useful for automated tasks that would otherwise require a password entry. Clears the sudo credential cache when re-enabling, so the lockdown takes effect immediately.

Returns:
0 Rule toggled
Examples
sudo-toggle