来源:https://blog.csdn.net/kanaka10/article/details/84833630
1. 进入root
su - root
2. 修改/etc/sudoers文件的权限
chmod u+w /etc/sudoers
3. 编辑内容
## Allow root to run any commands anywhere
root ALL=(ALL) ALL
username ALL=(ALL) NOPASSWD:ALL # 添加此行,username为要加入sudoers的用户
4. 撤销/etc/sudoers文件的写权限
chmod u-w /etc/sudoers
---------------------
作者:Michael-JOE
来源:CSDN
原文:https://blog.csdn.net/kanaka10/article/details/84833630
版权声明:本文为博主原创文章,转载请附上博文链接!