vi /etc/sudoers.d/nopasswd4sudo 加入以下内容 用户名 ALL=(ALL) NOPASSWD : ALL 转载于:https://www.cnblogs.com/sea-stream/p/9802371.html