3 ms·
I've never used doas, I have only used sudo and I'm just curious if anyone could explain the differences and maybe why one would use doas over sudo? Or sudo ove
by heywoodlh 4y ago
I've never used doas, I have only used sudo and I'm just curious if anyone could explain the differences and maybe why one would use doas over sudo? Or sudo over doas?
I've just never really thought about using anything besides sudo until now. :)
- vjnmbmn 4y agodoas is the openbsd people going "sudo is too complex and is therefore insecure". it has a way simpler config and way smaller source. it also may or may not be fully functional on linux at any given time as it likes to use openbsd kernel apis. for instance on linux by default you must supply a password every time you invoke doas, unlike sudo which provides a temporary session for the tty you authenticate against. doas supports such a session on openbsd, but relies on kernel timers, so by default that functionality is disabled in linux.
- heywoodlh 4y agoAh, interesting! Very good to know, thank you for the detailed and concise explanation.
- nixcraft 4y agoSudo project means more source code == more bugs. doas is from OpenBSD, less and clean code == less bugs. At least, that is how I see it. I wrote last C code 15+ years back so you might as well ignore my comment ;)
- heywoodlh 4y agoIt seems to me like based on this information doas would be simpler and more secure. Another comment brought up that doas is available on Linux but doesn't function as well because kernel timers are disabled. This made me wonder: is doas not as popular as sudo because sudo functions the same across Unix-like platforms where doas doesn't? I wonder this because doas seems like it is superior but I rarely see how-to documentation (on Linux, at least) that uses anything aside from sudo (or just su) for privilege escalation.