sudo 使用不了, the permissions on the /etc/sudoers file are changed to something other than 0440
sudo 使用不了,报错:
- the permissions on the /etc/sudoers file are changed to something other than 0440
how to fix it:
本次操作目的:
修复切换sudo 时报错: /etc/sudoers, 应该是0440 权限。
重启服务器后,
• 方法一:通过recover mode ,进入root shell
进入GNU GRUB 界面:
选择Advanced options for Ubuntu
选择recovery mode (如果没有 recovery mode,则看 通过GRUB 编辑模式,进入root shell)
选择 root : drop root shell prompt
然后进入提示 root:~#
运行: cd /var/log
运行: touch a
是否提示 read only file system
是则 运行: mount -o rw,remount /
运行: ls -l /etc/sudoers 。
请反馈权限是否: -r---r-------
运行:chmod 0440 /etc/sudoers
运行:reboot或则alt+ctrl+del
重启系统即可。
• 方法二:通过GRUB 编辑模式,进入root shell
首先,进入系统,会显示这个界面
如果没有显示这个界面,请在机器启动后,系统启动时,不停按esc键,调出此grub菜单
光标选中第一个选项,即第一个系统,按e键进入编辑模式。
按下e键,出现下图:
光标下移,找到这个选项 linux /boot/vmlinuz-3``````` ro quiet spash $vt_handoff
如下图:
内容大同小异,主要找到含有“linux /boot/vmlinuz-”这一行代码,在代码后面空一格,加入如下代码:
rw init=/bin/bash
添加完如下图所示:
添加完后,按住ctrl+x或者f10进入系统(见屏幕下方提示),此时将进入如下界面:
成功后如下图所示:运行:chmod 0440 /etc/sudoers
此时,运行:reboot或则alt+ctrl+del
重启系统即可。
错误情况:进入上图命令行界面后,可能出现键盘无法输入的问题,如出现此种情况,请换圆口接口(ps/2)的键盘。
sudo 使用不了, the permissions on the /etc/sudoers file are changed to something other than 0440的更多相关文章
- Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决
参考:https://blog.csdn.net/lichangzai/article/details/39501025 如果执行sudo命令的用户没有执行sudo的权限,执行sudo命令时会报下面的 ...
- 解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
本文转自Linux社区作者为z-sm的文章 原文链接http://www.linuxidc.com/Linux/2016-07/133066.htm 之前一直使用的是ubuntu,后来安装了Cento ...
- Linux sudo 错误:XXX is not in the sudoers file 解决办法
最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...
- sudo 提示 'xxx is not in the sudoers file.This incident will be reported.的解决方法'
在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not ...
- chmod: changing permissions of ‘/etc/fstab': Read-only file system
给passwd文件加权限,修改/etc/fstab目录下所有的文件夹属性为可写可读可执行,执行以下命令:chomd 777 /etc/fstab 的时候提示错误: chmod: changing pe ...
- 当执行sudo时提示“is not in the sudoers file”的解决方案:
出现这种提示是由于普通用户帐号没有权限执行sudo命令,所以需要切换到root身份进行颁发权限: $su -(注意有- ,这和su是不同的,在用命令"su"的时候只是切换到root ...
- xxx is not in the sudoers file.This incident will be reported.的解决方法 (一般用户不能执行sudo)
1.切换到root用户下 2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers 3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL=(AL ...
- Linux使用sudo提权时,出现xx 不在 sudoers 文件中。此事将被报告。visudo 命令简单介绍。
在使用 sudo 临时提权时,出现:不在 sudoers 文件中.此事将被报告. 可以使用 visudo命令 来配置/etc/sudoers文件,将目标用户赋予使用sudo命令的能力. visudo命 ...
- UBuntu sudo 命令 :xxx is not in the sudoers file. This incident will be reported.
[1]分析问题 提示内容翻译成中文即:用户XXX(一般是新添加的用户名称)没有权限使用sudo. 解决方法修改新用户的权限,具体操作即修改一下/etc/sudoers文件. [2]切换至root用户模 ...
随机推荐
- Asp.Net Web API 2第十二课——Media Formatters媒体格式化器
前言 阅读本文之前,您也可以到Asp.Net Web API 2 系列导航进行查看 http://www.cnblogs.com/aehyok/p/3446289.html 本教程演示如何在ASP.N ...
- Android---组件篇---Handler的使用(1)[转]
在android中,有很多功能是不能放在onCreate或者onStart方法里面,因为这些功能相对 来说费时比较长,比如说下载一个文件,下载的过程比较长,但是如果写在Activity中, 那么这段时 ...
- Lingo 做线性规划 - Revenue Management
Reference: <An Introduction to Management Science Quantitative Approaches to Decision Making, Rev ...
- Django站点管理--ModelAdmin
class AuthorAdmin(admin.ModelAdmin): list_display=('name', 'age', 'sex') #指定要显示的字段 search_fields=('n ...
- clientHeight,offsetHeight与scrollHeight的相关知识
在html里,width与height是最常用也是最基础的两个属性,因此,在js里,我们也经常需要操作这两个属性.js关于这两个属性提供了client*,offset*与scroll*,很多同学搞不清 ...
- apache 虚拟主机的配置
一.基于IP 1. 假设服务器有个IP地址为192.168.1.10,使用ifconfig在同一个网络接口eth0上绑定3个IP: [root@localhost root]# ifconfig et ...
- [转]HTTP协议及其请求头分析
众所周知,Internet的基本协议是TCP/IP协议,目前广泛采用的FTP.Archie Gopher等是建立在TCP/IP协议之上的应用层协议,不同的协议对应着不同的应用. WWW服务器使用 ...
- celery与mangodb搭配应用
写作背景介绍 在celery简单应用中已经介绍了如何去配置一个celery应用,也知道怎么分离任务逻辑代码与客户端代码了.我们现在的任务是怎么把计算结果保存到数据库中,这种数据持久化是非常重要的.你一 ...
- paip.刮刮卡砸金蛋抽奖概率算法跟核心流程.
paip.刮刮卡砸金蛋抽奖概率算法跟核心流程. #---抽奖算法需要满足的需求如下: 1 #---抽奖核心流程 1 #---问题???更好的算法 2 #---实际使用的扩展抽奖算法(带奖品送完判断和每 ...
- python web框架——扩展Django&tornado
一 Django自定义分页 目的:自定义分页功能,并把它写成模块(注意其中涉及到的python基础知识) models.py文件 # Create your models here. class Us ...