【转】如何在fedora等Linux系统下解决(** is not in the sudoers file)的问题
2011-05-30 00:52
986 查看
用sudo命令时候,提示我:“john is not in the sudoer file
,。。。。”的问题,此时无论输入john的密码还是root的密码,是因为没有将你普通用户加入sudoer文件里面,故不能使用,上网查了下资料,解决方法如下:
参考如下:http://blog.csdn.net/andyelvis/archive/2008/11/27/3395181.aspx
解决方案:
首需要切换到root身份
$su -
(注意有-
,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su
-"命令将环境变量也一起带过去,就象和root登录一样)
然后
$visudo
//切记,此处没有vi和sudo之间没有空格
1、移动光标,到最后一行
2、按a,进入append模式
(插入文本模式,类似i)
3、输入
your_user_name
ALL=(ALL) ALL //红色那部分是填写你自己的用户名
4、按Esc
5、输入“:w”(保存文件)
6、输入“:q”(退出)
这样就把自己加入了sudo组,可以使用sudo命令了。
,。。。。”的问题,此时无论输入john的密码还是root的密码,是因为没有将你普通用户加入sudoer文件里面,故不能使用,上网查了下资料,解决方法如下:
参考如下:http://blog.csdn.net/andyelvis/archive/2008/11/27/3395181.aspx
解决方案:
首需要切换到root身份
$su -
(注意有-
,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su
-"命令将环境变量也一起带过去,就象和root登录一样)
然后
$visudo
//切记,此处没有vi和sudo之间没有空格
1、移动光标,到最后一行
2、按a,进入append模式
(插入文本模式,类似i)
3、输入
your_user_name
ALL=(ALL) ALL //红色那部分是填写你自己的用户名
4、按Esc
5、输入“:w”(保存文件)
6、输入“:q”(退出)
这样就把自己加入了sudo组,可以使用sudo命令了。
相关文章推荐
- Linux配置之解决CentOS中:xx is not in the sudoers file的问题
- linux系统使用sudo命令报xxx is not in the sudoers file.This incident will be reported.的解决方法
- Linux配置之解决CentOS中:xx is not in the sudoers file的问题
- Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- xx is not in the sudoers file 问题解决【转载】
- 解决centOS下xxx is not in the sudoers file 问题
- Linux有问必答:怎样解决“XXX is not in the sudoers file”错误
- Linux Sudo xxx is not in the sudoers file 的解决方法
- xx is not in the sudoers file 问题解决
- 解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
- Fedora 7解决XXX is not in the sudoers file
- xx is not in the sudoers file 问题解决【转载】
- Linux下is not in the sudoers file解决方法
- Linux下is not in the sudoers file解决方法
- Linux_服务器_03_xxx is not in the sudoers file.This incident will be reported.的解决方法
- centos username is not in the sudoers file 问题解决方法
- Fedora提示 xxxis not in the sudoers file.this incident will be reported解决办法 [转]
- Fedora提示 xxxis not in the sudoers file.this incident will be reported解决办法
- xx is not in the sudoers file 问题解决【转载】
- *** is not in the sudoers file 问题解决