How do I add the following to the sudoers file in RHEL5?
daemon ALL=(ALL) NOPASSWD: /usr/local/bin/php /var/www/batch.php
Use the visudo command for safe editing of the sudoers file, as root or with sudo:
If you don't know vi, you can use whatever editor you want by setting the EDITOR environment variable (assuming $VISUAL is not set), for example as root:
Although, if you don't know vi basics, maybe you shouldn't be editing your sudoers file :-)
Personally I'd recommend Kyle Brandt's solution.
[Edit] I've added sudo to the example as per Dennis Williamson's suggestion.