Linux教程:XXX is not in the sudoers file解决
2013-03-20 00:42
429 查看
问题:用sudo命令时提示"xxx is not in the sudoers file. This incident will bereported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo命令。
解决:只要修改一下/etc/sudoers文件就行了。
1.进入超级用户模式。也就是输入"su-",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(注:您也可以直接用root登录);
2.添加文件的写权限,因为sudoers这个文件只允许读,不允许写入。输入命令"chmod u+w /etc/sudoers";
3.编辑/etc/sudoers文件。输入命令"vi/etc/sudoers",输入"i"进入编辑模式,找到这一行:"root ALL=(ALL) ALL",在这行下面添加"xxxALL=(ALL) ALL"(这里的xxx是你的用户名),然后按Esc键,输入":wq",保存退出;
4.撤销文件的写权限,还原文件的读写状态。输入命令"chmod u-w /etc/sudoers"。
解决:只要修改一下/etc/sudoers文件就行了。
1.进入超级用户模式。也就是输入"su-",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(注:您也可以直接用root登录);
2.添加文件的写权限,因为sudoers这个文件只允许读,不允许写入。输入命令"chmod u+w /etc/sudoers";
3.编辑/etc/sudoers文件。输入命令"vi/etc/sudoers",输入"i"进入编辑模式,找到这一行:"root ALL=(ALL) ALL",在这行下面添加"xxxALL=(ALL) ALL"(这里的xxx是你的用户名),然后按Esc键,输入":wq",保存退出;
4.撤销文件的写权限,还原文件的读写状态。输入命令"chmod u-w /etc/sudoers"。
相关文章推荐
- linux系统使用sudo命令报xxx is not in the sudoers file.This incident will be reported.的解决方法
- Linux有问必答:怎样解决“XXX is not in the sudoers file”错误
- Linux sudo 错误:XXX is not in the sudoers file 解决办法
- Linux Sudo xxx is not in the sudoers file 的解决方法
- Linux有问必答:怎样解决“XXX is not in the sudoers file”错误
- Linux中“xxx is not in the sudoers file”解决方法
- Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- [转]Linux之"xxx is not in the sudoers file"解决方法
- 解决Linux中 xxx is not in the sudoers file
- 解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
- 【Linux学习】Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- Linux_服务器_03_xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- 【linux】xx is not in the sudoers file 解决办法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- 【转】如何在fedora等Linux系统下解决(** is not in the sudoers file)的问题