Doas

Page content

doas, an alternative to sudo

Everybody knows sudo … right ? the bsd guys just hacked an alternative tool calleed doas …

simple, secure and clever

example follow later, here a good and quick tutorial.

Introduction to doas on OpenBSD

Quick and Dirty, Full Permission for group wheel

su -
if [ -f /etc/doas.conf ]; then 
  echo "permit nopass :wheel" >> /etc/doas.conf
else
  echo "permit nopass :wheel" > /etc/doas.conf
fi 

chmod 600 /etc/doas.conf

Allow User Joe to Switch to anoter User

cat <<EOF >> /etc/doas.conf
# give user joe right to switch to user webmaster -> "/usr/bin/su - webmaster"
permit nopass joe cmd /usr/bin/su args - webmaster
EOF

sha256: a4b6878682f87ca06f166767b259bacd2086aa42acd6e387e1a1bf5db462af82