提示错误信息

www@iZ236j3sofdZ:~$ ifconfig
Command 'ifconfig' is available in '/sbin/ifconfig'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
ifconfig: command not found

切换到root 用户模式下 ,找一个别的操作系统给的profile 文件,复制过来,替换掉以前的既可以

vi /etc/profile

# /etc/profile: system-wide .profile file for the Bourne shell (sh())
# and Bourne compatible shells (bash(), ksh(), ash(), ...). if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi # The default umask is now handled by pam_umask.
# See pam_umask() and /etc/login.defs. if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi

错误信息:

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

在这我是这么做的

sudo vi /etc/sudoers

# User privilege specification
root ALL=(ALL:ALL) ALL www ALL=(ALL) ALL # 增加www用户这一行既可以了 # Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL # Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

保存皆可以了

Ubuntu报“xxx is not in the sudoers file.This incident will be reported” 错误解决方法

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

  1. 企业运维案例: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" 解决 ...

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

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

  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.的解决方法

    Linux中普通用户用sudo执行命令时报”xxx is not in the sudoers file.This incident will be reported”错误,解决方法就是在/etc/s ...

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

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

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

    1>.进入超级用户模式.也就是输入"su -",系统会让你输入超级用户密码,输入密码后就进入了超级用户模式.(当然,你也可以直接用root用户登录,因为红旗安装过后默认的登录 ...

  9. 普通用户开通sudo权限: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/s ...

随机推荐

  1. python3 subprocess模块

    当我们在执行python程序的时候想要执行系统shell可以使用subprocess,这时可以新起一个进程来执行系统的shell命令,python3常用的有subprocess.run()和subpr ...

  2. shellcode 编码技术

    在很多漏洞利用场景中, shellcode 的内容将会受到限制. 例如你不能输入 \x00 这个字符,编辑框不能输入 \x0d \x0a这样的字符 所以需要完成 shellcode 的逻辑,然后使用编 ...

  3. docker 学习笔记(1)--常用命令

    docker pull---- 获取image(镜像)docker build---- 创建image(镜像)docker images ----查询所有的image(镜像)docker run--- ...

  4. 英国诗人乔叟Dethe is my Finaunce金融

    英国诗人乔叟Dethe is my Finaunce金融 英语中“金融”在14世纪,金融计算时间价值的手段.就随机结果签约的能力.一个允许转让金融权后的清算.<Lamentation of Ma ...

  5. 利用顺序栈解决括号匹配问题(c++)-- 数据结构

    题目: 7-1 括号匹配 (30 分)   给定一串字符,不超过100个字符,可能包括括号.数字.字母.标点符号.空格,编程检查这一串字符中的( ) ,[ ],{ }是否匹配. 输入格式: 输入在一行 ...

  6. 科普贴 | 数字钱包MetaMask安装使用详解,活用MetaMask轻松驾驭以太坊

    MetaMask 是一款浏览器插件钱包,不需下载安装客户端,只需添加至浏览器扩展程序即可使用,非常方便.它是很多支持 ETH 参投的 ICO 项目推荐使用的钱包之一. 2018年初最火的一个币,应该就 ...

  7. PHP完美分页类

    <?php /** file: page.class.php 完美分页类 Page */ class Page { private $total; //数据表中总记录数 private $lis ...

  8. centos运行C程序

    gcc -o Hello Hello.c 编译成可执行文件 ./Hello 运行 win上也是一样

  9. Beta阶段冲刺-4

    一. 每日会议 1. 照片 2. 昨日完成工作 3. 今日完成工作 4. 工作中遇到的困难 杨晨露:热......算不算困难......? 戴志斌:找了好几种框架,改了不少 游舒婷:不能相信开发工具自 ...

  10. nil Nil NULL NSNull 之间的区别

    nil -> Null-pointer to objective- c objectNIL -> Null-pointer to objective- c class  表示对类进行赋空值 ...