linux学习之xxx is not in the sudoers file.This incident will be reported问题
2017-10-26 23:00
741 查看
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是你的用户名)
4.撤销sudoers文件写权限,命令:
chmod u-w /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是你的用户名)
4.撤销sudoers文件写权限,命令:
chmod u-w /etc/sudoers
相关文章推荐
- 【Linux学习】Linux报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法
- Linux_服务器_03_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更改文件权限报错xxxis 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 (解决办法)
- 解决xx 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.的解决方法
- 用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.的解决方法
- linux *** is not in the sudoers file. This incident will be reported.
- 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
- 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
- 【QA4】【sudoers问题解决】(*** is not in the sudoers file.This incident will be reported)
- XXX is not in the sudoers file. This incident will be reported.