Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
来源:互联网 发布:域名购买哪家网站靠谱 编辑:程序博客网 时间:2024/05/19 21:18
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
0 0
- Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- Linux报“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报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- linux报"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的解决方法
- xxx is not in the sudoers file. This incident will be reported的解决方法
- xxx is not in the sudoers file. This incident will be reported的解决方法
- xxx is not in the sudoers file. This incident will be reported的解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx(wsh) is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- 超详细的activity启动模式讲解
- Ag中的ng-class的用法
- bzoj 4516: [Sdoi2016]生成魔咒 (后缀自动机)
- UITableViewCell 的backgroundColor不起作用的问题?
- maven-core:jar:2.0.8, org.apache.maven:maven-error-diagnostics:jar:2.0.8: Failure to find org.apache
- Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- 10.5 Swift类方法
- C语言实现二叉排序树的增删查操作
- 使用Freeline提高你的工作效率
- 10.6 Swift中subscripts基本语法
- excel生成首写字母
- JavaScript对象声明
- MT6580 使用外部PA出现无声、音量小或者无法调增益
- 配置NTP时间服务器