新装的 CentOS 需要安装许多软件,但是如果一开始你不是以 root 登入的话,就需要使用 sudo 进行切换,但是通常会报错如下图:

解决方法:

先用 root 用户登入系统,

打开文件

vi /etc/sudoers

将用户名称添加到文件中
user_name ALL=(ALL)  ALL
 
 

CentOS7 'Username' is not in the sudoers file. This incident will be reported的更多相关文章

  1. Username is not in the sudoers file. This incident will be reported

    type sudo adduser <username> sudo where username is the name of the user you want to add in th ...

  2. Linux中添加管理员权限问题:xxx is not in the sudoers file. This incident will be reported.

    在各个不同版本的linux中添加拥有管理员权限账户有不同的简便方式. 问题: 今天遇见将新添用户添加到root用户组后,运行sudo仍然提示 ”xxx is not in the sudoers fi ...

  3. sudo 提示 'xxx is not in the sudoers file.This incident will be reported.的解决方法'

    在使用 Linux 的过程中,有时候需要临时获取 root 权限来执行命令时,一般通过在命令前添加 sudo 来解决. 但是第一次使用 sudo 时,有可能会得到这样一个错误提示 xxx is not ...

  4. centos添加和删除用户及 xxx is not in the sudoers file.This incident will be reported.的解决方法

    修改主机名:vim /etc/sysconfig/network 1.添加用户,首先用adduser命令添加一个普通用户,命令如下: #adduser tommy //添加一个名为tommy的用户 # ...

  5. XXX 用户 is not in the sudoers file. This incident will be reported 的问题解决方案

    说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@SparkSingleNode ...

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

    假设你用的是Red Hat系列(包括Fedora和CentOS)的Linux系统.当你执行sudo命令时可能会提示“某某用户 is not in the sudoers file.  This inc ...

  7. sunzl is not in the sudoers file.This incident will be reported

    Description: [sunzl@localhost nuc900bsp$] ./install.sh sorry!you are not the root !! [sunzl@localhos ...

  8. Linux遇到的问题(一)Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法

    提示错误信息 www@iZ236j3sofdZ:~$ ifconfig Command 'ifconfig' is available in '/sbin/ifconfig' The command ...

  9. XXX is not in the sudoers file. This incident will be reported 的问题解决方案

    不多说,直接上干货! 说的是,这种问题,是出现在ubuntu系统里. root@SparkSingleNode:/usr/local/jdk# pwd /usr/local/jdk root@Spar ...

随机推荐

  1. Neo4j-3.0.3 (Debian 8)

    平台: Ubuntu 类型: 虚拟机镜像 软件包: neo4j-3.0.3 basic software database graph database infrastructure neo4j op ...

  2. TFS看板规则

    就绪板列 准入条件 需求已完成交付 需求交付过程中的问题已全部解决 当前迭代需求所产生的BUG必须放入该列 之前迭代遗留的BUG 工作内容 需求实现概要设计 BUG确认 任务拆分 任务工作量估算(单位 ...

  3. IOS CALayer基本使用 (图层)

    ● 其实UIView之所以能显示在屏幕上,完全是因为它内部的一个图层(CALayer) ● 在创建UIView对象时,UIView内部会自动创建一个图层(即CALayer对象),通过UIView 的l ...

  4. Dynamic typing 动态类型

    https://developer.apple.com/library/content/documentation/General/Conceptual/DevPedia-CocoaCore/Dyna ...

  5. web跨域及cookie相关知识总结

    原文:web跨域及cookie相关知识总结   之前对于跨域相关的知识一致都很零碎,正好现在的代码中用到了跨域相关的,现在来对这些知识做一个汇总整理,方便自己查看,说不定也可能对你有所帮助. 本篇主要 ...

  6. C#继承机制 多级继承

    一些面向对象语言允许一个类从多个基类中继承,而另一些面向对象语言只允许从一个类继承,但可以随意从几个接口或纯抽象类中继承. 只有C++支持多级继承,许多程序员对此褒贬不一.多级继承常会引起继承来的类之 ...

  7. HDU 2045 LELE的RPG难题

    递推 枚举起点状态 #include <algorithm> #include <iostream> #include <cstring> #include < ...

  8. mysql运维-二进制日志BINARY LOG清理

       1.1 方法1:PURGE MASTER LOGS     语法: PURGE { BINARY | MASTER } LOGS { TO 'log_name' | BEFORE datetim ...

  9. XPATH如何选择,t选取,包含某一属性的节点, 不包含某一个属性的节点?

    https://blog.csdn.net/manmanpa/article/details/56282741 //tbody/tr[@class] 包含 //tbody/tr[not(@class) ...

  10. shell脚本:变量,文件判断,逻辑运算等纪要

    shell脚本中的变量定义,引用各有不同的方式,除此之外,很常用的有文件属性判断,逻辑运算,数值运算等,下面记录一下它们的属性作用 变量 shell变量的定义分为两种:一种是直接赋值定义,另一种是嵌套 ...