1

How to run a file with sudo without a password?

view story
linux-howto

http://askubuntu.com – I've made a script that preforms various system tasks, that I run regularly, but I have to use sudo to run the script, despite the fact that I own it because it runs root privileged commands. How can I add make sudo let me run this one file without having to enter my password every time I run it? I know that there are questions regarding running commands without a password, but I wasn't able to find one on running a file without a password. I am aware of the security risks, but I'm at home on a computer that I trust. I added john ALL = NOPASSWD: /home/john/.script/hibernate.sh to my /etc/s (HowTos)