用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中XXX是你的用户名,也就是你的用户名没有权限使用sudo,我们只要修改一下/etc/sudoers文件就行了。

下面是修改方法:
1)进入超级用户模式。也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式。(当然,你也可以直接用root用)
2)添加文件的写权限。也就是输入命令"chmod u+w /etc/sudoers"。
3)
编辑/etc/sudoers文件。也就是输入命令"vim /etc/sudoers",输入"i"进入编辑模式,找到这一 行:"root
ALL=(ALL) ALL"在起下面添加"Crytoll ALL=(ALL) ALL"(这里的Crytoll是你的用户名),然后保存(就是先按一
下Esc键,然后输入":wq")退出。
4)撤销文件的写权限。也就是输入命令"chmod u-w /etc/sudoers"。

is not in the sudoers file解决方法的更多相关文章

  1. Linux下is not in the sudoers file解决方法

    最近在学习linux,在某个用户(xxx)下使用sudo的时候,提示以下错误:xxx is not in the sudoers file. This incident will be reporte ...

  2. Linux中“is not in the sudoers file”解决方法

    当在终端执行sudo命令时,系统提示"hadoop is not in the sudoers file": 其实就是没有权限进行sudo,解决方法如下(这里假设用户名是cuser ...

  3. 关于Ubuntu下is not in the sudoers file解决方法

    当我在postgres用户下去执行sudo vim demo.sql需要用管理员权限运行时,并且输入本用户的密码,但是输入之后提示如下: postgers is not in the sudoers ...

  4. [RedHat]“is not in the sudoers file”解决方法

    当在终端执行sudo命令时,系统提示“luckchengis not in the sudoers file”: $ sudo ls Password: luckcheng is not in the ...

  5. 用户不在sudoers文件中怎么办,ziheng is not in the sudoers file解决方法

    sudo是linux系统中,用来执行需要权限命令,但是一些朋友使用sudo时,出现下面的错误“ziheng is not in the sudoers file. This incident will ...

  6. [转]Linux下is not in the sudoers file解决方法

    来源: http://jingyan.baidu.com/article/2a1383284bb3e8074a134f2d.html 当我们使用sudo命令切换用户的时候可能会遇到提示以下错误:xxx ...

  7. Ubuntu技巧之 is not in the sudoers file解决方法

    转自:http://www.linuxidc.com/Linux/2010-12/30386.htm 1)进入到root用户下. 2)添加文件的写权限.也就是输入命令"chmod u+w / ...

  8. vss error reading from file 解决方法

    vss error reading from file 解决方法 1 若服务器中存在 vss/data/backup目录,请将该目录删掉2 运行cmd cd.. cd C:\Program Files ...

  9. centos vsftpd 553 Could not create file解决方法

    centos vsftpd 553 Could not create file解决方法   问题由于selinux引起的,问题解决办法:   www.2cto.com   输入:getsebool - ...

随机推荐

  1. 深入理解JVM(7)——类加载器

    一.类和类加载器 a)        类加载器的作用:将class文件加载到JVM的方法区,并且在方法区中创建一个java.lang.Class对象作为外界访问这个类的接口. b)        类和 ...

  2. 使用iscroll,无法正常滑动的原因

    iscroll的dom元素的结构是固定的,swiper是容器,scroll是需要滚动的容器,list是滚动的内容 <div class="swiper"> <di ...

  3. PLC300寻址指令

    1.寻址图解 2.直接寻址 直接寻址包括两大类,绝对地址寻址和符号地址寻址 绝对地址:由一个标识符和存储器位置组成. 例如:I 0.0 Q 1.7 PIW 256 PQW 512 MD 20 T 15 ...

  4. 【枚举】珠心算测验[c++]

    题目描述 珠心算是一种通过在脑中模拟算盘变化来完成快速运算的一种计算技术.珠心算训练,既能够开发智力,又能够为日常生活带来很多便利,因而在很多学校得到普及. 某学校的珠心算老师采用一种快速考察珠心算加 ...

  5. HTML5 学习08——Input 类型、表单元素及属性

    注意:并不是所有的主流浏览器都支持新的input类型,不过您已经可以在所有主流的浏览器中使用它们了.即使不被支持,仍然可以显示为常规的文本域. (1)Input 类型: color color 类型: ...

  6. ASP.NET Core 发布

    ASP.NET Core 发布,asp.netcore发布 第一步:运行 dotnet restore 命令,以还原项目中指定的依赖项 dotnet restore 第二步:使用 dotnet bui ...

  7. fastjson序列化乱序问题

    1.初始化为有序json对象 JSONObject jsonOrdered= new JSONObject(true); 2.将String对象转换过程中,不要调整顺序 JSONObject json ...

  8. C# Winform使用Windows Media Player播放多媒体整理

    一.简单使用示例步骤 1.添加Windows Media Player 组件当前是系统的 Com组件 工具箱>右键“选择项”>选择Com组件 2.控件拖拽到桌面,使用 private vo ...

  9. shell字符串的用法

    shell字符串的用法 注意:shell4.2和shell4.1会有差别,较低版本的shell可能不支持某些功能 获取字符串长度:${#string} 获取子串: 注:(左边的第一个字符是用 0 表示 ...

  10. 打开KVM Console的一些注意事项

    今天早上跟思科CIMC里的KVM console较劲了很久,终于成功的打开了KVM console. 总结了下面的一些注意事项.如果你也遇到了KVM console打不开,那么可以尝试一下. 我不想花 ...