so if I copy the sample doas it gets deleted on upgrade???
No, it won't happen anymore, this was specific to this update of the port.
The port did not install it intentionally by default, but later, it got installed as sample, now we had reverted that process.
nice to know, is there any other file removed?? like pf.conf which I also referenced here?
No, it was specific to
security/doas.
or just doas.conf is deleted if not edited from sample?
Yes, if it was never edited (i.e configured by system user), it will get deleted, like how we wanted.
By the way, what would be then a good doas file???
This is the
default configuration:
Code:
# Sample file for doas
# Please see doas.conf manual page for information on setting
# up a doas.conf file.
# Permit members of the wheel group to perform actions as root.
permit :wheel
# Same without having to enter the password
permit nopass :wheel
# Permit user alice to run commands as a root user.
permit alice as root
# Permit user bob to run programs as root, maintaining
# environment variables. Useful for GUI applications.
permit keepenv bob as root
# Permit user cindy to run only the pkg package manager as root
# to perform package updates and upgrades.
permit cindy as root cmd pkg args update
permit cindy as root cmd pkg args upgrade
# Allow david to run id command as root without logging it
permit nolog david as root cmd id
A few of security risks:
1. It allows any user in the
wheel group to become super-user without requiring any password.
2. If there was a user named
alice, it would give them the
root permission.
3. Continuation of 2nd with different goals for different usernames.
At least I would delete all but keep only
permit :wheel. I am not used to the doas' configuration, though.
Martin Kalcok (from
PR 300634) had reported that in our Bug Reports database and the maintainer of
security/doas port (Jesse Smith) accepted that the configuration was never meant to be installed as sample.
I would recommend to read the
PR 300634 as more detailed discussion happened there.