0
How do I give permission to execute the command shutdown
to the user ?
I am using OS Linux Mint 13.
0
How do I give permission to execute the command shutdown
to the user ?
I am using OS Linux Mint 13.
1
One of the alternatives is to edit the file /etc/sudoers and to include in this file the following line:
user host = (root) NOPASSWD: /sbin/shutdown
Where:
user = user you want to give permission to shutdown without asking for password
host = hostname (execute hostname command to know)
To edit the file /etc/sudoers use the tool visudo, see below:
sudo visudo -f /etc/sudoers
A real example (my computer backup):
luiz storage = (root) NOPASSWD: /sbin/shutdown
Running the command:
sudo /sbin/shutdown -r now
The above command will give an immediate shutdown and reboot the computer. No password will be requested.
Browser other questions tagged linux bash mint
You are not signed in. Login or sign up in order to post.
sudo
does not solve your problem?– Felipe Avelar
no, it asks for the root password!
– André Cabral
Why don’t you add your user in sudoers?
– Giancarlo Abel Giulian
I already added, but it doesn’t work, send an ex please!
– André Cabral
I think this question is off-topic for Sopt, maybe a place to ask is http://unix.stackexchange.com or http://askubuntu.com (Mint is a Ubuntu "Fork")
– Guilherme Nascimento