I know. I'm not ranting. I'm just asking why this separation of concerns isn't implemented even on OpenBSD. Is there something I'm missing? I'm not particularly paranoid anyway.Nobody is forcing you to usewheel
, it's an example.
Simple separation of concerns. We have to add an user to the wheel group to run sudo/doas, but wheel is the root group and everyone in the wheel group can see everything in /root, directories in /var, etc. Which is probably not what we want.Looks to me likewheel
works exactly as intended. Gid 0 doesn't do more than controlsu
and even that can be changed. How do you see it as harmful?
How SirDice said, you don't need to add your user to the wheel group to use sudo/doas. The wheel membership is required only for su(1).Simple separation of concerns. We have to add an user to the wheel group to run sudo/doas, but wheel is the root group and everyone in the wheel group can see everything in /root, directories in /var, etc. Which is probably not what we want.
[…] Is there something I'm missing? […]
[…] everyone in the wheel group can see everything in /root, directories in /var, etc. […]
x
excute bit to traverse every pathname component and the r
ead bit to list directory entries.getfacl /root /var
# file: /root
# owner: root
# group: wheel
owner@:rwxp--aARWcCos:-------:allow
group@:------a-R-c--s:-------:allow
everyone@:------a-R-c--s:-------:allow
# file: /var
# owner: root
# group: wheel
owner@:rwxp--aARWcCos:-------:allow
group@:r-x---a-R-c--s:-------:allow
everyone@:r-x---a-R-c--s:-------:allow
[…] The wheel membership is required only for su(1).
[…] For this reason I create a special sudo group. […]
wheel
group membership requirement is enforced via the /etc/pam.d/su service stack rule:auth requisite pam_group.so no_warn group=wheel root_only fail_safe ruser
root_only
option to pam_group(8) and/or replace wheel
with your dedicated su(1) group if you like, if you think this was a gain in security in your environment.