一、配置文件:/etc/sudoers。
二、使用root用户运行visudo,修改如下:
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
ms ALL=(ALL) NOPASSWD:ALL
#ms mshost=(ALL) NOPASSWD:/bin/yum,/bin/systemctl,/sbin/reboot,/usr/bin/firewall-cmd,/bin/date,/sbin/hwclock -w