解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
转载地址:http://blog.csdn.net/sinat_36118270/article/details/62899093
Linux中普通用户用sudo执行命令时报”xxx is not in the sudoers file.This incident will be reported”错误,解决方法就是在/etc/sudoers文件里给该用户添加权限。如下:
1.切换到root用户下
方法为直接在命令行输入:su,然后输入密码(即你的登录密码,且密码默认不可见)。
2./etc/sudoers文件默认是只读的,对root来说也是,因此需先添加sudoers文件的写权限,命令是:
即执行操作:chmod u+w /etc/sudoers
3.编辑sudoers文件
即执行:vi /etc/sudoers
找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL (这里的xxx是你的用户名)
ps:这里说下你可以sudoers添加下面四行中任意一条
youuser ALL=(ALL) ALL
%youuser ALL=(ALL) ALL
youuser ALL=(ALL) NOPASSWD: ALL
%youuser ALL=(ALL) NOPASSWD: ALL
第一行:允许用户youuser执行sudo命令(需要输入密码).
第二行:允许用户组youuser里面的用户执行sudo命令(需要输入密码).
第三行:允许用户youuser执行sudo命令,并且在执行的时候不输入密码.
第四行:允许用户组youuser里面的用户执行sudo命令,并且在执行的时候不输入密码.
4.撤销sudoers文件写权限,命令:
chmod u-w /etc/sudoers
解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.相关推荐
- Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
Ubuntu下普通用户用sudo执行命令时报"xxx is not in the sudoers file.This incident will be reported"错误,解决 ...
- Linux ** is not in the sudoers file. This incident will be reported.
Linux 报错: ** is not in the sudoers file. This incident will be reported. 错误原因 顾名思义,该用户没有在 sudoers fi ...
- xxx is not in the sudoers file.This incident will be reported.的解决方法
xxx is not in the sudoers file.This incident will be reported.的解决方法 参考文章: (1)xxx is not in the sudoe ...
- linux把u盘只读文件,完美解决linux下U盘文件只读的问题
完美解决linux下U盘文件只读的问题 1. 在终端运行如下命令 tail -f /var/log/syslog 2. 插入有只读文件系统故障的U盘 3. 观察命令行输出 输出局部如下: Jul 8 ...
- centos挂载u盘只读_完美解决linux下U盘文件只读的问题
1. 在终端运行如下命令 tail -f /var/log/syslog 2. 插入有只读文件系统故障的U盘 3. 观察命令行输出 输出局部如下: Jul 8 16:44:50 cslouis-pc ...
- linux打开word乱码,解决linux下openoffice word文件转PDF中文乱码的问题
网上很多介绍是由于jdk中的没有字体导致乱码,而我遇到的是转换过程并未报错,但转换后的PDF中是乱码,尝试在jre/lib/fonts/中增加字体,还是不能解决问题,因此可以判断非jre字体问题,是l ...
- Hadoop之——Linux下sudo命令报错:hadoop is not in the sudoers file. This incident will be reported.
转载请注明出处:https://blog.csdn.net/l1028386804/article/details/93380235 当在终端执行sudo命令时,系统提示"cuser is ...
- linux下u盘目录带锁,完美解决linux下U盘文件只读的问题
1. 在终端运行如下命令 tail -f /var/log/syslog 2. 插入有只读文件系统故障的U盘 3. 观察命令行输出 输出局部如下: Jul 8 16:44:50 cslouis-pc ...
- Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决
Linux中新建用户用不了sudo命令问题:rootr is not in the sudoers file.This incident will be reported解决 参考:https://b ...
- 解决Linux下MySQL启动错误Starting MySQL.Manager of pid-file quit without updating file.[FAILED]...
刚装完MySQL,启动时报如下错误: Starting MySQL.Manager of pid-file quit without updating file.[FAILED] 解决Linux下My ...
最新文章
- 2021-08-27 思考:1000瓶药水,1瓶有毒,老鼠毒发24h,如何用最少的老鼠在24h内找出毒药?
- VTK:PolyData之LoopBooleanPolyDataFilter
- python与正则表达式(part5)--re模块使用
- 译 | 使用Roslyn分析器高效编写更好的代码
- java redis id生成器_基于redis的分布式ID生成器
- 英特尔多核联合实验室授牌仪式
- s3c2440第一个裸奔程序——跑马灯(转)
- sql server 监视_使用SQL Server Reporting Services进行快速,肮脏的服务器监视
- 游戏筑基开发之利用文件函数取出配置文件(ini文件)的数据实体(C语言)
- 开源转场库HYBControllerTransitions
- 程序猿代码面试指南 PDF
- .net 6 简单使用redis
- 豆丁 道客巴巴 千图网 千库网 包图网 我图网 摄图网 巧办网 万方设计 中国知网 VIP会员一个月开通方法,十网通用
- 网课题库收录API接口以及免费网课查询API接口
- C++程序设计:字符图形输出(空白三角形)
- 发票自动处理识别和分类
- 说说“安规”的那些事儿
- 46-动态编程语言(python)大作业-记忆翻牌游戏
- 祈求代码不出 Bug 该拜哪个“神仙”?
- 面试经验:腾讯微信事业群 - 微信总部机器学习岗面试