centos/Linux 解决使用sudo命令时xxx is not in the sudoers file.This incident will be reported
解决方法
切换到root用户:
su
然后在root用户下输入命令:
chmod u+w /etc/sudoers
vim /etc/sudoers
在vim
编辑器界面输入/root
查询到这一行:
root ALL=(ALL) ALL
在这一行的下面输入:
你的用户名 ALL=(ALL) ALL
保存后退出,再恢复掉文件不可写的权限:
chmod u-w /etc/sudoers
exit
然后就可以使用sudo
了
问题解析
报错原因是:当前用户没有使用sudo的权限
解决方法就是:让当前用户有使用sudo的权限,在写入时:
用户名 ALL=(ALL) ALL # 允许用户执行sudo
%用户名 ALL=(ALL) ALL # 允许用户组执行sudo
用户名 ALL=(ALL) NOPASSWD: ALL # 允许用户不用密码执行sudo
%用户名 ALL=(ALL) NOPASSWD: ALL # 允许用户组不用密码执行sudo
centos/Linux 解决使用sudo命令时xxx is not in the sudoers file.This incident will be reported相关推荐
- 【sudo错误】xxx is not in the sudoers file.This incident will be reported解决
文章目录 1.问题 2.分析 3.解决方法 3.1 手动修改 3.2 命令方式修改--sudo visudo 4.扩展说明 1.问题 xxx is not in the sudoers file.Th ...
- 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"错误,解决 ...
- xxx is not in the sudoers file.This incident will be reported错误
普通用户用sudo执行命令时报"xxx is not in the sudoers file.This incident will be reported"错误,解决方法就是在/e ...
- 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 ...
- xxx is not in the sudoers file. This incident will be reported.解決方法
我们通常都是以普通用户登录linux, 在执行sudo时候会遇到 xxx is not in the sudoers file. This incident will be reported. 解决 ...
- xxx is not in the sudoers file. This incident will be reported.
sudo,用其他用户的身份执行命令. 运行该命令时,系统首先检查/etc/sudoers,判断该用户是否有执行sudo的权限,在确定有执行权限后,要求输入自己的密码(当前用户),如果密码正确,会以ro ...
- xxx is not in the sudoers file. This incident will be reported
问题描述: 新建用户执行命令sudo chmod 700 ,提示输入root命令. 输入三次错误. 提示 yourid is not in the sudoers file. This inciden ...
- CentOS下添加Root权限用户‘超级用户’方法(xxx is not in the sudoers file.This incident will be reported.的解决方法)
文章目录 1.添加普通用户 2.添加sudo文件的写权限 3.编辑sudoers文件 4.撤销sudoers文件写权限 1.添加普通用户 [root@server ~]# useradd fxd // ...
- 【转载】xxx is not in the sudoers file.This incident will be reported.的解决方法
1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去. 2.添加sudo文件的写权限,命令是: chmod u+w /etc/sudoers 3.编辑sudoers文件 vi /etc/s ...
最新文章
- 韩信点兵-中国剩余定理(练习)
- C++之static关键字
- springmvc+spring+hibernate集成cxf
- 【译】在您的应用中安全使用Android的篡改检测 (Using Android's tamper detection securely in your app)
- ExtJS入门(01)部署介绍
- 数码相机控制点的自动定位检校
- duilib入门简明教程 -- 部分bug (11) (转)
- js保存当前html,JavaScript保存当前页面
- Java 多线程 —— wait 与 notify
- FPGA系统设计考虑因素
- Perl程序设计中常用的函数
- K3打印单据,提示:等待C盘释放空间,内存不足
- Eclipse中的Git使用之Branch创建,Merge
- 在etherscan上传合约源码
- 吉米多维奇习题集题集loading---
- 阿克曼函数的c语言,C语言,关于阿克曼函数非递归实现的一点拙见
- 腾讯社交广告大赛 —— 特征与模型介绍
- 同期收治患者住院天数_合理用药监测指标
- ztree在vue中的使用 使用封装好的vue-giant-tree
- 山东省农商行计算机真题,2018山东农商行招聘考试题库:计算机试题三
热门文章
- epoll示例程序——服务端
- linux c当程序接受来自按键q或q后退出程序_Linux 命令行 整理(四)
- python turtle画动物_如何用python画简单的动物
- Windows 7中的远程桌面增强(Graphics Remoting, Remote Desktop)
- 5个让人赞不绝口的微信小程序,拒绝占用手机内存!
- Apple发布watchOS 5 Beta 9
- C语言cJSON库的使用,解析json数据格式
- Yii 2 —— Backend自动出现登录页
- clock_gettime参数中不同clock ID含义的差别
- HDU ACM 1224 Free DIY Tour (SPFA)