Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to make shutdown without root user using visudo

I tried the following still it did not work for me

hawk ALL=NOPASSWD:/sbin/shutdown -h now

share|improve this question

Try this

hawk ALL = NOPASSWD: /sbin/shutdown

then use

sudo shutdown -h now 

to shut the system down

share|improve this answer
yes.. I tried that but it did not work – manugupt1 Jun 13 '10 at 20:20
If hawk is your username and you are logged in as hawk it should work. What is the error message you get from sudo ? – Iain Jun 13 '10 at 20:44
this would not work thanks for your help.. to make it work we should use sudo /sbin/shutdown -h now, this works I had kinda avoided it for long anutime I tried it – manugupt1 Jun 14 '10 at 8:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.