CentOS──xxx is not in the sudoers file解决方法
来源:互联网 发布:linux安装jira7.22 编辑:程序博客网 时间:2024/05/20 19:33
CentOS──xxx is not in the sudoers file解决方法
2013-09-24 10:48:30| 分类:默认分类 | 标签:centos |举报|字号 订阅
下载LOFTER客户端前阵子比较来比较去,选了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"
CentOS──xxx is not in the sudoers file解决方法
2013-09-24 10:48:30| 分类:默认分类 | 标签:centos |举报|字号 订阅
下载LOFTER客户端
前阵子比较来比较去,选了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
- 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解决方法
- Android+JNI 的编写步骤 从HelloWorld开始
- C# 下载远程文件
- MFC Radio Button 使用 分组 RadioButton 用法
- 用cxf编写基于spring的webservice之下篇
- Android Dalvik虚拟机JNI方法的注册过程分析
- CentOS──xxx is not in the sudoers file解决方法
- 用SignalR 2.0开发客服系统 续集[系列6:使用自己的连接ID]
- Eclipse cdt c++11 blade 设置
- android 界面防劫持提示
- 《黑马程序员》Java 异常
- 设置double类型显示位数
- winRT C++ WriteableBitmap^转换为byte^,再用opencv处理图片
- Swift 2.0 下面向协议的MVVM架构实践
- python 爬取GKGY会员多线程demo