this post was submitted on 01 Jul 2023
33 points (92.3% liked)

linuxmasterrace

77 readers
1 users here now

A community for Linux enthusiasts.

May your htop stats be low and your beard grow long

Welcome to [email protected] former r/linuxmasterrace members and existing Lemmyverse citizens: Feel free to join the newly created [email protected] community.

Let’s make the full transition to the decentralized Fediverse!

founded 1 year ago
MODERATORS
 
top 12 comments
sorted by: hot top controversial new old
[–] [email protected] 10 points 1 year ago (2 children)

Why should I use doas instead of sudo? It's not even less typing.

[–] [email protected] 5 points 1 year ago (1 children)

Yeah, I really don't get why one is supposed to be better than the other.

Maybe doas gives you superer user privileges.

[–] [email protected] 9 points 1 year ago

sudo is complex with a lot of code and options.

doas is small, simple & secure from OpenBSD.

If all you want is root priv without remembering two passwords on your box, doas is fine. If you want a complex system of admins and users with fine grained permission control sudo may be a better option.

I use ' su -' much of the time and just use a root shell.

Actively replacing sudo with doas on an OS that includes sudo in the base system seems pointless imo.

[–] [email protected] 4 points 1 year ago (1 children)

It is a much simpler program than sudo. A simpler and less complicated implementation means less vulnerabilities.

sudo had some serious vulnerabilities in the past: https://www.helpnetsecurity.com/2021/01/27/cve-2021-3156/

[–] [email protected] 3 points 1 year ago* (last edited 1 year ago) (3 children)

Can you actually remove sudo from a system without breaking stuff? I can image there's some stuff, scripts etc that depends on it. Unless you can alias it away?

[–] [email protected] 3 points 1 year ago

I use my Linux system without sudo, it does break some (badly written) scripts. You can fix it by either creating a symlink in your path or replacing sudo to doas on those scripts.

But I rarely encounter these issues. Usually system applications won't be affecting by a missing sudo binary, as their privileges are typically managed by polkit or similar.

[–] [email protected] 3 points 1 year ago

Used doas for about 4 years now and never had an issue like that. The default config passes environment variables differently to sudo, but after I added the correct setting for that to doas.conf it has been identical to sudo in everything.

If it caused issues for you you could link sudo to doas in bin, no script should ever use sudo -i right?

[–] [email protected] 2 points 1 year ago

Depends on the system.

[–] [email protected] 3 points 1 year ago
[–] [email protected] 2 points 1 year ago (1 children)

What other distros than Alpine uses doas by default?

[–] [email protected] 2 points 1 year ago (1 children)

There's a huge amount of Gentoo users using it, but there's OpenBSD who use it by default

[–] [email protected] 3 points 1 year ago

Claims of there being a huge number of Gentoo users. Are there 3 digit numbers of them?

load more comments
view more: next ›