前言

linux 报错:xxx is not in the sudoers file. This incident will be reported.

这意味着用户 xxx 没有在 sudoers 文件中被授权使用 sudo 命令。

解决

su 切换到 root 用户,报错:su: Authentication failure

使用 su - root 命令,切换登录 root 用户成功。

  1. su

    • 默认情况下,su命令不带任何参数时,会切换到root用户,但不改变用户的环境变量。这意味着你将保留当前用户的工作环境,包括路径、环境变量等。
    • 如果指定了用户名,su将切换到指定的用户,而不是root。
  2. su -

    • su -命令会切换到root用户,并加载root用户的完整环境设置。这通常意味着它会读取root用户的shell配置文件(如.bashrc.zshrc),并设置环境变量等,以提供一个完整的root用户环境。
    • 这通常用于需要root权限进行复杂操作时,确保你拥有所有必要的环境设置。

su是快速切换到root用户的方式,而su -则是更彻底地切换到root用户,包括加载其环境配置。在需要执行系统级配置或安装软件时,通常推荐使用su -来确保你拥有完整的root环境。

还有一种方法修改root密码: sudo passwd root,成功之后再 su 输入密码就可以切换到 root 了

linux xxx is not in the sudoers file. This incident will be reported.的更多相关文章

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

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

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

  3. 解决: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”错误,解决方法就是在/etc/s ...

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

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

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

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

  6. 企业运维案例:xxx is not in the sudoers file.This incident will be reported” 错误解决方法

    CentOS6系统下,普通用户使用sudo执行命令时报错: xxx is not in the sudoers file.This incident will be reported" 解决 ...

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

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

  8. xxx is not in the sudoers file.This incident will be reported.的解决方法 (一般用户不能执行sudo)

    1.切换到root用户下 2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers 3.编辑sudoers文件vi /etc/sudoers找到这行 root ALL=(AL ...

  9. Ubuntu——"xxx is not in the sudoers file.This incident will be reported" 错误解决方法

    Ubuntu下普通用户用sudo执行命令时报如题所示错误,解决方法就是在/etc/sudoers文件里给该用户添加权限.如下: 1.切换到root用户下 2./etc/sudoers文件默认是只读的, ...

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

    1.切换到root用户下,怎么切换就不用说了吧,不会的自己百度去. 2.添加sudo文件的写权限,命令是:chmod u+w /etc/sudoers 3.编辑sudoers文件vi /etc/sud ...

随机推荐

  1. 关于TB交易开拓者的KDJ指标与经典KDJ指标计算方法不同的分析

    我之前在群里咨询的问题, TB官方的技术大佬,给出详细的分析 原链接:https://www.kdocs.cn/l/cgF3sA7ypa99 在这,我只复制最核心的内容,如果需要深入研究, 请联系我, ...

  2. Qt编写可视化大屏电子看板系统26-模块4模具进度

    一.前言 模具进度主要用来展示不同的模具类别加工进度,表格的形式展示,显示内容包括模具编号.版本号.类型.状态.产品名称.计划交期.当前进度,其中进度条采用自定义控件三态进度条,有三种状态显示进度:右 ...

  3. Qt编写地图综合应用25-echart动态交互

    一.前言 之前用echart组件做过各种效果,随着各种现场应用现场项目的增多,各种需求也都慢慢增加起来,为了满足各种不同类型的需求,近期又抽空重新整理和封装了echart类,主要就是增加了不少的js函 ...

  4. 报错test_features2d.cpp:51:10: fatal error: features2d/test/test_detectors_regression.impl.hpp: 没有那个文件

    问题描述: ubuntu18.04安装opencv4.5.1+contrib 报错test_features2d.cpp:51:10: fatal error: features2d/test/tes ...

  5. SSM或Spring Boor开发中@Repository和@Mapper的区别

    在做一个SpringBoot项目的时候在Dao层使用了@Repository注解然后报了这个错: Description: Field userService in com.example.demo. ...

  6. 《jQueryEasyUI从零开始学》-施尧2018一书的配套源代码和学习资源

    <jQueryEasyUI从零开始学>-施尧2018一书的配套源代码和学习资源:下载地址 提取码:uuly

  7. 阿里IM技术分享(六):闲鱼亿级IM消息系统的离线推送到达率优化

    本文由阿里闲鱼技术团队逸昂分享,原题"消息链路优化之弱感知链路优化",有修订和改动,感谢作者的分享. 1.引言 闲鱼的IM消息系统作为买家与卖家的沟通工具,增进理解.促进信任,对闲 ...

  8. Django_使用汇总(1)

    使用django(4.1.5) 搭建股票信息后台,显示股票信息: Stock -> models.py class Stock(models.Model): symbol = models.Ch ...

  9. net core 中的[FromBody]

    一.针对.net core中post类型的api注意的地方(前提是Controller上加[ApiController]特性).默认是这个. 1.如果客户端Content-Type是applicati ...

  10. Redis的高可用?(主从、哨兵、集群)

    高可用有两个含义:一是数据尽量不丢失,二是保证服务尽可能可用. AOF 和 RDB 数据持久化保证了数据尽量不丢失,那么多节点来保证服务尽可能提供服务. 一般在实际生产中,服务不会部署成单节点,主要是 ...