sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set的解決辦法


不知道為什么ubuntu中無法直接sudo+命令了。。。報錯:sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set。只能su切換到root后再執行命令。

解決辦法:

  1、切換到root

  2、chown root:root /usr/bin/sudo

  3、chmod 4755 /usr/bin/sudo

  以上步驟可以重置sudo的屬性。

 

如果不知道root密碼,參考:https://zhuanlan.zhihu.com/p/75264313


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM