今天配置sudoers 的报错:

[sheng@test3 ~]$ sudo -l
>>> /etc/sudoers: syntax error near line 122 <<<
sudo: parse error in /etc/sudoers near line 122
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

在网上看到是/etc/sudoers 权限应该是440, 结果还是报错。

我就添加了:sheng ALL=(ALL) ALL

后来发现我用的vi, 正确的方法是visudo, 后来添加这一行: sheng ALL=(ALL) ALL 就问题解决。

切换到 su - sheng, 然后测试sudo: sudo -l 表示成功。

ubuntu - sudo file 编辑报错 sudo: no valid sudoers sources found, quitting相关推荐

  1. 安装ROS使用sudo rosdep init 报错ERROR: cannot download default sources list from:

    Author: 杭州电子科技大学-自动化学院-智能系统和机器人研究中心-Jolen Xie Q:安装ROS使用rosdep init报错 sudo apt install python-rosdep ...

  2. Ansible:遇到错误 sudo: /etc/sudoers is world writable\r\nsudo: no valid sudoers sources found, quitting

    执行ansible-playbook时,遇到该错误: 经过检查发现是因为在Linux中 /etc/sudoers该文件必须是只读权限的才行,故我们需要修改其权限为440,到root账户下修改,直接ch ...

  3. 深度学习自学(十六):caffe-sphereface识别代码编译问题-caffe sudo make test报错

    一.caffe-sphereface编译错误 caffe sudo make test报错 sudo make runtest -j33 CXX src/caffe/test/test_benchma ...

  4. pycharm使用ssh连接服务器(ubuntu)跑代码报错:“sudo+ssh: ……bash: line 0: cd: xxx/code: No such file or directory”

    pycharm使用ssh连接服务器(ubuntu)跑代码报错:"sudo+ssh: --bash: line 0: cd: xxx/code: No such file or directo ...

  5. Ubuntu安装vmware-tools出现报错unable to copy the source file./installer/service.sh to the destination file

    一. Ubuntu安装vmware-tool失败,出现unable to copy the source file./installer/service.sh to the destination f ...

  6. 使用sudo apt-get update报错:E: 无法下载 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/dists/xenial/main/b

    使用sudo apt-get update报错: E: 无法下载 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/dists/xenial/main/ ...

  7. Temporary failure resolving——Ubuntu DNS未配置报错与解决

    Temporary failure resolving--Ubuntu DNS未配置报错与解决记录 环境信息: WSL Ubuntu 18.04 LTS 安装unzip命令所需的工具包 sudo ap ...

  8. Ubuntu用apt-get安装报错:E: Could not get lock /var/lib/dpkg/lock-frontend - open (11:资源暂时不可用)

    Ubuntu用apt-get安装报错:E: Could not get lock /var/lib/dpkg/lock-frontend - open (11:资源暂时不可用) 文章目录: 一.错误原 ...

  9. ubuntu 下安装 matplotlib 报错 numpy tornado pyparsing freetye png 依赖没有

    直接使用sudo easy_install matplotlib 报错 几个依赖关系不好找,分别是numpy tornado pyparsing freetye png sudo apt-get bu ...

  10. Parsing error: No Babel config file detected for xxx Either disable config file checking...报错解决方法

    Parsing error: No Babel config file detected for xxx Either disable config file checking-报错解决方法 使用Vu ...

最新文章

  1. Easyui 让Window弹出居中与最大化后居中
  2. MapReduce输入输出的处理流程及combiner
  3. bootstrap easyUI 的选型
  4. 序列化和反序列化的概念与延伸【详细解释 + 样例演示】
  5. php 通知数据库,如何通过php通知我的iPhone应用程序名称已添加到数据库?
  6. C# foreach遇到async和await
  7. 如何破解几乎所有的求职面试
  8. 矩池云上如何修改cudnn版本
  9. Exchange 2010 SP2 新功能
  10. oracle delete误删除表数据进行恢复
  11. CPU 的 ring0,ring1,ring2,ring3
  12. python交易是什么意思_Py交易是什么意思?Py交易是什么梗?
  13. 启锐 588 打印机每次打印都流出一部分,没有重新切换纸张
  14. Flink Table 和 DataStream 转换
  15. 第十三天 06-文本编辑器VI的使用修改网卡等
  16. 面向企业级的开源WebGIS解决方案--MapGuide(安装)
  17. 五星好评点亮效果(精灵图)
  18. c语言设计一个学生成绩管理系统,用C语言设计的学生成绩管理系统1.doc
  19. 基于深度学习的图像语义分析及其应用
  20. 硬件设计——有源/无源滤波

热门文章

  1. win10 1607 密匙
  2. C#获取中国免费的天气信息
  3. 测试环境的搭建和维护_软硬件测试环境
  4. Hadoop Failover
  5. STM32F407二维码识别(使用内部RAM+无FIFO摄像头OV7670
  6. 51Gif.net上的闪图制作工具
  7. freeswitch实战六(呼叫转移)
  8. 数据安全生命周期管理介绍(一)
  9. 配置Stratified-Transformer、Point-Transformer系列
  10. chrome常用扩展程序汇总(程序员版)