一、linux为用户添加sudo权限
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,这是止当前用户没有sudo权限
在root用户下操作
1、添加sudoers写权限
chmod u+w /etc/sudoers
2、编辑 vi /etc/sudoers
找到root ALL=(ALL) ALL在后面追加XXX ALL=(ALL) ALL
XXX ALL=(ALL) ALL (XXX指的是你要配置的用户)
3、撤销sudoers写权限
chmod u-w /etc/sudoers
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)