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/

posted @ 2020-07-13 23:14  nil  阅读(134)  评论(0编辑  收藏  举报