How to Run Sudo Command Without Password

我使用的是root命令
操作系统:CoreOS_2345_3.0_x64
执行命令,将<username>替换为用户名

# sudo vi /etc/sudoers.d/<username>

然后输入一下内容保存

<username> ALL=(ALL) NOPASSWD:ALL

然后使用该username登录,再使用sudo时则不再提示输入用户名

参考:
https://linuxize.com/post/how-to-run-sudo-command-without-password/

原文地址:https://www.cnblogs.com/grj1046/p/13296547.html