针对某个用户,设置sudo命令不需要输入密码
vi /etc/sudoers
在
## Allow root to run any commands anywhereroot ALL=(ALL) ALL
下面加入一行
lanyun ALL=(ALL) NOPASSWD: ALL
sudo 设置无需密码
原文:https://www.cnblogs.com/forthelichking/p/11759309.html