% is not in the sudoers file 问题解决:非root用户使用sudo报错
2017-08-26 16:53
881 查看
概述:
在使用Redhat系列 / centOS 等系统时,使用非root用户执行sudo可能会遇到 “$NAME is not in the sudoers file “问题。这是由于这两类系统并没有把非root用户默认的添加到sudoers文件中。所以解决办法原理就是把该用户手动添加到sudoers文件中。而在Unbuntu等家庭教育向的系统中,由于默认删除了root用户,则不会遇到此问题。
解决步骤:
step1-4:查找系统对应的sudoers文件
whereis sudoers
默认是在 /etc/sudoers
step2-4:更换超级用户,添加写权限
su -root chmod u+w /etc/sudoers
使用 ls -al /etc/sudoers 可以检查权限。
step3-4:编辑sudoers文件,将非root用户写入文件
vim /etc/sudoers
在root下一行,将非root用户添加进去:
step4-4:还原sudoers文件权限*
chmod u-w /etc/sudoers
使用 ls -al /etc/sudoers 可以检查权限。
【例】
参考资料:
blog.sina.com.cn/s/blog_4ef045ab0100j59t.html
相关文章推荐
- CentOS下解决”用户账户is not in the sudoers file“问题
- 【QA4】【sudoers问题解决】(*** is not in the sudoers file.This incident will be reported)
- xx is not in the sudoers file 问题的解决
- *** is not in the sudoers file 问题解决
- 普通用户开通sudo权限:xxx is not in the sudoers file.This incident will be reported.的解决方法
- xx is not in the sudoers file 问题解决【转载】
- xx is not in the sudoers file 问题解决【转载】
- 【转】如何在fedora等Linux系统下解决(** is not in the sudoers file)的问题
- 解决"eker is not in the sudoers file"问题
- sudo使用问题之——xxx is not in the sudoers file。
- xx is not in the sudoers file 问题解决【转载】
- 解决用户执行sudo 报错:xxx is not in the sudoers file. This incident will be reported
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决
- 解决centOS下xxx is not in the sudoers file 问题
- xx is not in the sudoers file 问题解决
- xx is not in the sudoers file 问题解决
- *** is not in the sudoers file 问题解决
- is not in the sudoers file 问题解决【转载】
- sudo问题解决 用户名is not in the sudoers file