有时候, 比如在CentOS 6上. sudo 会报如下错误:

sudo: must be setuid root

这是因为, sudo 命令, 没有SUID,

[root@T209 ~]# ll /usr/bin/sudo
-rwxr-xr-x. root root Jun /usr/bin/sudo

使用如下命令, 增加SUID:

[root@localhost ~]# chmod u+s /usr/bin/sudo
[root@localhost ~]# ll /usr/bin/sudo
-rwsr-xr-x. root root Jun /usr/bin/sudo

参考:https://www.sudo.ws/troubleshooting.html

Q) Sudo compiles and installs OK but when I try to run it I get:
effective uid is not , is /usr/local/bin/sudo on a file system with the
'nosuid' option set or an NFS file system without root privileges?
A) The owner and permissions on the sudo binary appear to be OK but when
sudo ran, the setuid bit did not have an effect. There are two common
causes for this. The first is that the file system the sudo binary
is located on is mounted with the 'nosuid' mount option, which disables
setuid binaries. The output of the "mount" command should tell you if
the file system is mounted with the 'nosuid' option. The other possible
cause is that sudo is installed on an NFS-mounted file system that is
exported without root privileges. By default, NFS file systems are
exported with uid mapped to a non-privileged uid (usually -). You
should be able to determine whether sudo is located on an NFS-mounted
filesystem by running "df `which sudo'".

[daily][centos][sudo] sudo 报错的更多相关文章

  1. centOS下yum报错

    CentOS下yum报错 备注:当我们在CentOS下使用yum命令的时候,会报一些错误,一下是我总结的几个解决问题的方法.(保证自己的服务器可以上网) 一.关于Loaded plugins: fas ...

  2. linux(乌班图)下执行pip没有问题,执行sudo pip报错的问题

    最近刚装好linux的虚拟机,在装一个套件时提示权限不足,于是添加上了 sudo 命令,结果直接报以下错误, Traceback (most recent call last): File " ...

  3. CentOS的MySQL报错:Can't connect to MySQL server

    原文链接: http://www.centoscn.com/CentosBug/softbug/2015/0622/5709.html 问题描述: 使用客户端远程登录连接基于CentOS 6.5服务器 ...

  4. 安装Python3后,centos使用yum报错

    题记 在之前的文章中我自定义安装了Python3,并且修改了默认的 Python软链,今天想搭建一个 ftp 服务器,使用命令的时候出现了一个错误: 问题 1.使用 yum 安装 ftp工具 yum ...

  5. CentOS yum命令报错 Error: File /var/cache/yum/i386/6/epel/metalink.xml does not exist

    最近在虚拟机上执行yum命令一直报错:Could not parse metalink https://mirrors.fedoraproject.org/metalink?repo=epel-7&a ...

  6. 安装CentOS 6.x报错"Disk sda contains BIOS RAID metadata"解决方法

    今天在安装CentOS 6.2的时候,当进到检测硬盘的时候,总是过不去,报错如下: Disk sda contains BIOS RAID metadata, but is not part of a ...

  7. Centos 安装docker报错

    错误信息: 安装报错:Transaction check error:  file /usr/lib/systemd/system/blk-availability.service from inst ...

  8. 【Python】Centos + gunicorn+flask 报错ImportError: No module named request

    今天用Python去下载图片,用到了 urllib.request,这个是python3的方法.python2 使用的是urllib2 遇到了这么个问题后台报错,ImportError: No mod ...

  9. 解决Centos运行yum 报错:坏的解释器

    # ll /usr/bin/python python python2 python2.6 python2.7 python.bak 1,这里先备份原来的/usr/bin/python 为python ...

  10. centos git clone 报错 fatal: HTTP request failed 解决办法

    git clone报错提示 git clone https://github.com/xxxx.git Initialized empty Git repository in /root/xxxx/. ...

随机推荐

  1. IOS项目目录结构和开发流程

    网上相关的资源不多,开源的且质量还不错的iOS项目也是少之又少,最近正好跟同事合作了一个iOS项目,来说说自己的一些想法.   目录结构 AppDelegate Models Macro Genera ...

  2. 《软件测试自动化之道》读书笔记 之 底层的Web UI 测试

    <软件测试自动化之道>读书笔记 之 底层的Web UI 测试 2014-09-28 测试自动化程序的任务待测程序测试程序  启动IE并连接到这个实例  如何判断待测web程序完全加载到浏览 ...

  3. 瀑布 敏捷 精益 devops

    敏捷:  分工角色  大项目分小项目   每个节点时间设置里程碑 Scrum实施的核心可以概括为“化繁为简”,从几个维度解释下: 团队角色的定义,将团队人员定义为三个角色,Scrum Master(主 ...

  4. C++ 智能指针六

    /* 智能指针unique_ptr */ #include <iostream> #include <string> #include <memory> #incl ...

  5. MySQL 5.7.19 忘记密码 重置密码 配置文件my.ini示例 服务启动后停止 log配置

    [参考]java 项目 存入mysql后 变问号 MySql 5.6 (X64) 解压版 1067错误与编码问题的解决方案 一.my.ini 的mysqld下添加 skip-grant-tables ...

  6. 最全面的 Webview 详解

    前言 现在很多App里都内置了Web网页(Hyprid App),比如说很多电商平台,淘宝.京东.聚划算等等,如下图 那么这种该如何实现呢?其实这是Android里一个叫WebView的组件实现的.今 ...

  7. [SLAM] ***AR Tracking based on which tools?

    SLAM虽然小复杂,但对于开发者而言,ar sdk通常会解决这个问题. 所以相对于识别,跟踪是个看上去高大上但实则不需要关注细节的部分. 识别,要技术深耕:跟踪,需行业深耕. 在此了解下常见的ar s ...

  8. Linux设备驱动剖析之IIC(四)

    558行,又重试2次. 560行,调用s3c24xx_i2c_doxfer函数: static int s3c24xx_i2c_doxfer(struct s3c24xx_i2c *i2c, stru ...

  9. android基础---->service的生命周期

    服务是一个应用程序组件代表应用程序执行一个长时间操作的行为,虽然不与用户交互或供应功能供其它应用程序使用.它和其他的应用对象一样,在他的宿主进程的主线程中运行.今天我们开始android中普通serv ...

  10. Bitmap(三)

    转自:http://www.open-open.com/lib//view/open1333418945202.html Bitmap是Android系统中的图像处理的最重要类之一.用它可以获取图像文 ...