sudo with no password

/*********************************************************************************
 *                         sudo with no password
 * 说明:
 *     apache不能使用root用户作为执行,取巧的方式执行,不过不建议使用。
 *
 *                                              2018-2-7 深圳 宝安西乡 曾剑锋
 ********************************************************************************/

一、参考文档:
    1. Allowing PHP to run specific bash script with root permissions
        https://serverfault.com/questions/772171/allowing-php-to-run-specific-bash-script-with-root-permissions

二、使用方法:
    cat /etc/sudoers
        ...
        root ALL=(ALL) ALL
        daemon ALL=(ALL) NOPASSWD: ALL
        ...
原文地址:https://www.cnblogs.com/zengjfgit/p/8427605.html