sudo 设置无需密码

针对某个用户,设置sudo命令不需要输入密码

vi /etc/sudoers

## Allow root to run any commands anywhere
root ALL=(ALL) ALL

下面加入一行

lanyun  ALL=(ALL) NOPASSWD:  ALL

猜你喜欢

转载自www.cnblogs.com/forthelichking/p/11759309.html