一:因为之前误操作使用sudo chmod -R 777 /usr命令修改了usr文件的所有者导致了此问题;

二:网上说需要进入recovery mode,经过自己的测试是不需要的;

三:步骤(只需登录到普通模式下即可)

1.su - root切换为root用户;

2.执行chown root:root /usr/bin/sudo

3.执行chmod 4755 /usr/bin/sudo

4.reboot后普通用户就又可以用sudo了;

解决普通用户sudo时出现/usr/bin/sudo must be owned by uid 0 and have the setuid bit set的更多相关文章

  1. sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set 的解决办法

    Linux新建用户 ,sudo报错: sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set 解决办法:重置一下s ...

  2. sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

    使用root 登录,然后执行: chown root:root /usr/bin/sudo chmod 4755 /usr/bin/sudo reboot

  3. linux sudo命令失败 提示sudo:/usr/bin/sudo 必须属于用户 ID 0(的用户)并且设置 setuid 位

    sudo:/usr/bin/sudo 必须属于用户 ID 0(的用户)并且设置 setuid 位 一.前言 这是一个神奇的错误,缘由是因为有人将/usr/bin/sudo的权限改为777或其他. 解决 ...

  4. make源文件时出现 /usr/bin/ld: cannot find -lstdc++ 错误

    解决CentOS 7 中,make源文件时出现 /usr/bin/ld: cannot find -lstdc++ 错误 在CentOS 7中,使用static方法编译,需要安装static vers ...

  5. 配置webstorm使用supervisor时出现 /usr/bin/env: node: 没有那个文件或目录 解决方法

    配置好supervisor路径后 出现了 启动时出现了 /usr/bin/env: node: 没有那个文件或目录 需要讲.nvm下的node链接到, /usr/bin/目录下 sudo ln -s ...

  6. dyld: DYLD_ environment variables being ignored because main executable (/usr/bin/sudo) is setuid or setgid

    这两个变量被设置了 DYLD_LIBRARY_PATH *或* LD_LIBRARY_PATH, 用下面的明令查找一下,一般在.bash_profile, .bashrc 等文件中.执行brew do ...

  7. #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby

    #!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby # This script installs to ...

  8. make -f dc_debug.mak 提示错误"/usr/bin/ld:can not find -l***"解决办法

    在公司不同服务器上"make -f ***"程序的时候,有的服务器可以编译通过,有的却提示"/usr/bin/ld:can not find -l***"的错误 ...

  9. 解决ubuntu系统中wireshark:Couldn't run /usr/bin/dumpcap in child process: Permission denied的问题

    ubuntu系统运行WIreshark的时候,出现如下错误: Couldn't run /usr/bin/dumpcap in child process: Permission denied 解决办 ...

随机推荐

  1. CMake命令

    CMake手册详解,作者翻译的很详细,以下是自己进行的摘录: CMake80个命令(详细解释可以看here) CMD#1: add_custom_command为生成的构建系统添加一条自定义的构建规则 ...

  2. 从matlab中导出下载到的轨迹数据

    我从该网址(http://www.ee.cuhk.edu.hk/~xgwang/MITtrajsingle.html)下载到了一些轨迹数据. 网页中简单说明了轨迹数据的由来:原始数据是在一个停车场上方 ...

  3. 性能(js)

    1.避免全局查找: <script type="text/javascript"> function updateUI(){ var imgs=document.get ...

  4. JoyOI1035 棋盘覆盖

    原题链接 对棋盘染色,坐标和为奇数的染黑,偶数为白.这时会发现对于相同颜色的格子,是无法放置骨牌的,这样我们就将所有格子分成两类,然后根据能否放置骨牌连边,最后就是求二分图最大匹配了. 这里我是用的匈 ...

  5. Netty 源码 Channel(二)核心类

    Netty 源码 Channel(二)核心类 Netty 系列目录(https://www.cnblogs.com/binarylei/p/10117436.html) 一.Channel 类图 二. ...

  6. [Python]Python章1 Python中_的故事

    _xx 单下划线开头 Python中没有真正的私有属性或方法,可以在你想声明为私有的方法和属性前加上单下划线,以提示该属性和方法不应在外部调用.如果真的调用了也不会出错,但不符合规范. 本文为译文,版 ...

  7. Sort Array By Parity LT905

    Given an array A of non-negative integers, return an array consisting of all the even elements of A, ...

  8. linux-ubuntu 下R无法安装rjava模块的原因及解决方案

    错误信息: 没有 /usr/lib/jvm/default-java/jre/bin/java 原因: R找不到java作为依赖 解决方案: (1) 如果你没有安装java,请先安装java. (2) ...

  9. 在ListView中添加EditText丢失光标问题解决

    <ListView    android:id="@android:id/list"     android:layout_height="fill_parent& ...

  10. python中的open( )函数

    函数原型 open(file, mode=‘r', buffering=-1, encoding=None, errors=None, newline=None, closefd=True) buff ...