% is not in the sudoers file 问题解决:非root用户使用sudo报错
来源:互联网 发布:java中的命名规范 编辑:程序博客网 时间:2024/05/20 03:08
概述:
在使用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 -rootchmod 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
阅读全文
0 0
- % is not in the sudoers file 问题解决:非root用户使用sudo报错
- sudo问题解决 用户名is not in the sudoers file
- 解决用户执行sudo 报错:xxx is not in the sudoers file. This incident will be reported
- Linux 使用sudo时,报错 is not in the sudoers file. This incident will be reported 解决
- *** is not in the sudoers file 问题解决
- *** is not in the sudoers file 问题解决
- linux系统使用sudo命令报xxx is not in the sudoers file.This incident will be reported.的解决方法
- ubuntu 将一般的用户加入sudo组 is not in the sudoers file
- sudo "……is not in the sudoers file." 怎么办?
- xxx is not in the sudoers file解决方法 SUDO
- ubuntu sudo is not in the sudoers file.
- ubuntu sudo is not in the sudoers file.
- linux sudo xxx is not in the sudoers file错误
- sudo xxxx is not in the sudoers file
- sudo使用问题之——xxx is not in the sudoers file。
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- xx is not in the sudoers file 问题解决
- netbeans和myeclipse以及eclipse怎么导入和使用jar包
- 在MAC上安装PyQt4(含Pycharm bug解决方案)
- 学习mybatis框架中遇到org.apache.ibatis.exceptions.PersistenceException: 问题该怎么解决
- Logstash 5.5连接Elasticsearch+Kibana
- Conscription
- % is not in the sudoers file 问题解决:非root用户使用sudo报错
- c++的粗略学习2(继承,多态)
- 面试心得 --- 滴滴三面
- 计算机网络笔记(一)
- RE:JAVA学习-基本IO操作及文本数据IO操作
- maven之clean、install命令
- 第三章:3.7 傅里叶变换性质(一)
- 微型四轴飞行器(2)硬件设计
- 高吞吐高并发Java NIO服务的架构