wheel-nopasswd
| Version | 2026.144.1443 |
| Repo | box/cachyos |
Passwordless sudo for the wheel group
Installs sudo, ensures the wheel group exists, adds the uid-1000
account to wheel, and writes /etc/sudoers.d/20-nopasswd-wheel
(%wheel ALL=(ALL:ALL) NOPASSWD: ALL, mode 0440). Verifiable: sudo is
installed and sudo -n -l shows a NOPASSWD rule for the user.
Packages
Section titled “Packages”Installed on every distro:
sudo
Acceptance plan
Section titled “Acceptance plan”This candy’s plan: — the runnable spec charly check executes against a live deployment. check: steps are idempotent probes; run: steps change state.
| Intent | Step |
|---|---|
run |
write=/etc/sudoers.d/20-nopasswd-wheel |
run |
command=set -e getent group wheel >/dev/null || groupadd wheel account=$(getent passwd 1000 | cut -d: -f1) if [ -z “$account” ]; then echo “wheel-nopasswd: no uid-1000 account found — refusing to add to wheel” >&2 exit 1 fi usermod -aG wheel “$account” id -nG “$account” | tr ’ ’ ‘\n’ | grep -qx wheel || { echo “wheel-nopasswd: FATAL: $account not in wheel after usermod” >&2 exit 1 } |
check |
the sudo package is installed |
check |
the uid-1000 user has a passwordless sudo rule in effect |
check |
package=sudo |
check |
command=if [ “$(id -u)” = “0” ]; then account=$(getent passwd 1000 | cut -d: -f1) runuser -u “$account” – sudo -n -l else sudo -n -l fi |