centos下xxx is not in the sudoers file.this incident will be reported
来源:互联网 发布:三体电影知乎 编辑:程序博客网 时间:2024/06/07 11:24
前阵子比较来比较去,选了CentOS作Linux系统,刚装到虚拟机里面,发现默认的用户无法开启系统权限。终端中输入sudo后提示“XXX is not in the sudoers file. This incident will be reported.” 上网搜搜,找到了解决办法:用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。下面是修改方法:
1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用)
2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。
3)编辑/etc/sudoers文件。也就是输入命令"vim /etc/sudoers",输入"i"进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"xxx ALL=(ALL) ALL"(这里的xxx是你的用户名),然后保存(就是先按一 下Esc键,然后输入":wq")退出。
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"
阅读全文
0 0
- centos下xxx is not in the sudoers file.this incident will be reported
- centos 修改xxx is not in the sudoers file. This incident will be reported
- Fix the problem:xxx is not in the sudoers file.This incident will be reported
- xxx is not in the sudoers file. This incident will be reported (解决办法)
- xxx is not in the sudoers file. This incident will be reported的解决方法
- XXX is not in the sudoers file. This incident will be reported.
- sodu时提示:XXX is not in the sudoers file. This incident will be reported
- xxx is not in the sudoers file. This incident will be reported的错误解决方案
- xxx is not in the sudoers file. This incident will be reported的解决方法
- xxx is not in the sudoers file. This incident will be reported.
- XXX is not in the sudoers file. This incident will be reported.
- xxx is not in the sudoers file. This incident will be reported.
- xxx is not in the sudoers file. This incident will be reported的解决方法
- xxx is not in the sudoers file. This incident will be reported的解决方法
- xxx is not in the sudoers file This incident will be reported
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file. This incident will be reported.
- xxx is not in the sudoers file. This incident will be reported
- 快排
- 学习Linux C编程之数据类型 问题-extern及static修饰全局变量的区别
- nagios插件之发起http的purchase购买请求
- java 课堂笔记 类和对象
- 【C语言】【unix c】编写代码实现基于UDP的网络通信
- centos下xxx is not in the sudoers file.this incident will be reported
- 从问题角度来思考设计模式(1)
- Javaweb面试题
- kubernetes之Scheduler分析
- Oracle笔记十一: 建表、更新、查询综合练习
- redhat7创建完整克隆之后出现Network is unreachable解决办法
- 项目报错java.lang.NoClassDefFoundError: HttpServletRequest
- python3[爬虫实战] 使用selenium,xpath爬取京东手机(下)
- 【C语言】【unix c】获得当前路径