ubnutu20.04-sudo免密码设置-无需要重新启动

为当前用户tsingyun添加sudo免密码功能,

登陆后先切换至root账号:

sudo su

新建文件:

touch /etc/sudoers.d/tsingyun 

echo 'tsingyun  ALL=(ALL) NOPASSWD: ALL'  >  /etc/sudoers.d/tsingyun

posted @ 2022-03-29 17:59  向往明天-tsingyun  阅读(213)  评论(0编辑  收藏  举报