dev: automated commit - 2025-06-08 23:28:55

This commit is contained in:
Mariano Z. 2025-06-08 23:28:56 -03:00
parent 33106ea4a6
commit 0ab9f62ace
Signed by: marianozunino
GPG key ID: 4C73BAD25156DACE
13 changed files with 1255 additions and 715 deletions

42
runs/sudo Executable file
View file

@ -0,0 +1,42 @@
#!/usr/bin/env bash
# NAME: Configure passwordless sudo for wheel group
# REQUIRES: sudo
set -euo pipefail
# Source common functions
source "$(dirname "$0")/../common.sh" || {
echo "[ERROR] Could not source common.sh" >&2
exit 1
}
check_requirements() {
if ! is_root; then
log_error "This script requires root privileges"
log_info "Run with: sudo $0"
exit 1
fi
}
configure_sudo() {
local sudoers_file="/etc/sudoers.d/wheel"
local config_line="%wheel ALL=(ALL:ALL) NOPASSWD: ALL"
log_sudo "Configuring wheel group for passwordless sudo"
echo "$config_line" >"$sudoers_file"
chmod 440 "$sudoers_file"
log_info "Wheel group configured for passwordless sudo"
log_info "Users in wheel group can now use sudo without password"
}
main() {
init_script
check_requirements
configure_sudo
finish_script 0
}
main "$@"