CentOS──xxx is not in the sudoers file解决方法
来源:互联网 发布:上证指数月k线数据 编辑:程序博客网 时间:2024/05/16 12:48
前阵子比较来比较去,选了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"。
方法来自:http://www.cnblogs.com/beauty/archive/2010/09/27/1836970.html
0 0
- CentOS──xxx is not in the sudoers file
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- CentOS──xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file解决方法 SUDO
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file解决方法
- debian中xxx is not in the sudoers file解决方法
- debian中xxx is not in the sudoers file解决方法
- 12.完美的代价
- 多文件
- nginx 全局变量
- AJAX实现随笔提示功能
- 张孝祥整理的JAVA面试题目(八)(每天一更)
- CentOS──xxx is not in the sudoers file解决方法
- Basic Level 1012. 数字分类 (20)
- map获取输入文件名称和GenericOptionsParser使用
- 如何在代码中设置imageview的大小
- MyBatis 分页代码实现
- 子数组合并算法之向右循环
- 基本配置及安全级别security-level
- vs2010编译boost c++库 && blitz++
- Memcached源码分析之网络连接建立