解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
来源:互联网 发布:怎么申请淘宝旗舰店 编辑:程序博客网 时间:2024/06/06 11:42
转载地址:http://blog.csdn.net/sinat_36118270/article/details/62899093
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
- 解决linux下sudo更改文件权限报错xxxis 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时,报错 is not in the sudoers file. This incident will be reported 解决
- 解决用户执行sudo 报错:xxx is not in the sudoers file. This incident will be reported
- Fedora提示 xxxis not in the sudoers file.this incident will be reported解决办法
- Fedora提示 xxxis not in the sudoers file.this incident will be reported解决办法
- CentOS6.8 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.的解决方法
- 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” 错误解决方法
- linux报"xxx is not in the sudoers file.This incident will be reported"错误
- linux 下hadoop is not in the sudoers file. This incident will be reported.
- 普通用户开通sudo权限:xxx is not in the sudoers file.This incident will be reported.的解决方法
- 普通用户执行sudo报hadoop is not in the sudoers file. This incident will be reported.解决方法
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- 使用用sudo时提示"### is not in the sudoers file. This incident will be reported.
- sudo提示“is not in the sudoers file. This incident will be reported”解决方法
- sudo 提示oracle is not in the sudoers file. This incident will be reported的解决方法
- 会议记录管理系统(6)
- Poj-1042-Gone Fishing-枚举+贪心
- 雇员管理系统-SSH版(八)
- Longest Substring Without Repeating Characters
- centos配置hostname
- 解决linux下sudo更改文件权限报错xxxis not in the sudoers file. This incident will be reported.
- 蓝桥杯 算法训练 区间k大数查询
- [Leetcode] 561. Array Partition I 解题报告
- rhinoceros Mac(犀牛mac) v5.4中文破解版
- 闭包与匿名函数
- 关于操作系统
- POJ
- 雇员管理系统-SSH版(十)
- C++ 指针