改用doas吧,sudo is bloated。 - Linux
By Caroline
at 2021-09-28T01:28
at 2021-09-28T01:28
Table of Contents
國外許多的桌機或筆電Linux使用者漸漸從sudo改到doas,所以在這邊大略分享一下doas
的使用經驗。
1.什麼是doas?
doas的作者為Ted Unangst,用於openbsd上,而Linux上的doas則是由GitHub 使用者Dunc
aen 移植的opendoas。
GitHub: https://github.com/Duncaen/OpenDoas
2.為什麽要使用doas?
因為sudo在一般桌機或筆電使用者的用圖只是為了取得超級使用者的權利,doas的功能也
是一樣,但sudo確還有其它的功能導致其源碼相當的旁大,進而造成sudo有許多的潛在安
全漏洞。而doas只有為使用者取得超級使用者的功能,所以源碼相對簡單,潛在安漏洞則
較少。
3.doas有哪些功能?要怎麼設定doas?
功能:
nopass-使用者在使用doas時不需要密碼。
persist-使用者在輸入密碼成功後一段時間內無需再輸入密碼(這功能在Gentoo上沒用,
原因未知。)
設定:doas的設定非常簡單,只需要在/etc/doas.conf打上。(假設使用者的名字叫tux
。)
permit :tux
假如要使用功能的話(使用nopass做示範。)
permit nopass :tux
4.如何在終端機上從sudo改用doas?
這裡用Gentoo的emerge做示範,假如要安裝程式media-hentai/hendroid的話
sudo:
sudo emerge media-hentai/hendroid
doas:
doas emerge media-hentai/hendroid
5.相關資源
Arch wiki: https://wiki.archlinux.org/title/Doas
Gentoo wiki: https://wiki.gentoo.org/wiki/Doas
P.s 新鮮來潮寫的小介紹,如果文中有任何的錯誤還麻煩糾正我了,謝謝啦。
--
的使用經驗。
1.什麼是doas?
doas的作者為Ted Unangst,用於openbsd上,而Linux上的doas則是由GitHub 使用者Dunc
aen 移植的opendoas。
GitHub: https://github.com/Duncaen/OpenDoas
2.為什麽要使用doas?
因為sudo在一般桌機或筆電使用者的用圖只是為了取得超級使用者的權利,doas的功能也
是一樣,但sudo確還有其它的功能導致其源碼相當的旁大,進而造成sudo有許多的潛在安
全漏洞。而doas只有為使用者取得超級使用者的功能,所以源碼相對簡單,潛在安漏洞則
較少。
3.doas有哪些功能?要怎麼設定doas?
功能:
nopass-使用者在使用doas時不需要密碼。
persist-使用者在輸入密碼成功後一段時間內無需再輸入密碼(這功能在Gentoo上沒用,
原因未知。)
設定:doas的設定非常簡單,只需要在/etc/doas.conf打上。(假設使用者的名字叫tux
。)
permit :tux
假如要使用功能的話(使用nopass做示範。)
permit nopass :tux
4.如何在終端機上從sudo改用doas?
這裡用Gentoo的emerge做示範,假如要安裝程式media-hentai/hendroid的話
sudo:
sudo emerge media-hentai/hendroid
doas:
doas emerge media-hentai/hendroid
5.相關資源
Arch wiki: https://wiki.archlinux.org/title/Doas
Gentoo wiki: https://wiki.gentoo.org/wiki/Doas
P.s 新鮮來潮寫的小介紹,如果文中有任何的錯誤還麻煩糾正我了,謝謝啦。
--
Tags:
Linux
All Comments
By Zenobia
at 2021-10-01T10:42
at 2021-10-01T10:42
By Delia
at 2021-10-04T19:55
at 2021-10-04T19:55
By Ivy
at 2021-10-08T05:09
at 2021-10-08T05:09
By Hamiltion
at 2021-10-11T14:22
at 2021-10-11T14:22
By Edwina
at 2021-10-14T23:36
at 2021-10-14T23:36
By Harry
at 2021-10-18T08:49
at 2021-10-18T08:49
By Charlie
at 2021-10-21T18:03
at 2021-10-21T18:03
By Gary
at 2021-10-25T03:16
at 2021-10-25T03:16
By Daniel
at 2021-10-28T12:30
at 2021-10-28T12:30
By Connor
at 2021-10-31T21:44
at 2021-10-31T21:44
By Sarah
at 2021-11-04T06:57
at 2021-11-04T06:57
By Rachel
at 2021-11-07T16:11
at 2021-11-07T16:11
By Tracy
at 2021-11-11T01:24
at 2021-11-11T01:24
By Carolina Franco
at 2021-11-14T10:38
at 2021-11-14T10:38
By Daph Bay
at 2021-11-17T19:51
at 2021-11-17T19:51
By Agnes
at 2021-11-21T05:05
at 2021-11-21T05:05
By Tristan Cohan
at 2021-11-24T14:18
at 2021-11-24T14:18
By Agnes
at 2021-11-27T23:32
at 2021-11-27T23:32
By Faithe
at 2021-12-01T08:45
at 2021-12-01T08:45
By Zora
at 2021-12-04T17:59
at 2021-12-04T17:59
By Olivia
at 2021-12-08T03:12
at 2021-12-08T03:12
By Isabella
at 2021-12-11T12:26
at 2021-12-11T12:26
By Rebecca
at 2021-12-14T21:39
at 2021-12-14T21:39
By Anonymous
at 2021-12-18T06:53
at 2021-12-18T06:53
By Kama
at 2021-12-21T16:06
at 2021-12-21T16:06
By Iris
at 2021-12-25T01:20
at 2021-12-25T01:20
By Dora
at 2021-12-24T03:19
at 2021-12-24T03:19
By Andy
at 2021-12-27T12:33
at 2021-12-27T12:33
By Kumar
at 2021-12-24T03:19
at 2021-12-24T03:19
By William
at 2021-12-27T12:33
at 2021-12-27T12:33
By Kumar
at 2021-12-24T03:19
at 2021-12-24T03:19
By Xanthe
at 2021-12-27T12:33
at 2021-12-27T12:33
By Hedy
at 2021-12-24T03:19
at 2021-12-24T03:19
By George
at 2021-12-27T12:33
at 2021-12-27T12:33
By Kristin
at 2021-12-24T03:19
at 2021-12-24T03:19
By Steve
at 2021-12-27T12:33
at 2021-12-27T12:33
By Xanthe
at 2021-12-24T03:19
at 2021-12-24T03:19
By Hardy
at 2021-12-27T12:33
at 2021-12-27T12:33
By Hedwig
at 2021-12-24T03:19
at 2021-12-24T03:19
By Christine
at 2021-12-27T12:33
at 2021-12-27T12:33
By Donna
at 2021-12-24T03:19
at 2021-12-24T03:19
By Rosalind
at 2021-12-27T12:33
at 2021-12-27T12:33
Related Posts
pipewire bug?
By Madame
at 2021-09-27T23:42
at 2021-09-27T23:42
如何chmod 其他owner的檔案屬性(777)
By Caroline
at 2021-09-27T22:01
at 2021-09-27T22:01
Linux Wifi6(80211ax) 熱點(AP) 設定
By Connor
at 2021-09-24T18:56
at 2021-09-24T18:56
Linux Mint 官網翻新~
By Belly
at 2021-09-21T19:00
at 2021-09-21T19:00
Ubuntu無法登入
By Andrew
at 2021-09-18T19:45
at 2021-09-18T19:45