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. C# 自定义光标 WaitCursor

    一种: 把图像文件放到项目的文件夹中 1 如果图像文件是.cur格式: Cursor cur=new Cursor(文件名); this.cursor=cur; 两句话 就完事 2 如果图像文件是其他 ...

  2. Regular Ball Super Ball

    Description: Regular Ball Super Ball Create a class Ball. Ball objects should accept one argument fo ...

  3. poj 1459 Power Network(增广路)

    题目:http://poj.org/problem?id=1459 题意:有一些发电站,消耗用户和中间线路,求最大流.. 加一个源点,再加一个汇点.. 其实,过程还是不大理解.. #include & ...

  4. Unity3D集成SVN进行版本控制

    首先,AssetServer确实很好用,Unity内部集成的管理界面,操作很简单,提交冲突的后还可以进行文件比对.但学习使用过程中,发现文件体积较大的项目文件目录(600M),我提交不上去,会返回没有 ...

  5. RPi 2B UART作为调试口或者普通串口

    /************************************************************************************** * RPi 2B UAR ...

  6. 【转】读取android根目录下的文件或文件夹

    原文网址:http://my.oschina.net/Ccx371161810/blog/287823 读取android根目录下的文件或文件夹 SDK的操作 读取android根目录下的文件或文件夹 ...

  7. jquery的API查看 / prepend、prependTo、append、appendTo的用法

    理解jquery设计思想 记住大部分jquery API的使用 英文:http://api.jquery.com/ 中文: http://www.css88.com/jqapi-1.9/ http:/ ...

  8. JSON--List集合转换成JSON对象

    转自:http://www.cnblogs.com/xmaomao/p/3184542.html 1. 简单的手动放置 键值对 到JSONObject,然后在put到JSONArray对象里 List ...

  9. 根据Excel列类型获取列的值

    using System.Data; using System.IO; using System.Text; using System.Web; using NPOI.SS.UserModel; us ...

  10. 有关SQL

    1.SQL str函数是什么意思? 将数值型转换成指定长度的字符串.str()函数语法:str(数字类型的表达式[,表达式总长度][,小数点后面的位数]),表达式总长度和小数点后面的位数为可选择参数. ...