Updated shutdown and reboot commands to use absolute paths to ensure they work correctly with the sudoers configuration. Also updated the sudoers file to allow shutdown with specific arguments. Changes: - Use /sbin/shutdown instead of just shutdown - Use /sbin/reboot instead of just reboot - Updated sudoers to allow both 'shutdown -h +1' and 'shutdown -h now' - Ensures commands match sudoers whitelist exactly The restart was working because reboot might be in PATH, but shutdown needs the full path to match the sudoers entry. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
10 lines
466 B
Plaintext
10 lines
466 B
Plaintext
# Allow wedding-phone user to shutdown and reboot without password
|
|
# Copy this file to /etc/sudoers.d/wedding-phone-shutdown
|
|
# Usage: sudo cp wedding-phone-shutdown /etc/sudoers.d/wedding-phone-shutdown
|
|
# Then: sudo chmod 0440 /etc/sudoers.d/wedding-phone-shutdown
|
|
|
|
# Allow user to run shutdown and reboot commands without password
|
|
berwn ALL=(ALL) NOPASSWD: /sbin/shutdown -h +1
|
|
berwn ALL=(ALL) NOPASSWD: /sbin/shutdown -h now
|
|
berwn ALL=(ALL) NOPASSWD: /sbin/reboot
|