Ubuntu下is not in the sudoers file 问题解决

在Ubuntu12.04 下,使用sudo apt-get install XXX 时,突然跳出 username is not in the sudoers file的问题

然后我一查此username的类型,果然是标准用户而不是管理员用户

解决这个问题至少有两种方法:

一。System Settings ->User Accounts -> 点击Unlock ->输入root密码 -> 修改AccountType(用户类型)为Administrator(管理员) -> 重启

root用户下,修改/etc/sudoers的权限为640(chmod 640 /etc/sudoers) -> vim /etc/sudoers -> 找到root ALL=(ALL:ALL) ALL ->添加

username ALL=(ALL:ALL) ALL -> 修改/etc/sudoers的权限为440(chmod 440 /etc/sudoers)-> 重启

这时我知道的两种方法,若有其他方法,请大神留言告之。

时间: 2024-07-29 10:23:33

Ubuntu下is not in the sudoers file 问题解决的相关文章

ubuntu:xxx is not in the sudoers file. 问题解决

ubuntu 下普通用户用 sudo 执行命令时报 "xxx is not in the sudoers file.This incident will be reported" 错误,解决方法是在 /etc/sudoers 文件里给该用户添加权限.操作过程如下: 1. 切换到 root 用户下 2. /etc/sudoers 文件默认是只读的,对 root 来说也是,因此需先添加 sudoers 文件的写权限,命令是: chmod u+w /etc/sudoers 3. 编辑 sud

Ubuntu——"xxx is not in the sudoers file.This incident will be reported" 错误解决方法

Ubuntu下普通用户用sudo执行命令时报如题所示错误,解决方法就是在/etc/sudoers文件里给该用户添加权限.如下: 1.切换到root用户下 2./etc/sudoers文件默认是只读的,对root来说也是,因此需先添加sudoers文件的写权限,命令是:chmod u+w /etc/sudoers 3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL (这里的xxx是你的用户名) ps

Linux下is not in the sudoers file解决方法

当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx is not in the sudoers file. This incident will be reported,xxx是你当前的用户名,究其原因是用户没有加入到sudo的配置文件里 切换到root用户,运行visudo命令 在打开的配置文件中,找到root ALL=(ALL) ALL,在下面添加一行 xxx ALL=(ALL) ALL 其中xxx是你要加入的用户名称 3 输入:wq保存并退出配置文件,再次使用sudo命令就

[转]Linux下is not in the sudoers file解决方法

来源: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html 当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx is not in the sudoers file. This incident will be reported,xxx是你当前的用户名,究其原因是用户没有加入到sudo的配置文件里 工具/原料 vi/vim 方法/步骤 1 切换到root用户,运行visudo命令 2 在打开的配置文件中,找

is not in the sudoers file 问题解决【转载】

解决方案:首需要切换到root身份$su -(注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还是当前用户的环境变量,用"su -"命令将环境变量也一起带过去,就象和root登录一样) 然后$visudo     //切记,此处没有vi和sudo之间没有空格 1.移动光标,到最后一行2.按a,进入append模式3.输入your_user_name ALL=(ALL)  ALL4.按Esc5.输入“:w”(保

在 ubuntu 下编译 android 找不到头文件问题解决

在 ubuntu 下编译 android 的时候, 发现编译错误, 有些头文件找不到, 如: 致命错误: alsa/asoundlib.h: 没有那个文件或目录 网上搜索了一下, 原因是某些库没安装导致. 可以使用 apt-file 查看该头文件在什么库中, 找到相应的库, 安装即可. 安装 apt-file : sudo apt-get install apt-file 查找头文件: apt-file search 头文件, 如: apt-file search alsa/asoundlib.

ubuntu下caffe加入新的python层问题解决

1. https://blog.csdn.net/computerme/article/details/78645445 这个很全,感谢作者 2. 问题:我遇到的 WITH_PYTHON_LAYER=1 make all -j&& make pycaffe 问题 CXX/LD -o python/caffe/_caffe.so python/caffe/_caffe.cpp touch python/caffe/proto/__init__.py touch ptyhon/caffe/pr

ubuntu下adb无法找到真机的问题解决

声明:本博客是作为记录之用,具体的解决方法并不是本博主找出来的,只是在此记录一下解决的过程而已. 参考博客有: http://blog.csdn.net/yunnywu/article/details/8550834 http://blog.csdn.net/microliang/article/details/16343641 http://blog.csdn.net/lincyang/article/details/9093239等. ----------------------------

Ubuntu 中出现username is not in the sudoers file. This incident will be reported的错误

参考网址http://www.maketecheasier.com/fixing-sudo-error-in-ubuntu/ 使用环境Ubuntu Linux系统下: 在学习鸟哥的私房菜时,使用了如下命令 <span style="font-size:18px;">usermod -G users username</span> username为你自己的用户名. 由于没有使用-a参数导致我的用户被分到了users用户组里,而原先的用户组被重置掉,仅剩下user