How do I give permission to execute the command shutdown
to user?
I'm using OS Linux Mint 13.
How do I give permission to execute the command shutdown
to user?
I'm using OS Linux Mint 13.
One of the alternatives is to edit the / etc / sudoers file and include the following line in this file:
user host = (root) NOPASSWD: /sbin/shutdown
Where:
user = user you want to give shutdown permission without prompting for password
host = hostname (run the hostname command to know)
To edit the / etc / sudoers file use the visudo tool, see below:
sudo visudo -f /etc/sudoers
An actual example (my backup computer):
luiz storage = (root) NOPASSWD: /sbin/shutdown
Running the command:
sudo /sbin/shutdown -r now
The above command will give you an immediate shutdown and reboot your computer. No password will be requested.