bin/equislinux-sudo manages the narrow NOPASSWD rules used by the release
and validation scripts. It resolves the workspace at runtime, so the rule
paths follow the actual checkout instead of a hardcoded home directory.
# Show the rules that would be written (default; no changes)
./bin/equislinux-sudo
# Write /etc/sudoers.d/equislinux (asks for your sudo password)
./bin/equislinux-sudo --apply
# Inspect or remove them
sudo ./bin/equislinux-sudo status
sudo ./bin/equislinux-sudo removeLegacy spellings from the old xlnux-sudo.sh are accepted:
sudo ./bin/equislinux-sudo --create # same as install --apply
sudo ./bin/equislinux-sudo --status
sudo ./bin/equislinux-sudo --removeThe allowlist is intentionally small:
scripts/test/generations-btrfs.shx/xbuild.shwsl/publish-sf.shwsl/build-rootfs.sh
For each one it writes both forms, when applicable:
<user> ALL=(root) NOPASSWD: /usr/bin/bash /absolute/path/to/script
<user> ALL=(root) NOPASSWD: /absolute/path/to/script
The file is installed as /etc/sudoers.d/equislinux with mode 0440 and
root ownership. The legacy /etc/sudoers.d/xlnux-sprint is removed on
--apply unless --keep-legacy is used.
The workspace is discovered with --workspace, X_WORKSPACE, the
~/.config/equislinux/workspace file, the parent of this repository, or the
common locations. If the workspace move or is renamed, rerun:
./bin/equislinux-sudo --applyThe old absolute paths would otherwise remain in sudoers.
NOPASSWDon a script the target user can edit is equivalent to passwordless root. The utility prints a warning.--strictrefuses user-writable targets for root-owned layouts, but this is a convenience for a single-user development machine, not a security boundary.- The generated file is validated with
visudo -cfbefore installation. - The previous file is backed up under
/var/backups/equislinux. - Changes take effect immediately; no reboot is required. Removing the file revokes future invocations. An already-running process keeps its privileges.
- After
remove,sudo -kclears any cached sudo timestamp. --user USERgrants the rules to another account; the default isSUDO_USERor the invoking user.
sudo ./bin/equislinux-sudo status
sudo -n -l | grep -i equislinux
sudo -n /usr/bin/bash /absolute/path/to/scripts/test/generations-btrfs.shThe last command should work only while the rules are installed. After
remove, it should fail with a password requirement.
sudo: a password is required: run the command interactively;--apply,statusandremoveneed root.workspace not found: pass--workspace /path/to/equislinux, exportX_WORKSPACE, or runequislinux-workspace --set-default.visudo rejected the generated rules: nothing is installed; the previous file is restored. Check the reported path and rerun.path exists but...: the four expected scripts must exist in the workspace; clone/pull the repositories first.