ubuntu或者CentOS中,/etc/sudoer 的权限为 0440时才能正常使用,否则sudo命令就不能正常使用。出现类似:sudo: /etc/sudoers is mode 0640, should be 0440 的对话。
解决办法:
1、Ctrl+Alt+F1   进入文本模式。用超级用户登录,如root
2、输入:chmod 0440 /etc/sudoers  。Enter
3、exit 退出
4、Ctrl+Alt+F7 返回图形模式。
5、在试试sudo命令,可以用了
 
P:其实另开一个端口,su -进入root,然后chmod 0440 /etc/sudoers  
效果是一样的
 
example:
[BIngo@windows ~]$ sudo chmod u+w /etc/sudoers
口令:
[BIngo@windows ~]$ ls -l /etc/sudoers
-rw-r----- 1 root root 3210 11-16 02:40 /etc/sudoers
[BIngo@windows ~]$ sudo chmod u-w /etc/sudoers
sudo: /etc/sudoers is mode 0640, should be 0440
[BIngo@windows ~]$ ls -l /etc/sudoers
-rw-r----- 1 root root 3210 11-16 02:40 /etc/sudoers
 
另开端口
[root@windows ~]# chmod 0440 /etc/sudoers
[root@windows ~]# exit
[BIngo@windows ~]$ ls -l /etc/sudoers
-r--r----- 1 root root 3210 11-16 02:40 /etc/sudoers

sudo: /etc/sudoers is mode 0640, should be 0440解决办法的更多相关文章

  1. sudo: /etc/sudoers is mode 0777, should be 0440 单用户 sudo不用输入密码的方法

    sudo权限问题考察一题  su -   sudo su -    sudo su - test [root@localhost ~]# su - zzx   #root用户进行切换不需要输入密码 [ ...

  2. sudo: /etc/sudoers is mode 0777, should be 0440终极解决之道

    不得不说,有时候手贱的把/etc/sudoers文件权限改了,是一件很蛋疼的事.因为此时你会发现无论做什么都会弹出一条讨厌的提示,说没有权限执行等等... 网上有介绍登入root用户,或者去grub的 ...

  3. sudo: /etc/sudoers is world writable

    错误信息: sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting 解决办法: 修复磁盘 ...

  4. sudo: /etc/sudoers 的模式为 0551,应为 0440

    环境:Ubuntu 12.04.4 LTS 32bit 本想修改/etc/sudoers文件,取消sudo权限的密码.但是因为sudoers文件无‘w’(写)的权限,然后用命令加写权限的时候加错了,加 ...

  5. SUDO:/ETC/SUDOERS 可被任何人写 解决方案

    问题一: sudo: /etc/sudoers is world writablesudo: no valid sudoers sources found, quittingsudo: unable ...

  6. sudo: /etc/sudoers is world writable|给用户添加权限报错

    给用户添加权限时候出现:sudo: /etc/sudoers is world writable| sudo: /etc/sudoers is world writable解决方式: pkexec c ...

  7. mac sudo: /etc/sudoers is world writable

    今天误操作修改了/etc/sudoers的权限,将它的权限改成了777,结果就导致执行所有sudo的命令都报错. sudo: /etc/sudoers is world writable sudo: ...

  8. 【linux】xx is not in the sudoers file 解决办法

    原帖地址:http://blog.sina.com.cn/s/blog_4ef045ab0100j59t.html 我用的是redhat5.4,在一般用户下执行sudo命令提示llhtiger is ...

  9. XXXX is not in the sudoers file. This incident will be reported解决方法

    假设你用的是Red Hat系列(包括Fedora和CentOS)的Linux系统.当你执行sudo命令时可能会提示“某某用户 is not in the sudoers file.  This inc ...

随机推荐

  1. GPRS连接失败问题

    备注:采用的是SIMCOM的SIM900模块 1. GPRS连接失败问题 2013.08.06测试9台C2000两次,两次之间是机器拿开电池,间隔40分钟左右,每次都出现一台(但不是同一台): ⑴9台 ...

  2. bash 读入文件

    Suppose we have a file contains the following information, termed input_file: A       0 B       1 C ...

  3. linux shell if 参数

    shell 编程中使用到得if语句内判断参数 –b 当file存在并且是块文件时返回真 -c 当file存在并且是字符文件时返回真 -d 当pathname存在并且是一个目录时返回真 -e 当path ...

  4. [Bhatia.Matrix Analysis.Solutions to Exercises and Problems]ExI.4.6

    Let $A$ and $B$ be two matrices (not necessarily of the same size). Relative to the lexicographicall ...

  5. MongoDB之二基础入门(安装启动)

    mongodb中有三元素:数据库,集合,文档,其中“集合” 就是对应关系数据库中的“表”,“文档”对应“行”. 一. 下载 上MongoDB官网 ,我们发现有32bit和64bit,这个就要看你系统了 ...

  6. How to cancel parallel loops in .NET C# z

    Cancellation token Parallel options CancellationTokenSource cancellationTokenSource = new Cancellati ...

  7. 卡尔曼滤波器【Kalman Filter For Dummies】

    搬砖到此: A Quick Insight     As I mentioned earlier, it's nearly impossible to grasp the full meaning o ...

  8. temorrow read

    http://blog.csdn.net/yimiyangguang1314/article/details/6268177 http://www.cnblogs.com/killmyday/arch ...

  9. 由一位坛友的布局想到的定位问题:absolute和relative

    坛友的问题和相关代码如下: 看看下面的代码.运行有问题.但是如果我把 style=”position:absolute; top:20px;left:10px改成 style=”float:left; ...

  10. 手机模拟器 上安装与卸载apk

    一.安装apk 将apk放到sdk安装目录下的platform-tools(不同版本的sdk也可能是tools) 1.adb kill-server2.adb start-server3.adb re ...