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

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

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

一。System Settings ->User Accounts -> 点击Unlock ->输入rootpassword -> 改动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)-> 重新启动

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

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

  1. 关于Ubuntu下is not in the sudoers file解决方法

    当我在postgres用户下去执行sudo vim demo.sql需要用管理员权限运行时,并且输入本用户的密码,但是输入之后提示如下: postgers is not in the sudoers ...

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

    ubuntu 下普通用户用 sudo 执行命令时报 "xxx is not in the sudoers file.This incident will be reported" ...

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

    Ubuntu下普通用户用sudo执行命令时报如题所示错误,解决方法就是在/etc/sudoers文件里给该用户添加权限.如下: 1.切换到root用户下 2./etc/sudoers文件默认是只读的, ...

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

    最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...

  5. Linux下is not in the sudoers file(转)

    用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权 ...

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

    来源: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html 当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx ...

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

    解决方案:首需要切换到root身份$su - 或者 $sudo -s (注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root,但没有把root的环境变量传过去,还 ...

  8. ubuntu下搜狗输入法待选框中文乱码问题解决(重启搜狗输入法)

    简单的三个命令就可以解决 killall fcitx //关闭fcitx killall sogou-qimpanel //关闭搜狗输入法 fcitx //打开fcitx

  9. Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法

    提示错误信息 www@iZ236j3sofdZ:~$ ifconfig Command 'ifconfig' is available in '/sbin/ifconfig' The command ...

随机推荐

  1. InputStream中read()与read(byte[] b)

    原文:InputStream中read()与read(byte[] b) read()与read(byte[] b)这两个方法在抽象类InputStream中前者是作为抽象方法存在的,后者不是,JDK ...

  2. 【C++】第二章:Hello World!

    1.开发工具:Microsoft Visual C++ v6.0 2.通过IDE建立Hello World程序: 我们可以看到三个文件夹结构,分别是: Source Files(源文件). Heade ...

  3. servlet 与缓存(4)

    1.设置缓存的两种情况: 第一种:对于不常常变化的数据,在servlet中能够为其设置合理的缓存时间值,以避免浏览器频繁向server发送请求,提升server的性能. 另外一种:假设要实现一种高级功 ...

  4. ADO.NET 2SqlDataAdapter、DataSet 的基本用法

    数据集完全独立于数据源,可以与数据源链接或者完全断开,其基本作用是为存储在内存缓存中的的数据提供关系视图 如果只是想读取和显示数据,则值需要使用数据读取器,尤其是处理大量数据的时候 如果需要处理数据, ...

  5. fcntl()

      fcntl() F_GETFL---------------------------------------------        将文件状态标志作为函数值返回. 文件状态标志:        ...

  6. 终于懂了:TWinControl主要是Delphi官方用来封装Windows的官方控件,开发者还是应该是有TCustomControl来开发三方控件

    再具体一点,就是TWinControl一般情况下不需要Canvas和Paint(TForm是个例外),而TCustomControl自带这2个. 同时开发者应该使用TGraphicControl,而不 ...

  7. 用lisp来让计算机学会写作

    大部分的代码.思路参考了<Ansi Common Lisp>P138~P141. 问题:给一篇英文文本,如何让计算机依据此文本而生成随机但可读的文本.如: |Venture| The Na ...

  8. perl学习(8) 控制:unless,until,next,redo,last

    Perl中实现了所有C 的操作符! Perl力求代码最少! 1.1.unless unless的含义是:除非条件为真,否则执行块中的代码,和if正好相反 unless($fred=~ /^[A-Z_] ...

  9. EasyUI - DataGrid 组建 - [ 删除,修改 ]

    效果: html代码: <div style="padding-top: 50px; width: 800px; margin: 0 auto;"> <!--使用 ...

  10. linux命令:find

    先上例子: find ./*_src -type f | xargs grep -ils "date" 在指定的那些文件夹下面,递归寻找包含“date” 字符串的普通文件. fin ...