Linux查sudo版本,Linu下如何升级当前sudo版本
Linu下如何升级当前sudo版本
Sudo 的全称是“superuserdo”,它是Linux系统管理指令,允许用户在不需要切换环境的前提下以其它用户的权限运行应用程序或命令,通常是以 root 用户身份运行命令,以减少 root 用户的登录和管理时间,同时提高安全性。该漏洞是 sudo安全策略绕过问题,可导致恶意用户或程序在目标 Linux 系统上以 root 身份执行任意命令,即使 “sudoers configuration” 明确禁止该 root访问权限也不例外。
但是有个Sudo bug 可导致 Linux和macOS 普通用户获得 root 权限,该漏洞存在于1.7.1至1.8.25p1版本中,但是1.8.26到1.8.30的版本可能会被滥用,因为它们包含了EOF处理该漏洞的变化。Sudo 1.7.1是在2009年4月19日发布的,而第一个补丁版本(1.8.26)是在2019年9月17日发布的,所以这个bug大约存在了10年之久。
为此我们可以升级当前sudo版本至sudo-1.8.31。
开始
1、查看最开始的版本为:
dengb@dengb:~/www.dengb.com$ sudo --version
Sudo 版本 1.8.21p2
Sudoers 策略插件版本 1.8.21p2
Sudoers 文件语法版本 46
Sudoers I/O plugin version 1.8.21p2
2、升级sudo的版本
下载最新安装包(1.8.31)
dengb@dengb:~/www.dengb.com$ wget http://www.sudo.ws/dist/sudo-1.8.31.tar.gz
3、编译升级sudo的版本
dengb@dengb:~/www.dengb.com/sudo-1.8.31$ sudo make install
dengb@dengb:~/www.dengb.com/sudo-1.8.31$ ./configure
configure: Configuring Sudo version 1.8.31
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
dengb@dengb:~/www.dengb.com/sudo-1.8.31$ make
for d in lib/util plugins/group_file plugins/sudoers plugins/system_group src include doc examples; do \
(cd $d && exec make all) && continue; \
exit $?; \
done
make[1]: 进入目录“/home/dengb/www.dengb.com/sudo-1.8.31/lib/util”
/bin/bash ../../libtool --tag=disable-static --mode=compile gcc -c -o digest.lo -I../../include -I../.. -I. -I../.. -D_PATH_SUDO_CONF=\"/etc/sudo.conf\" -DZLIB_CONST -D_FORTIFY_SOURCE=2 -g -O2 -fvisibility=hidden -fPIE -fstack-protector-strong ./digest.c
4、安装
dengb@dengb:~/www.dengb.com/sudo-1.8.31$ sudo make install
[sudo] dengb 的密码:
if test -d ./.hg && cd .; then \
if hg log --style=changelog -r "sort(branch(.) or follow(), -date)" > ChangeLog.tmp; then \
mv -f ChangeLog.tmp ChangeLog; \
else \
rm -f ChangeLog.tmp; \
fi; \
elif test -d ./.git && cd .; then \
./log2cl.pl -b master > ChangeLog; \
else \
echo "ChangeLog data not available" > ChangeLog; \
fi
for d in lib/util plugins/group_file plugins/sudoers plugins/system_group src include doc examples; do \
(cd $d && exec make pre-install) && continue; \
exit $?; \
done
5.查看升级后的版本
dengb@dengb:~/www.dengb.com$ sudo --version
Sudo 版本 1.8.31
Sudoers 策略插件版本 1.8.31
Sudoers 文件语法版本 46
Sudoers I/O plugin version 1.8.31
OK,就这样。
登博教程的RSS地址:https://www.dengb.com/rssFeed.aspx
本文永久更新链接地址:https://www.dengb.com/Linux/2020-02/162444.htm
http://www.dengb.com/Linuxjc/1395087.htmlwww.dengb.comtruehttp://www.dengb.com/Linuxjc/1395087.htmlTechArticleLinu下如何升级当前sudo版本 Sudo 的全称是superuserdo,它是Linux系统管理指令,允许用户在不需要切换环境的前提下以其它用户的权限运行应用...
Linux查sudo版本,Linu下如何升级当前sudo版本相关推荐
- linux sudo 版本,Linu下如何升级当前sudo版本
Sudo 的全称是"superuserdo",它是Linux系统管理指令,允许用户在不需要切换环境的前提下以其它用户的权限运行应用程序或命令,通常是以 root 用户身份运行命令, ...
- linux 下升级apache,CentOS6.5在已有低版本环境下安装升级Apache+MySQL+PHP,centos6.5apache...
CentOS6.5在已有低版本环境下安装升级Apache+MySQL+PHP,centos6.5apache 由于最近工作中遇到了一个在比较老旧RedHat系Linux发行版系统上升级安装Apache ...
- mac怎么查python的版本_Mac下如何查看Python的版本?
[1,terminal : input: which python2, terminal:input : python --->import sys ----> print sys. ...
- centos7下安装低版本mysql_centos7下使用yum安装制定版本mysql
一.准备mysql镜像源 到官网找mysql的yum源 wget https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm r ...
- Eclipse 版本升级:如何不卸载旧版本 Eclipse 实现在线升级到最新版本?
文章目录 前言 一.网上没"升级 Eclipse"相关资料吗? 1.1.相关资料很少,我也生气 1.2.升级新版本与在线升级插件傻傻搞不清 二.版本升级准备 2.1.Eclipse ...
- android大版本ota,Android OTA升级新旧版本任意升级
1. Android升级到较新的版本后,想用.zip升级包升回旧的版本时,在升级时会发错.这是由于android系统时对升级文件有版本检测. 2. build/tools/releasetools/o ...
- Mac 技术篇-多个python版本环境下Geany编辑器指定python版本运行
mac 里我们一般有两个版本,一个自带的老版本,一个我们自己安装的新版本. 默认的 python 版本是2.7的,我们要用另一个版本的话,就需要在编辑器里单独进行设置了. 设置很简单,直接点击运行边上 ...
- linux系统下升级node,linux下安装指定版本的nodejs(升级到指定版本)
原因 最近需要全栈开发但是服务器是linux系统,服务本身通过yum安装软件包,不过yum安装的nodejs版本太低.所以需要自己安装. 方案 下载编译好的文件解压后直接运行即可,不过我们需要全局运行 ...
- linux 安装php 5.5_Linux下yum升级安装PHP 5.5
系统环境: CentOS 6.4 x86_64 Fedora 20 x86_64 Fedora 20 源中已经有了PHP的源,直接可以使用以下命令安装即可: # yum ins 系统环境: CentO ...
最新文章
- Pytorch-基于Transformer的情感分类
- GridView显示图片
- 云计算的8个常见用途
- SpringBoot自定义MessageConverter
- “618”台前幕后的那些事
- 春节直播大战搜狐另辟蹊径 40余场直播引领牛年直播综艺新风尚
- 面试开发可以用python_Python开发工程师面试题(五)
- android中动态壁纸下载,手机动态桌面壁纸(Video live wallpaper)
- docx4j doc转html,11、docx4j生成文档格式转换
- pdf.js 跨域 php,JavaScript_js跨域资源共享 基础篇,本文详细介绍了javascript跨域资 - phpStudy...
- 计算机科学与技术有几大类,计算机科学与技术类包括哪些专业
- Centos8 yum配置阿里云镜像
- 苏世民,我的经验和教训(五)
- 证券从业考试如何备考1116
- 用python进行数据分析举例说明_《利用python进行数据分析》读书笔记 --第一、二章 准备与例子...
- 微程序控制器的工作原理
- 4G无线遥控器RC遥控器方案【免费开源】DIY
- 超融合与传统虚拟化的对比.
- BCG与阿里研究院等联合揭秘中国互联网经济:成功的关键是什么?
- Windows截图工具合集