zoukankan      html  css  js  c++  java
  • 咦,孰为汝多知乎

    号称健壮异常的Linux,只要将目录 /usr/bin 的拥有者,由 root 转移为 当前用户,那么这个sudo就坏掉了,再也无法使用:

    leftfist@localhost ~]$ sudo chown -R $USER /usr/bin 
    [sudo] password for leftfist: 
    [leftfist@localhost ~]$ ll /usr
    total 136
    dr-xr-xr-x.   2 leftfist root 36864 Oct 20 01:21 bin
    drwxr-xr-x.   2 root     root  4096 Sep 23  2011 etc
    drwxr-xr-x.   2 root     root  4096 Sep 23  2011 games
    drwxr-xr-x.  32 root     root  4096 Oct 15 14:58 include
    dr-xr-xr-x.  98 root     root 45056 Oct 15 21:41 lib
    drwxr-xr-x.  23 root     root 12288 Oct 20 01:21 libexec
    drwxr-xr-x.  11 root     root  4096 Oct 15 14:54 local
    dr-xr-xr-x.   2 root     root 12288 Oct 15 21:41 sbin
    drwxr-xr-x. 171 root     root  4096 Oct 20 01:21 share
    drwxr-xr-x.   4 root     root  4096 Oct 15 14:54 src
    lrwxrwxrwx.   1 root     root    10 Oct 15 14:54 tmp -> ../var/tmp
    [leftfist@localhost ~]$ sudo 
    sudo: effective uid is not 0, is sudo installed setuid root?

    $ su -

    # sudo chown -R root /usr/bin

    将拥有者再转回root,已经于事无补。在网上疯狂搜索,也暂时找不到什么答案。

    不过,这样搞了以后,似乎当前用户也成了超级用户,可以直接reboot,poweroff什么的。

  • 相关阅读:
    oracle impdp 导入
    oracle权限的分配
    Oracle CASE WHEN 用法介绍
    Oracle自动执行任务(存储过程)
    PL/SQL注册码
    ORACLE基本的sql语句
    ORACLE导出导入问题和表空间问题
    PLSQL笔记
    JSEL 表达式
    asp.net HTTP教程一(HTTP运行期与页面执行模型 )
  • 原文地址:https://www.cnblogs.com/leftfist/p/4257851.html
Copyright © 2011-2022 走看看