I see people talking about doas saying it’s just like sudo but with less features. I’m just wondering if there is any situation where you should use doas or if it’s just personal preference.
The short answer is that my distro did not let me do this easily. But that was for good reason.
A system update would require too many privileges that it would be almost indistinguishable from root.
Currently, every user I have is restricted in what files it has access to. A system update user would need access to so many files, including install locations of all binaries, and non-binary installation paths of all current and future programs I install (some package installs modify /var, many modify /etc, and so on).
This user will also have access to all these programs, down to system applications. It can trivially break a permission system I come up with.
It may be possible to restrict system updates to a user, but it would be such a powerful user that its not really worth it.
Does the user have that access? In my case with rpm-ostree they can just execute 2 commands rpm-ostree refresh-md
(get updates) and rpm-ostree update
. rpm-ostree rebase
is used for system upgrades afaik, that one needs a password.
Only the root user has access to system updates on my system currently.
What does rpm-ostree update
do exactly? Does it execute the update? Or is that the rebase command only?
No rpm-ostree
downloads the diffs, applies existing changes (added or removed packages) and builds a new image that gets staged as first boot target. After reboot you are on an updated system.