解决: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”错误,解决方法就是在/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
解决:xxx is not in the sudoers file.This incident will be reported.的解决方法的更多相关文章
- centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法
修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...
- Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
提示错误信息 www@iZ236j3sofdZ:~$ ifconfig Command 'ifconfig' is available in '/sbin/ifconfig' The command ...
- sudo 提示 'xxx is not in the sudoers file.This incident will be reported.的解决方法'
在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not ...
- 企业运维案例:xxx is not in the sudoers file.This incident will be reported” 错误解决方法
CentOS6系统下,普通用户使用sudo执行命令时报错: xxx is 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执行命令时报如题所示错误,解决方法就是在/etc/sudoers文件里给该用户添加权限.如下: 1.切换到root用户下 2./etc/sudoers文件默认是只读的, ...
- 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 ...
- 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/sud ...
- xxx is not in the sudoers file. This incident will be reported的解决方法
1>.进入超级用户模式.也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式.(当然,你也可以直接用root用户登录,因为红旗安装过后默认的登录 ...
- 普通用户开通sudo权限: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 ...
随机推荐
- 关于ISIS协议 CSNP报文的周期更新理解
为何ISIS协议的CSNP报文在MA网络环境中是以周期更新然而在P2P网络环境中只更新一次? 个人通过视频及资料学习理解: 我们知道ISIS的CSNP报文类似OSPF中的DBD报文,作用就是用来确认彼 ...
- Java 中 break和 continue 的使用方法及区别
break break可用于循环和switch...case...语句中. 用于switch...case中: 执行完满足case条件的内容内后结束switch,不执行下面的语句. eg: publi ...
- Import CAD geometry in BladeModeler, turbogrid
Table of Contents 1. Import CAD geometry in BladeModeler, turbogrid 1 Import CAD geometry in BladeMo ...
- saltstack(四) saltstack的targeting、分组
targeting支持如下matcher: Globing : '*', 正则: 指定-E参数,正则表达式匹配多个 List: 指定-L参数,salt -E 'web1-(prod|devel)' t ...
- go 语言学习指南(一)
参考资料: http://www.runoob.com/go/go-tutorial.html
- openstack windows2012r2 glance镜像制作
镜像实现: 密码注入 修改密码 根分区扩展 1.下载windows iso镜像 下载地址:http://imsdn.com/MSDN-1.html 例如:cn_windows_server_2012_ ...
- HDU 1274 递归拼接字符串
题目大意: 根据所给的数字,表示其相连的字符的输出个数,或是下一个括号中的所有字符的输出个数 每一个相互对应的 '(' 和 ')' 中的所有字母均作为一组数据处理 在每一次dfs过程中都处理好这样一个 ...
- [K/3Cloud]屏蔽页签的关闭按钮
如图,屏蔽企业门户的X关闭按钮. this.View.GetControl<TabControl>("FMainTab").SetItemCloseable(1, fa ...
- A+B Problem IV
描述acmj最近发现在使用计算器计算高精度的大数加法时很不方便,于是他想着能不能写个程序把这个问题给解决了. 输入 包含多组测试数据每组数据包含两个正数A,B(可能为小数且位数不大于400) 输出 ...
- HDU1530(最大团)
Given a graph G(V, E), a clique is a sub-graph g(v, e), so that for all vertex pairs v1, v2 in v, th ...