xxx is not in the sudoers file.This incident will be reported.的解决方法
来源:互联网 发布:数学英文词典软件 编辑:程序博客网 时间:2024/05/14 05:41
通常我们在Linux中自己通过指令新创建的用户,如果没有分配用户组的话,就没有办法使用sudo命令,这样在操作的过程中会有很多的不便。
2.添加sudo文件的写权限,命令是:
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
这样普通用户就可以使用sudo了.
并且会报错
huqp is not in the sudoers file. This incident will be reported.
解决办法如下:
1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去.
2.添加sudo文件的写权限,命令是:
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
这样普通用户就可以使用sudo了.
阅读全文
0 0
- 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.的解决方法
- 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.的解决方法
- 《算法》第四版中文——学习资料
- 如何通过反射访问私有变量和私有方法
- 设计模式(八)abstruct factory
- nutz
- iOS
- xxx is not in the sudoers file.This incident will be reported.的解决方法
- HTTP协议详解(真的真的很经典)
- 51Nod-1678-lyk与gcd
- android QMI机制---QCRIL消息发送
- js点击缩略图,整屏居中放大图片
- 【异常】-ubuntu常见错误--Could not get lock /var/lib/dpkg/lock解决
- Linux下安装和配置SVN详细笔记
- 如何理解继承成员变量和方法的区别?
- dubbo扩展点