Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.