日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

linux sudo 版本,Linu下如何升级当前sudo版本

發(fā)布時(shí)間:2025/3/11 48 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux sudo 版本,Linu下如何升级当前sudo版本 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Sudo 的全稱是“superuserdo”,它是Linux系統(tǒng)管理指令,允許用戶在不需要切換環(huán)境的前提下以其它用戶的權(quán)限運(yùn)行應(yīng)用程序或命令,通常是以 root 用戶身份運(yùn)行命令,以減少 root 用戶的登錄和管理時(shí)間,同時(shí)提高安全性。該漏洞是 sudo安全策略繞過問題,可導(dǎo)致惡意用戶或程序在目標(biāo) Linux 系統(tǒng)上以 root 身份執(zhí)行任意命令,即使 “sudoers configuration” 明確禁止該 root訪問權(quán)限也不例外。

但是有個(gè)Sudo bug 可導(dǎo)致 Linux和macOS 普通用戶獲得 root 權(quán)限,該漏洞存在于1.7.1至1.8.25p1版本中,但是1.8.26到1.8.30的版本可能會(huì)被濫用,因?yàn)樗鼈儼薊OF處理該漏洞的變化。Sudo 1.7.1是在2009年4月19日發(fā)布的,而第一個(gè)補(bǔ)丁版本(1.8.26)是在2019年9月17日發(fā)布的,所以這個(gè)bug大約存在了10年之久。

為此我們可以升級(jí)當(dāng)前sudo版本至sudo-1.8.31。

開始

1、查看最開始的版本為:

linuxidc@linuxidc:~/www.linuxidc.com$ sudo --version

Sudo 版本 1.8.21p2

Sudoers 策略插件版本 1.8.21p2

Sudoers 文件語法版本 46

Sudoers I/O plugin version 1.8.21p2

2、升級(jí)sudo的版本

下載最新安裝包(1.8.31)

linuxidc@linuxidc:~/www.linuxidc.com$ wget http://www.sudo.ws/dist/sudo-1.8.31.tar.gz

3、編譯升級(jí)sudo的版本

linuxidc@linuxidc:~/www.linuxidc.com/sudo-1.8.31$ sudo make install

linuxidc@linuxidc:~/www.linuxidc.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

linuxidc@linuxidc:~/www.linuxidc.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]: 進(jìn)入目錄“/home/linuxidc/www.linuxidc.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、安裝

linuxidc@linuxidc:~/www.linuxidc.com/sudo-1.8.31$ sudo make install

[sudo] linuxidc 的密碼:

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.查看升級(jí)后的版本

linuxidc@linuxidc:~/www.linuxidc.com$ sudo --version

Sudo 版本 1.8.31

Sudoers 策略插件版本 1.8.31

Sudoers 文件語法版本 46

Sudoers I/O plugin version 1.8.31

OK,就這樣。

總結(jié)

以上是生活随笔為你收集整理的linux sudo 版本,Linu下如何升级当前sudo版本的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。