Why?
sudo
is 40 years old and new CVEs are still being found, perhaps because it’s ~412k (mostly plugins and tooling, more like ~15k lines which is still a lot) lines of code to let users switch accounts for a single command.
The Four Steps
- Install the
doas
package:sudo xbps-install opendoas
- Create
/etc/doas.conf
and addpermit your_username as root
, this is the last time you’ll be usingsudo
. - (optional) create a bash alias by adding
alias sudo='doas'
to~/.bashrc
then runsource ~/.bashrc
- Remove the
sudo package
:sudo xbps-remove -F sudo
ordoas xbps-remove -F sudo
if you didn’t add an alias.
Don’t Things Depend on Sudo?
Yes.
The -F
flag for xbps-remove
is needed to force XBPS to ignore base-system
’s dependency upon it.
Everything I’ve seen will fallback to doas
.
Comments