Skip to content

Instantly share code, notes, and snippets.

@ju1ius
Created July 13, 2011 20:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ju1ius/1081240 to your computer and use it in GitHub Desktop.
Save ju1ius/1081240 to your computer and use it in GitHub Desktop.
Allow all users to shutdown and reboot without password
#! /bin/bash
# Edit /etc/sudoers to allow all users to shutdown and reboot without password
# Your previous sudoers file will be backed as /etc/sudoers.bak
sudo sed -i.bak -e '$ a\
ALL ALL=\(ALL\) NOPASSWD: /sbin/shutdown, sbin/reboot
' /etc/sudoers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment