Ubuntu技巧之 is not in the sudoers file解决方法
来源:互联网 发布:抽奖算法模型 编辑:程序博客网 时间:2024/05/16 18:39
本文介绍了在Ubuntu使用过程中遇到 is not in the sudoers file 时的解决办法。
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
下面是解决方法:
1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用)
(注意有- ,这和su是不同的,在用命令”su”的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用”su -”命令将环境变量也一起带过去,就象和root登录一样)
2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。
3)编辑/etc/sudoers文件。也就是输入命令"gedit /etc/sudoers",进入编辑模式,找到这一 行:"root ALL=(ALL) ALL"在起下面添加"user_name ALL=(ALL) ALL"(这里的user_name是你的用户名),然后保存退出。
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。
reference:
http://www.linuxidc.com/Linux/2010-12/30386.htm
http://wenku.baidu.com/view/c28249323968011ca30091b6.html
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu技巧之 is not in the sudoers file解决方法
- Ubuntu之 is not in the sudoers file解决方法
- Ubuntu技巧之"xxx is not in the sudoers file"解决方法
- Ubuntu技巧之"xxx is not in the sudoers file"解决方法
- ubuntu系统提示“is not in the sudoers file”解决方法
- is not in the sudoers file解决方法
- is not in the sudoers file解决方法
- is not in the sudoers file解决方法
- ubuntu is not in the sudoers file
- ubuntu 之is not in the sudoers file
- $username is not in the sudoers file 解决方法
- xxx is not in the sudoers file解决方法
- xxx is not in the sudoers file解决方法
- Linux中“is not in the sudoers file”解决方法
- OpenLayers中的图层
- 如何让Win8系统开机的速度可以用秒开
- SQL分类
- linux视频驱动之videobuf
- 实现 CheckButton:超简易教程
- Ubuntu技巧之 is not in the sudoers file解决方法
- 电脑键盘失灵了该怎么应急处理和诊断技巧
- 优秀技术领导者的修成之道
- maven 命令
- 产生一个int数组,长度为100,并向其中随机插入1-100,并且不能重复
- 如何一键关闭Win7系统中没有响应的程序技巧
- 验证码
- asp.net 2.0下gridview的一个tips
- 常用的正则表达式(会不断更新)