Ubuntu技巧之 is not in the sudoers file解决方法
来源:互联网 发布:淘宝飞猪订酒店可靠吗 编辑:程序博客网 时间:2024/05/29 08:20
用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。
例子:
www_linuxidc_com@linuxidc-Aspire-3680:~$ sudo add-apt-repository ppa:stk/dev
[sudo] password for www_linuxidc_com:
www_linuxidc_com is not in the sudoers file. This incident will be reported.
www_linuxidc_com@linuxidc-Aspire-3680:~$
下面是解决方法:
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"在起下面添加"www_linuxidc_com ALL=(ALL) ALL"(这里的xxx是你的用户名),然后保存退出。
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。
- 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”解决方法
- java中判断字符串是否为数字的三种方法
- POJ-1904 King's Quest 强连通分量求完美匹配
- 对比常量存储与堆栈
- 使用powernowd为CPU降降温!
- linux设备驱动之异步通知与异步I/O
- Ubuntu技巧之 is not in the sudoers file解决方法
- html的基础知识总结
- 在线MSDN中的各个C#关键字解释
- 黑马训练营学习笔记
- C语言基础知识 梳理总结
- ScrollView嵌套Gridview或者listview滚动问题
- MYSQL集群部署(二)--主备部署
- 方兴未艾的社会计算
- win7、vs2010、Ribbon写的wpf程序在xp的机器上不能运行