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

$ sudo ls
Password:
luckcheng is not in the sudoers file. This incident will be reported.

其实就是没有权限进行sudo,解决方法如下(这里假设用户名是luckcheng):

1.切换到超级用户:$ su 
2.打开/etc/sudoers文件:$vi /etc/sudoers
.修改文件内容: 找到“root ALL=(ALL) ALL”一行,在下面插入新的一行,
内容是“luckcheng ALL=(ALL) ALL”,然后在vi键入命令“wq!”保存并退出。

注:这个文件是只读的,不加“!”保存会失败。

.退出超级用户:$ exit
.可以尽情使用sudo了。

[RedHat]“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. 用户不在sudoers文件中怎么办,ziheng is not in the sudoers file解决方法

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

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

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

  6. is not in the sudoers file解决方法

    用sudo时提示"xxx is not in the sudoers file. This incident will be reported.其中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. densenet思路 以及和残差网络区别,pytorch实现

    densenet思路 以及和残差网络区别,pytorch实现 待办 densenet思路以及和残差网络区别.以及densenet的pytorch实现 https://zhuanlan.zhihu.co ...

  2. AI 数学基础 : 熵

    什么是熵(entropy)? 1.1 熵的引入 事实上,熵的英文原文为entropy,最初由德国物理学家鲁道夫·克劳修斯提出,其表达式为: 它表示一个系系统在不受外部干扰时,其内部最稳定的状态.后来一 ...

  3. PP: Taking the human out of the loop: A review of bayesian optimization

    Problem: Design problem parameters consist of the search space of your model. Scientists design expe ...

  4. 小白的java学习之路 "类的无参方法"

    Java注释: //:单行注释 /**/:多行注释 /** */:JavaDoc注释语法: 访问修饰符 返回值类型 方法名(){ 方法体 } 举例: public void run(){ System ...

  5. javascripts的this

    前言 javascript 的 this 指向主要是依赖上下文对象决定,箭头函数例外. 默认绑定 在全局作用域下调用函数,函数的this默认指向window. 注意1:严格模式下,默认指向undefi ...

  6. python qrcode二维码生成与识别

    二维码 二维码生成 1.用法 https://github.com/lincolnloop/python-qrcode 2.使用 简单实用 import qrcode # 二维码内容 data = & ...

  7. 【巨杉数据库SequoiaDB】SequoiaDB 巨杉数据库 v3.4 版本正式发布

    深秋时节,SequoiaDB 巨杉数据库在深秋给大家带来了“一把火”.SequoiaDB v3.4 正式发布啦! 分布式交易场景性能大幅提升 SequoiaDB 巨杉数据库3.4版本正式发布,v3.4 ...

  8. 0002 Django工程创建

    1 创建一个目录,用于专门存放Django工程的虚拟环境 PyCharm默认虚拟环境在工程内,从而导致打包的时候,会把虚拟环境一起打包. 同时,虚拟环境中的插件较多,一个工程创建了一个虚拟环境,以后, ...

  9. usim卡介绍

  10. Codeforce 474A - Keyboard

    Our good friend Mole is trying to code a big message. He is typing on an unusual keyboard with chara ...