xxx is not in the sudoers file.This incident will be reported.的解决方法

简介: 本文转自: http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html1.切换到root用户下,怎么切换就不用说了吧,2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers3.

本文转自: http://www.cnblogs.com/zox2011/archive/2013/05/28/3103824.html

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了.

 

相关文章
|
5月前
|
Linux 开发工具 数据安全/隐私保护
CentOS7报错:“xxx is not in the sudoers file. This incident will be reported“解决方法
CentOS7报错:“xxx is not in the sudoers file. This incident will be reported“解决方法
547 0
|
数据安全/隐私保护
Linux_服务器_03_xxx is not in the sudoers file.This incident will be reported.的解决方法
1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去.2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL=(ALL) ALL,在他下面添加xxx ALL=(ALL) ALL ...
963 0
|
8月前
|
Ubuntu Unix Linux
Linux 用户使用sudo时 显示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.的解决方法
471 1
CDLinux su: must be suid to work properly错误
系统内核版本:cat /proc/version Linux version 2.6.33-cdl (root@Phenom) (gcc version 3.4.6) #1 SMP PREEMPT Fri Apr 2 01:04:03 EDT 2010 文件系统:127 15:50$ busyboxBusyBox v1.
1750 0
jun.li is not in the sudoers file. This incident will be reported
jun.li is not in the sudoers file. This incident will be reported
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
551 0
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。

热门文章

最新文章